Remove -Wcompound-token-split-by-space from -Wall.
authorRichard Smith <richard@metafoo.co.uk>
Tue, 1 Sep 2020 01:03:18 +0000 (18:03 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Tue, 1 Sep 2020 03:59:19 +0000 (20:59 -0700)
Use of a linebreak between the `(` and `{` in a GNU statement-expression
appears to be too common to include this warning in -Wall -- this occurs
in some Linux kernel headers, for example.

clang/include/clang/Basic/DiagnosticGroups.td
clang/test/Misc/warning-wall.c
clang/test/Parser/compound-token-split.cpp

index a79e057..6b4dcc8 100644 (file)
@@ -949,7 +949,7 @@ def Consumed       : DiagGroup<"consumed">;
 // warning should be active _only_ when -Wall is passed in, mark it as
 // DefaultIgnore in addition to putting it here.
 def All : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool,
-                            MisleadingIndentation, CompoundTokenSplit]>;
+                            MisleadingIndentation]>;
 
 // Warnings that should be in clang-cl /w4.
 def : DiagGroup<"CL4", [All, Extra]>;
index 6e11345..c63d4be 100644 (file)
@@ -94,9 +94,6 @@ CHECK-NEXT:    -Wdangling-else
 CHECK-NEXT:  -Wswitch
 CHECK-NEXT:  -Wswitch-bool
 CHECK-NEXT:  -Wmisleading-indentation
-CHECK-NEXT:  -Wcompound-token-split
-CHECK-NEXT:    -Wcompound-token-split-by-macro
-CHECK-NEXT:    -Wcompound-token-split-by-space
 
 
 CHECK-NOT:-W
index 2ec7955..0f1774a 100644 (file)
@@ -1,6 +1,5 @@
 // RUN: %clang_cc1 %s -verify
 // RUN: %clang_cc1 %s -verify=expected,space -Wcompound-token-split
-// RUN: %clang_cc1 %s -verify=expected,space -Wall
 
 #ifdef LSQUARE
 [ // expected-note {{second '[' token is here}}