[all-commits] [llvm/llvm-project] 8da090: Improve static_assert/_Static_assert diagnostics
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Wed Mar 3 05:48:57 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8da090381d567d0ec555840f6b2a651d2997e4b3
https://github.com/llvm/llvm-project/commit/8da090381d567d0ec555840f6b2a651d2997e4b3
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2021-03-03 (Wed, 03 Mar 2021)
Changed paths:
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticParseKinds.td
M clang/lib/Lex/PPDirectives.cpp
M clang/lib/Parse/ParseDeclCXX.cpp
A clang/test/Parser/static_assert.c
A clang/test/Preprocessor/static_assert-already-defined.c
A clang/test/Preprocessor/static_assert.c
M clang/test/Sema/static-assert.c
M clang/test/SemaCXX/static-assert.cpp
Log Message:
-----------
Improve static_assert/_Static_assert diagnostics
Our diagnostics relating to static assertions were a bit confused. For
instance, when in MS compatibility mode in C (where we accept
static_assert even without including <assert.h>), we would fail
to warn the user that they were using the wrong spelling (even in
pedantic mode), we were missing a compatibility warning about using
_Static_assert in earlier standards modes, diagnostics for the optional
message were not reflected in C as they were in C++, etc.
More information about the All-commits
mailing list