[all-commits] [llvm/llvm-project] 7689c7: Create specialization of -Wgnu-statement-expressio...
Michael Wyman via All-commits
all-commits at lists.llvm.org
Tue May 31 11:13:47 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7689c7fc9e08cc430daca3714bcffdd00fd538bd
https://github.com/llvm/llvm-project/commit/7689c7fc9e08cc430daca3714bcffdd00fd538bd
Author: Michael Wyman <michael at mwyman.com>
Date: 2022-05-31 (Tue, 31 May 2022)
Changed paths:
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticParseKinds.td
M clang/lib/Parse/ParseExpr.cpp
M clang/test/Sema/gnu-flags.c
Log Message:
-----------
Create specialization of -Wgnu-statement-expression for expressions found in macros.
-Wgnu-statement-expression currently warns for both direct source uses of statement expressions but also macro expansions; since they may be used by macros to avoid multiple evaluation of macro arguments, engineers might want to suppress warnings when statement expressions are expanded from macros but see them if introduced directly in source code.
Differential Revision: https://reviews.llvm.org/D126522
More information about the All-commits
mailing list