[PATCH] D147449: [include-cleaner] Only ignore builtins without a header

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 4 04:26:26 PDT 2023


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

Thanks. I was surprised to see that some standard library symbols are treated as builtin symbols.

I think the current approach is better (e.g. clangd's hover on `__builtin_popcount()` will not give some arbitrary header providers).



================
Comment at: clang-tools-extra/include-cleaner/lib/FindHeaders.cpp:169
+        ND->getASTContext().BuiltinInfo.getHeaderName(ID);
+    // FIXME: Use the header mapping for builtins with a known header.
+    if (!BuiltinHeader)
----------------
I think it would be clearer if we move this FIXME after the following if branch. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147449/new/

https://reviews.llvm.org/D147449



More information about the cfe-commits mailing list