[clang][sema] Print more information about failed static assertions
authorTimm Bäder <tbaeder@redhat.com>
Mon, 1 Aug 2022 12:12:32 +0000 (14:12 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Thu, 11 Aug 2022 06:44:38 +0000 (08:44 +0200)
commit09117b21890c652994f7ada0229d309b35b44259
tree140d85d64cd36929e3b130f0b4a63dfb68873887
parent28131517301c050d2292affac6fbbdb9cf9a46fe
[clang][sema] Print more information about failed static assertions

For failed static assertions, try to take the expression apart and print
useful information about why it failed. In particular, look at binary
operators and print the compile-time evaluated value of the LHS/RHS.

Differential Revision: https://reviews.llvm.org/D130894
18 files changed:
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp
clang/test/CXX/drs/dr7xx.cpp
clang/test/CXX/temp/temp.decls/temp.variadic/init-capture.cpp
clang/test/Lexer/cxx1z-trigraphs.cpp
clang/test/PCH/cxx-templates.cpp
clang/test/Parser/objc-static-assert.mm
clang/test/Sema/static-assert.c
clang/test/SemaCXX/constant-expression-cxx11.cpp
clang/test/SemaCXX/recovery-expr-type.cpp
clang/test/SemaCXX/static-assert-cxx17.cpp
clang/test/SemaCXX/static-assert.cpp
clang/test/SemaTemplate/instantiate-var-template.cpp
clang/test/SemaTemplate/instantiation-dependence.cpp
clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp