[PATCH] D84781: [SyntaxTree] Use PointerUnion instead of inheritance for alternative clauses in NNS

2020-08-06 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:788-789 - -// Remove "::" from the `SourceRange` -SR.setEnd(SR.getEnd().getLocWithOffset(-1)); Newbie mistake causing the crash Comment at: clang/lib

[PATCH] D84781: [SyntaxTree] Use PointerUnion instead of inheritance for alternative clauses in NNS

2020-08-07 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 283876. eduucaldas added a comment. Remove Fix crash on name specifier commit from patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84781/new/ https://reviews.llvm.org/D84781 Files: clang/include/clang

[PATCH] D84781: [SyntaxTree] Use PointerUnion instead of inheritance for alternative clauses in NNS

2020-08-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. Seeing the API, I like the inheritance-based approach better. It seems more uniform. Comment at: clang/lib/Tooling/Syntax/Nodes.cpp:219 + syntax::EmptyNode *, syntax::Leaf *, syntax::DecltypeSpecifier *, + syntax::SimpleTemplateSpecifier *