[all-commits] [llvm/llvm-project] b2d0c1: [clang] p1099 using enum part 2
Nathan Sidwell via All-commits
all-commits at lists.llvm.org
Tue Jun 8 11:12:40 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b2d0c16e91f39def3646b71e5afebfaea262cca1
https://github.com/llvm/llvm-project/commit/b2d0c16e91f39def3646b71e5afebfaea262cca1
Author: Nathan Sidwell <nathan at acm.org>
Date: 2021-06-08 (Tue, 08 Jun 2021)
Changed paths:
M clang-tools-extra/clangd/FindTarget.cpp
M clang/include/clang/AST/ASTContext.h
M clang/include/clang/AST/DeclCXX.h
M clang/include/clang/AST/JSONNodeDumper.h
M clang/include/clang/AST/RecursiveASTVisitor.h
M clang/include/clang/AST/TextNodeDumper.h
M clang/include/clang/ASTMatchers/ASTMatchers.h
M clang/include/clang/Basic/DeclNodes.td
M clang/include/clang/Basic/DiagnosticParseKinds.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/include/clang/Index/IndexSymbol.h
M clang/include/clang/Sema/Sema.h
M clang/include/clang/Sema/Template.h
M clang/include/clang/Serialization/ASTBitCodes.h
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/ASTImporter.cpp
M clang/lib/AST/Decl.cpp
M clang/lib/AST/DeclBase.cpp
M clang/lib/AST/DeclCXX.cpp
M clang/lib/AST/DeclPrinter.cpp
M clang/lib/AST/JSONNodeDumper.cpp
M clang/lib/AST/TextNodeDumper.cpp
M clang/lib/ASTMatchers/ASTMatchersInternal.cpp
M clang/lib/ASTMatchers/Dynamic/Registry.cpp
M clang/lib/CodeGen/CGDebugInfo.cpp
M clang/lib/CodeGen/CGDebugInfo.h
M clang/lib/CodeGen/CGDecl.cpp
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/lib/Index/IndexSymbol.cpp
M clang/lib/Parse/ParseDeclCXX.cpp
M clang/lib/Sema/SemaCXXScopeSpec.cpp
M clang/lib/Sema/SemaCodeComplete.cpp
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
M clang/lib/Serialization/ASTCommon.cpp
M clang/lib/Serialization/ASTReaderDecl.cpp
M clang/lib/Serialization/ASTWriterDecl.cpp
A clang/test/AST/ast-dump-using-enum.cpp
A clang/test/SemaCXX/cxx20-using-enum.cpp
M clang/tools/libclang/CIndex.cpp
M clang/unittests/AST/ASTImporterTest.cpp
M clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
Log Message:
-----------
[clang] p1099 using enum part 2
This implements the 'using enum maybe-qualified-enum-tag ;' part of
1099. It introduces a new 'UsingEnumDecl', subclassed from
'BaseUsingDecl'. Much of the diff is the boilerplate needed to get the
new class set up.
There is one case where we accept ill-formed, but I believe this is
merely an extended case of an existing bug, so consider it
orthogonal. AFAICT in class-scope the c++20 rule is that no 2 using
decls can bring in the same target decl ([namespace.udecl]/8). But we
already accept:
struct A { enum { a }; };
struct B : A { using A::a; };
struct C : B { using A::a;
using B::a; }; // same enumerator
this patch permits mixtures of 'using enum Bob;' and 'using Bob::member;' in the same way.
Differential Revision: https://reviews.llvm.org/D102241
More information about the All-commits
mailing list