[clang-tools-extra] [clangd] Don't show inlay hints for __builtin_dump_struct (PR #71366)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 00:04:49 PST 2023


zyn0217 wrote:

> Is it not possible to tell based on the `CallExpr` only (rather than checking an ancestor of it during traversal of the tree) that "this `CallExpr` is not explicitly written in the source"?

I'm not quite sure - Looking into the construction process for a `__builtin_dump_struct` expression,
https://github.com/llvm/llvm-project/blob/4d5a8ccf25a6c43930c332e75ecead287778af6b/clang/lib/Sema/SemaChecking.cpp#L482-L509

the part that makes the call unordinary might be the nullish scope. I don't know if that implies "the expression is not written by users"; even so, extracting the scope of a call expression then performing the check doesn't look much more straightforward than this way.



https://github.com/llvm/llvm-project/pull/71366


More information about the cfe-commits mailing list