[PATCH] D47157: Warning for framework headers using double quote includes

2018-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335184: Warning for framework headers using double quote includes (authored by bruno, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: test/Modules/double-quotes.m:24-25 + +// The same warnings show up when modules is on but -verify doesn't get it +// because they only show up under the module A building context. +// RUN: FileCheck --input-file=%t/stderr %s

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 149359. bruno edited the summary of this revision. bruno added a comment. Update after Duncan's review: remove header name from the warning message (since it's already in the fixit) https://reviews.llvm.org/D47157 Files:

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D47157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: test/Modules/double-quotes.m:27-29 +// CHECK: double-quoted include "A0.h" in framework header, expected angle-bracketed include instead +// CHECK: double-quoted include "B.h" in framework header, expected angle-bracketed include

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/Modules/double-quotes.m:27-29 +// CHECK: double-quoted include "A0.h" in framework header, expected angle-bracketed include instead +// CHECK: double-quoted include "B.h" in framework header, expected angle-bracketed

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: test/Modules/double-quotes.m:24-25 + +// The same warnings show up when modules is on but -verify doesn't get it +// because they only show up under the module A building context. +// RUN: FileCheck --input-file=%t/stderr %s

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 149313. bruno added a comment. Updated the patch after Duncan and Aaron reviews. I actually went a bit more aggressive with the fixits, since I realized the conditions for the warning are already strict enough and we should take the chance to be more clear.

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:713 +def warn_quoted_include_in_framework_header : Warning< + "double-quoted include \"%0\" in framework header, expected system style include" + >, InGroup, DefaultIgnore;

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:713 +def warn_quoted_include_in_framework_header : Warning< + "double-quoted include \"%0\" in framework header, expected system style include" + >, InGroup, DefaultIgnore;

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:713 +def warn_quoted_include_in_framework_header : Warning< + "double-quoted include \"%0\" in framework header, expected system style include" + >, InGroup, DefaultIgnore;

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:713 +def warn_quoted_include_in_framework_header : Warning< + "double-quoted include \"%0\" in framework header, expected system style include" + >, InGroup, DefaultIgnore;

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:713 +def warn_quoted_include_in_framework_header : Warning< + "double-quoted include \"%0\" in framework header, expected system style include" + >, InGroup, DefaultIgnore;

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a subscriber: arphaman. bruno added inline comments. Comment at: lib/Lex/HeaderSearch.cpp:753-754 + IncluderAndDir.second->getName())) +Diags.Report(IncludeLoc, + diag::warn_quoted_include_in_framework_header) +

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D47157#1115445, @bruno wrote: > > Consistency would be nice, but at the same time, I don't see a good metric > > for when we'd know it's time to switch it to being on by default. I'm > > worried that it'll remain off by default forever

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-29 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: lib/Lex/HeaderSearch.cpp:753-754 + IncluderAndDir.second->getName())) +Diags.Report(IncludeLoc, + diag::warn_quoted_include_in_framework_header) +<< Filename;

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > Consistency would be nice, but at the same time, I don't see a good metric > for when we'd know it's time to switch it to being on by default. I'm worried > that it'll remain off by default forever simply because no one thinks to go > turn it on (because it's silent

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D47157#1107210, @bruno wrote: > > See also PR22165. > > Nice, seems related to this indeed. Are you aware of any development along > those lines in clang-tidy? We would like this to be part of clang and be used > as part of the normal

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D47157#1110430, @bruno wrote: > Hi Eugene, > > > You could just not include new warning into -Wall and -Wextra. Those who > > will want to check #include statements correctness could enable it > > explicitly. > > This is exactly

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Eugene, > You could just not include new warning into -Wall and -Wextra. Those who will > want to check #include statements correctness could enable it explicitly. This is exactly what's happening in the patch, the new warning isn't part of `-Wall` or `-Wextra`, and

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. >>> The warning is off by default. >> >> We typically do not add off-by-default warnings because experience has shown >> the rarely get enabled in practice. Can you explain a bit more about why >> this one is off by default? > > Right. I believe this is going

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > See also PR22165. Nice, seems related to this indeed. Are you aware of any development along those lines in clang-tidy? We would like this to be part of clang and be used as part of the normal compiler workflow, it can surely be as well part of any clang-tidy

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > The warning is off by default. We typically do not add off-by-default warnings because experience has shown the rarely get enabled in practice. Can you explain a bit more about why this one is off by default? Repository: rC Clang

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. See also PR22165. Repository: rC Clang https://reviews.llvm.org/D47157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Depends on https://reviews.llvm.org/D46485 Repository: rC Clang https://reviews.llvm.org/D47157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: dexonsmith, ributzka, steven_wu. Introduce -Wquoted-include-in-framework-header, which should fire a warning whenever a quote include appears in a framework header, example, for A.h added in the tests: ... A.framework/Headers/A.h:2:10: warning: