[PATCH] D22270: [ASTImporter] Properly report the locations of anonymous structs declared as part of named fields
Sean Callanan via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 13 11:04:12 PDT 2016
spyffe added a comment.
Thank you very much for your review, Manman! I can implement all your individual fixes, those look fine. In answer to two of your bigger questions, though:
- I see what you mean about the definition of an anonymous structure. It looks like our structure is an //untagged// structure, not an //anonymous// one. That said, this change is safe for all the places that use this function, so it may be appropriate to change the name to `findAnonymousStructOrUnionIndex`. What do you think?
- The test case is unfortunately only an approximation to the more complicated behavior that occurs in lldb. The difference is that the testing infrastructure inside Clang does not implement an ExternalASTSource, which LLDB does. As a result, I've used the test case to verify that we don't break parsing by making this change.
More information about the cfe-commits