Hello,
Currently (my version is 3.4.2) when dumping the ast with -ast-dump i
can see that comments that represent documentation is kept in the AST.
Unfortunately it seems that preprocessor defines are not so lucky. Is
there any command line option that will allow me to keep the
preprocessor tokens with their documentation? Has this been
implemented in a newer clang version?
Thank you very much
Hello,
Currently (my version is 3.4.2) when dumping the ast with -ast-dump i
can see that comments that represent documentation is kept in the AST.
Unfortunately it seems that preprocessor defines are not so lucky. Is
there any command line option that will allow me to keep the
preprocessor tokens with their documentation? Has this been
implemented in a newer clang version?
Nope.
I've asked this last year already:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-August/038544.html
Thank you very much
Regards
Well i thought this would be the answer i would get.
Is it possible to do this from a theoretical point of view? The
problem i see is that preprocessing is done in stage 4 where there is
no syntax tree. It is built in stage 7.
Would there still be a way to annotate this in the syntax tree?
Thank you
In article <CAMDzUtzsoUL4wZs-iTsthjoUnc03SLsYjZYgpQrVm5-q0K8krg@mail.gmail.com>,
Guilherme <guibufolo+llvm@gmail.com> writes:
Is it possible to do this from a theoretical point of view? The
problem i see is that preprocessing is done in stage 4 where there is
no syntax tree. It is built in stage 7.
Would there still be a way to annotate this in the syntax tree?
If I understood the referenced slide deck correctly, they gathered
their own comment information as parsing proceeded and then
back-filled it onto the AST after it was built.
Wouldn't that work for macro definitions too?
@Richard Which article? I only see a mail link.