[PATCH] D30882: Add a callback for __has_include and use it for dependency scanning

Bruno Cardoso Lopes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 13 13:32:42 PDT 2017


bruno accepted this revision.
bruno added a comment.
This revision is now accepted and ready to land.

Hi Pete, thanks for working on this!

LGTM with the minor comments below.



================
Comment at: include/clang/Lex/PPCallbacks.h:264
+  virtual void HasInclude(SourceLocation Loc, const FileEntry *File) {
+  }
   
----------------
clang-format this one!


================
Comment at: test/Frontend/dependency-gen-has-include.c:17
+#if __has_include("a/header.h")
+#endif
----------------
Can you also add a testcase for `__has_include_next`?


https://reviews.llvm.org/D30882





More information about the cfe-commits mailing list