summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticLexKinds.td
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2018-06-25 22:24:17 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2018-06-25 22:24:17 +0000
commit50ebf26c30b297dbea9c20d993415b13f27b0300 (patch)
tree46d9206e5b77b309cef4d6f804cca5b32be48c77 /include/clang/Basic/DiagnosticLexKinds.td
parentf479c70eb4f9546892e1bfc84b34fa54c8f6070e (diff)
Warning for framework include violation from Headers to PrivateHeaders
Framework vendors usually layout their framework headers in the following way: Foo.framework/Headers -> "public" headers Foo.framework/PrivateHeader -> "private" headers Since both headers in both directories can be found with #import <Foo/some-header.h>, it's easy to make mistakes and include headers in Foo.framework/PrivateHeader from headers in Foo.framework/Headers, which usually configures a layering violation on Darwin ecosystems. One of the problem this causes is dep cycles when modules are used, since it's very common for "private" modules to include from the "public" ones; adding an edge the other way around will trigger cycles. Add a warning to catch those cases such that: ./A.framework/Headers/A.h:1:10: warning: public framework header includes private framework header 'A/APriv.h' #include <A/APriv.h> ^ rdar://problem/38712182 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticLexKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticLexKinds.td3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td
index de6bffcdca..5d1e149eab 100644
--- a/include/clang/Basic/DiagnosticLexKinds.td
+++ b/include/clang/Basic/DiagnosticLexKinds.td
@@ -718,6 +718,9 @@ def warn_quoted_include_in_framework_header : Warning<
"double-quoted include \"%0\" in framework header, "
"expected angle-bracketed instead"
>, InGroup<FrameworkHdrQuotedInclude>, DefaultIgnore;
+def warn_framework_include_private_from_public : Warning<
+ "public framework header includes private framework header '%0'"
+ >, InGroup<FrameworkIncludePrivateFromPublic>;
def warn_auto_module_import : Warning<
"treating #%select{include|import|include_next|__include_macros}0 as an "