[PATCH] D134303: [AST] Preserve more structure in UsingEnumDecl node.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 20 12:45:31 PDT 2022
sammccall created this revision.
sammccall added reviewers: ilya-biryukov, urnathan.
Herald added subscribers: kadircet, arphaman, martong.
Herald added a reviewer: shafik.
Herald added a project: All.
sammccall requested review of this revision.
Herald added projects: clang, clang-tools-extra.
Herald added a subscriber: cfe-commits.
- store NestedNameSpecifier & Loc for the qualifiers This information was entirely missing from the AST.
- expose the location information for enum/qualifier/identifier as typeloc (ElaboratedTypeLoc+EnumTypeLoc for now). This allows many traversals/astmatchers etc to handle these generically along with other references. The decl vs type split can help preserve typedef sugar when https://github.com/llvm/llvm-project/issues/57659 is resolved.
- fix the SourceRange of UsingEnumDecl to include 'using'.
Fixes https://github.com/clangd/clangd/issues/1283
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134303
Files:
clang-tools-extra/clangd/FindTarget.cpp
clang-tools-extra/clangd/unittests/FindTargetTests.cpp
clang-tools-extra/clangd/unittests/SelectionTests.cpp
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
clang/include/clang/AST/DeclCXX.h
clang/include/clang/AST/RecursiveASTVisitor.h
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/DeclCXX.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/AST/ast-dump-using-enum.cpp
clang/unittests/Tooling/RecursiveASTVisitorTestTypeLocVisitor.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134303.461662.patch
Type: text/x-patch
Size: 15540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220920/b18226d7/attachment.bin>
More information about the cfe-commits
mailing list