[PATCH] D23434: Don't allow llvm-include-order to intermingle includes from different files.

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 17:09:01 PDT 2016


zturner updated this revision to Diff 67777.
zturner added a comment.

Seems like dropping all non-main-file include directives is wrong because then it won't be able to detect errors in "non user code".  Seems like the real fix is to bucket the include directives by file in which they were declared in, and then process each bucket in order.  This way we process all include directives, including those in non-user code, but block analysis is done at a per-file level.


https://reviews.llvm.org/D23434

Files:
  clang-tidy/llvm/IncludeOrderCheck.cpp
  test/clang-tidy/Inputs/Headers/cross-file-a.h
  test/clang-tidy/Inputs/Headers/cross-file-b.h
  test/clang-tidy/Inputs/Headers/cross-file-c.h
  test/clang-tidy/llvm-include-order.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23434.67777.patch
Type: text/x-patch
Size: 7659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160812/595fc49c/attachment.bin>


More information about the cfe-commits mailing list