From aea3aa183d985a708064e1d60e0353c993ada5f0 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Fri, 22 Dec 2017 02:53:30 +0000 Subject: [Modules] Change private modules rules and warnings We used to advertise private modules to be declared as submodules (Foo.Private). This has proven to not scale well since private headers might carry several dependencies, introducing unwanted content into the main module and often causing dep cycles. Change the canonical way to name it to Foo_Private, forcing private modules as top level ones, and provide warnings under -Wprivate-module to suggest fixes for other private naming. Update documentation to reflect that. rdar://problem/31173501 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321337 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticLexKinds.td | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/clang/Basic/DiagnosticLexKinds.td') diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index c664281ffc..c391470cb1 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -691,11 +691,15 @@ def err_mmap_expected_feature : Error<"expected a feature name">; def err_mmap_expected_attribute : Error<"expected an attribute name">; def warn_mmap_unknown_attribute : Warning<"unknown attribute '%0'">, InGroup; -def warn_mmap_mismatched_top_level_private : Warning< - "top-level module '%0' in private module map, expected a submodule of '%1'">, +def warn_mmap_mismatched_private_submodule : Warning< + "private submodule '%0' in private module map, expected top-level module">, InGroup; -def note_mmap_rename_top_level_private_as_submodule : Note< - "make '%0' a submodule of '%1' to ensure it can be found by name">; +def warn_mmap_mismatched_private_module_name : Warning< + "expected canonical name for private module '%0'">, + InGroup; +def note_mmap_rename_top_level_private_module : Note< + "rename '%0' to ensure it can be found by name">; + def err_mmap_duplicate_header_attribute : Error< "header attribute '%0' specified multiple times">; def err_mmap_invalid_header_attribute_value : Error< -- cgit v1.2.3