sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

LG from my side assuming you're happy with the strings changing.

In D135295#3837734 <https://reviews.llvm.org/D135295#3837734>, @ributzka wrote:

> This doesn't affect any tests?

This doesn't affect tests because anonymous decls currently print as the empty 
string, but will soon print as `(unnamed struct at /path/foo.cpp:4:1)` without 
this patch, or `(unnamed struct)` with this patch.



================
Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:854
+  // Do not include location in anonymous decls.
+  PrintingPolicy Policy(CI.getASTContext().getLangOpts());
+  Policy.AnonymousTagLocations = false;
----------------
nit: this isn't *just* clearing AnonymousTagLocations, but also resetting any 
other PP flags to defaults based on LangOpts. You could getPrintingPolicy() 
instead if you didn't intend to do this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135295

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

Reply via email to