[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 04:58:29 PDT 2024


================
@@ -738,16 +738,47 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration(
       return nullptr;
     }
 
-    if (!Tok.is(tok::identifier)) {
+    Decl *UED = nullptr;
+
+    if (Tok.is(tok::identifier)) {
+      IdentifierInfo *IdentInfo = Tok.getIdentifierInfo();
+      SourceLocation IdentLoc = ConsumeToken();
+
+      ParsedType Type = Actions.getTypeName(
+          *IdentInfo, IdentLoc, getCurScope(), &SS, /*isClassName=*/true,
----------------
Endilll wrote:

Note that `getTypeName` is now called with `/*isClassName=*/true`. I believe this is how we spell type-only lookup when templates are not involved.

https://github.com/llvm/llvm-project/pull/95399


More information about the cfe-commits mailing list