[clang] 0da8453 - Remove -Wcompound-token-split-by-space from -Wall.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 31 20:59:35 PDT 2020
Author: Richard Smith
Date: 2020-08-31T20:59:19-07:00
New Revision: 0da84535b1e328188efbc1bb697dc7276f9e7d27
URL: https://github.com/llvm/llvm-project/commit/0da84535b1e328188efbc1bb697dc7276f9e7d27
DIFF: https://github.com/llvm/llvm-project/commit/0da84535b1e328188efbc1bb697dc7276f9e7d27.diff
LOG: Remove -Wcompound-token-split-by-space from -Wall.
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.
Added:
Modified:
clang/include/clang/Basic/DiagnosticGroups.td
clang/test/Misc/warning-wall.c
clang/test/Parser/compound-token-split.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index a79e057a5b33..6b4dcc850612 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -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]>;
diff --git a/clang/test/Misc/warning-wall.c b/clang/test/Misc/warning-wall.c
index 6e1134572a3c..c63d4beecff0 100644
--- a/clang/test/Misc/warning-wall.c
+++ b/clang/test/Misc/warning-wall.c
@@ -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
diff --git a/clang/test/Parser/compound-token-split.cpp b/clang/test/Parser/compound-token-split.cpp
index 2ec7955658de..0f1774a10714 100644
--- a/clang/test/Parser/compound-token-split.cpp
+++ b/clang/test/Parser/compound-token-split.cpp
@@ -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}}
More information about the cfe-commits
mailing list