[clang] [clang] Reject 'auto' storage class with type specifier in C++ (PR #166004)
Osama Abdelkader via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 14 15:24:45 PDT 2026
================
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y
void f() {
- auto int a; // expected-warning {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}}
- int auto b; // expected-error{{cannot combine with previous 'int' declaration specifier}}
+ auto int a; // expected-error {{'auto' cannot be combined with a type specifier}}
+ int auto b; // expected-error {{'auto' cannot be combined with a type specifier}}
----------------
osamakader wrote:
sorry for the late reply, done.
https://github.com/llvm/llvm-project/pull/166004
More information about the cfe-commits
mailing list