giulianobelinassi added a comment.


> The way Clang handles this is to mostly go back to the original source code 
> (through the source manager and source location information) to grab what the 
> user actually wrote. The pretty printing functionality loses information like 
> whether something was expanded from a macro, etc and so, if the goal is to 
> show what the user wrote, it's likely to be a really big uphill battle to get 
> that through the pretty printer.

This is something I already do, but there are some cases where I simply can not 
track down the origin of the declaration (some very complex macro expansions) 
and in this case I simply fall back to the prettyprinter. Those are the cases 
where I am interesting in fixing the prettyprinter. It is also worth noting 
that I am currently interested in C code so perhaps most of these issues don't 
manifest in this case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141714

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to