[PATCH] D129048: Rewording the "static_assert" to static assertion
Shivam Gupta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 3 22:08:44 PDT 2022
xgupta added a comment.
Three test cases are failing - Please see: https://buildkite.com/llvm-project/premerge-checks/builds/100784#0181c539-bcd1-4d01-a2db-f27a63e2f17e/6-15379
But I think you want to actually modify https://github.com/llvm/llvm-project/blob/93d6fdfc232c59975d52146532693178def5ad16/clang/include/clang/Basic/DiagnosticSemaKinds.td#L11133 and https://github.com/llvm/llvm-project/blob/93d6fdfc232c59975d52146532693178def5ad16/clang/include/clang/Basic/DiagnosticSemaKinds.td#L11142.
Please also add more description to the patch as I said before like this -
Failing a _Static_assert in C should not report that static_assert failed. It’d probably be better to reword the diagnostic to be more like GCC and say “static assertion” failed in both C and C++.
For example -
cat test.c
_Static_assert(0, "oh no!");
clang prints
<source>:1:1: error: static_assert failed: oh no!
_Static_assert(0, "oh no!");
^ ~
1 error generated.
while gcc
<source>:1:1: error: static assertion failed: "oh no!"
1 | _Static_assert(0, "oh no!");
Compiler returned: 1
================
Comment at: clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp:48
}
\ No newline at end of file
----------------
a 'newline' is missing here.
================
Comment at: clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:85
}
\ No newline at end of file
----------------
same
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129048/new/
https://reviews.llvm.org/D129048
More information about the cfe-commits
mailing list