[PATCH] D153857: [clang] Fix new-expression with elaborated-type-specifier

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 27 14:42:58 PDT 2023


shafik added a comment.

MSVC rejects the first but accepts the second which I think is wrong but worth testing:

  alignof(struct B {});
  sizeof(struct B{});

https://godbolt.org/z/153jYqaPM



================
Comment at: clang/include/clang/Parse/Parser.h:2359
     case DeclSpecContext::DSC_template_param:
+    case DeclSpecContext::DSC_new:
       return ImplicitTypenameContext::Yes;
----------------
Should this be below since `DeclaratorContext::CXXNew` was grouped w/ `DSC_normal` normal before?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153857/new/

https://reviews.llvm.org/D153857



More information about the cfe-commits mailing list