================
@@ -0,0 +1,162 @@
+// TODO: When Clang adds support for decimal floating point types, enable 
these tests by:
+//    1. Removing all the #if 0 + #endif guards.
+//    2. Removing all occurrences of the string "DISABLED-" in this file.
+//    3. Deleting this message.
+
+// RUN: %check_clang_tidy -std=c23-or-later %s 
readability-uppercase-literal-suffix %t
+// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.c
+// RUN: clang-tidy %t.c -checks='-*,readability-uppercase-literal-suffix' -fix 
-- -std=c23
+// RUN: clang-tidy %t.c -checks='-*,readability-uppercase-literal-suffix' 
-warnings-as-errors='-*,readability-uppercase-literal-suffix' -- -std=c23
+
+void bit_precise_literal_suffix() {
+  // _BitInt()
+
+  static constexpr auto v1 = 1wb;
+  // CHECK-MESSAGES: :[[@LINE-1]]:30: warning: integer literal has suffix 
'wb', which is not uppercase
+  // CHECK-MESSAGES-NEXT: static constexpr auto v1 = 1wb;
+  // CHECK-MESSAGES-NEXT: ^~~
+  // CHECK-MESSAGES-NEXT: WB{{$}}
----------------
vbvictor wrote:

The only benefit I see is to don't write GOOD cases. So the workflow would be 
like:
1) Write only "bad" cases in test file
2) First run corrects that they are all become "good"
3) Second run checks that none of "good" are not flagged as FP.

So since we write all good cases explicitly (I hope so) then we don't need 
double-run.

https://github.com/llvm/llvm-project/pull/148275
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to