HighCommander4 wrote:

I see; it's a bit unfortunate that such an "invented" call expression gets an 
ordinary `SourceLocation`. I would have hoped it gets a source location in some 
sort of virtual buffer like the [rewritten form of 
`>>`](https://github.com/clangd/clangd/issues/871#issuecomment-933178468), or 
macro expansions.

---

What do you think about the following idea: override the traversal of 
`PseudoObjectExpr`, but rather than traversing [both the `getSyntacticForm()` 
and the semantic 
expressions](https://searchfox.org/llvm/rev/40671bbdefb6ff83e2685576a3cb041b62f25bbe/clang/include/clang/AST/RecursiveASTVisitor.h#2573-2584),
 only traverse the `getSyntacticForm()`?

That leave the door open to a future enhancement where the arguments in the 
syntactic form (the `__builtin_dump_struct`) could get parameter hints, which 
might be useful for a reader to understand what the builtin does.

https://github.com/llvm/llvm-project/pull/71366
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to