@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wold-style-declaration %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wextra %s
+
AaronBallman wrote:
It would be good to add a RUN line along these lines:
```suggestion
// RUN: %clang_cc1 -fsyntax-only -
@@ -3348,6 +3348,7 @@ void Parser::ParseDeclarationSpecifiers(
while (true) {
bool isInvalid = false;
bool isStorageClass = false;
+bool isFunctionSpecifier = false;
AaronBallman wrote:
Hmmm, what's obsoleted are storage class specifiers that are
@@ -88,6 +88,8 @@ def err_param_redefinition : Error<"redefinition of parameter
%0">;
def warn_method_param_redefinition : Warning<"redefinition of method parameter
%0">;
def warn_method_param_declaration : Warning<"redeclaration of method parameter
%0">,
InGroup, DefaultI
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wold-style-declaration %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wextra %s
+
+static int x0;
+int __attribute__ ((aligned (16))) static x1; // expected-warning {{'static'
is not at beginning of declaration}}
+
+exter
@@ -4104,6 +4106,7 @@ void Parser::ParseDeclarationSpecifiers(
isInvalid = true;
} else {
isInvalid = DS.setFunctionSpecVirtual(Loc, PrevSpec, DiagID);
+isFunctionSpecifier = true;
AaronBallman wrote:
C doesn't have virtual functi
@@ -4140,12 +4143,14 @@ void Parser::ParseDeclarationSpecifiers(
}
isInvalid = DS.setFunctionSpecExplicit(ExplicitLoc, PrevSpec, DiagID,
ExplicitSpec, CloseParenLoc);
+ isFunctionSpecifier = true;
Aa
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wold-style-declaration %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wextra %s
+
+static int x0;
+int __attribute__ ((aligned (16))) static x1; // expected-warning {{'static'
is not at beginning of declaration}}
+
+exter
https://github.com/AaronBallman commented:
Thank you for working on this! Please be sure to add release notes to
clang/docs/ReleaseNotes.rst so users know about the new diagnostic capabilities.
https://github.com/llvm/llvm-project/pull/78837
___
cfe-c
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/78837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SihangZhu wrote:
> ping
repeat:)
https://github.com/llvm/llvm-project/pull/78837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SihangZhu edited
https://github.com/llvm/llvm-project/pull/78837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
11 matches
Mail list logo