[clang] [Clang] Avoid querying tag definitions for invalid DeclSpecs (PR #210085)

Tony Guillot via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 23 05:23:36 PDT 2026


================
@@ -14,6 +14,10 @@ void f() {
 struct PR209000 {
 } auto; // expected-error {{'auto' cannot be combined with a type specifier}}
 
+auto union { // expected-error {{cannot combine with previous 'auto' declaration specifier}}
----------------
to268 wrote:

```suggestion
auto union { // expected-warning {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}} \
             // expected-error {{cannot combine with previous 'auto' declaration specifier}}
```

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


More information about the cfe-commits mailing list