[cfe-dev] c++14 vs c++17 different ast for lambda?

Stephen Kelly via cfe-dev cfe-dev at lists.llvm.org
Wed May 5 12:18:36 PDT 2021


On 05/05/2021 02:52, Evgeniy Dushistov via cfe-dev wrote:
> Hi,
>
> I am trying to investigate bug in the tool based on
> libclang.


I'm not sure what "the tool" is, but there are multiple places where 
clang generates a different AST based on the C++ dialect, including 
simple implicit constructions. See

  https://clang.llvm.org/docs/LibASTMatchersReference.html#traverse-mode

and

  https://steveire.wordpress.com/2021/02/14/ast-matchmaking-made-easy/

If you are not using AST Matchers, you might find it useful to call 
`Expr::IgnoreUnlessSpelledInSource()`.

Thanks,

Stephen.




More information about the cfe-dev mailing list