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

Bruno Cardoso Lopes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 21 13:21:49 PDT 2018


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: double-quoted include "A0.h" in framework header, expected system style <angled> include

This should help users prevent frameworks from using local headers
when in fact they should be targetting system level ones.

The warning is off by default.

rdar://problem/37077034


Repository:
  rC Clang

https://reviews.llvm.org/D47157

Files:
  include/clang/Basic/DiagnosticGroups.td
  include/clang/Basic/DiagnosticLexKinds.td
  lib/Lex/HeaderSearch.cpp
  test/Modules/Inputs/double-quotes/A.framework/Headers/A.h
  test/Modules/Inputs/double-quotes/A.framework/Headers/A0.h
  test/Modules/Inputs/double-quotes/A.framework/Modules/module.modulemap
  test/Modules/Inputs/double-quotes/B.h
  test/Modules/Inputs/double-quotes/X.framework/Headers/X.h
  test/Modules/Inputs/double-quotes/X.framework/Modules/module.modulemap
  test/Modules/Inputs/double-quotes/a.hmap.json
  test/Modules/Inputs/double-quotes/flat-header-path/Z.h
  test/Modules/Inputs/double-quotes/flat-header-path/Z.modulemap
  test/Modules/Inputs/double-quotes/x.hmap.json
  test/Modules/Inputs/double-quotes/z.yaml
  test/Modules/double-quotes.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47157.147851.patch
Type: text/x-patch
Size: 8993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180521/99aed78d/attachment.bin>


More information about the cfe-commits mailing list