[PATCH] D19843: Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths.

Eric Niebler via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 17:05:58 PDT 2016


eric_niebler updated the summary for this revision.
eric_niebler updated this revision to Diff 59974.
eric_niebler added a comment.

Rework the patch to only warn by default for include files //not// found in system include directories, unless they are known "standard" headers that should be portable (C/C++/Posix/Boost). Add an additional warning `-Wnonportable-system-include-path` for turning the warning on for user code that #include's other system headers like <Windows.h>. (As always, warning //within// system headers are suppressed.)


http://reviews.llvm.org/D19843

Files:
  include/clang/Basic/DiagnosticLexKinds.td
  include/clang/Basic/FileManager.h
  include/clang/Basic/VirtualFileSystem.h
  include/clang/Lex/DirectoryLookup.h
  include/clang/Lex/HeaderSearch.h
  lib/Basic/FileManager.cpp
  lib/Basic/VirtualFileSystem.cpp
  lib/Lex/HeaderSearch.cpp
  lib/Lex/PPDirectives.cpp
  test/Lexer/Inputs/case-insensitive-include.h
  test/Lexer/case-insensitive-include-ms.c
  test/Lexer/case-insensitive-include.c
  test/Lexer/case-insensitive-system-include.c
  test/PCH/case-insensitive-include.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19843.59974.patch
Type: text/x-patch
Size: 23564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160608/8e225dde/attachment-0001.bin>


More information about the cfe-commits mailing list