[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 22 23:30:47 PST 2025


================
@@ -0,0 +1,45 @@
+// RUN: %check_clang_tidy -std=c99 %s bugprone-true-macro %t
+// RUN: %check_clang_tidy -std=c11 %s bugprone-true-macro %t
+// RUN: %check_clang_tidy -std=c17 %s bugprone-true-macro %t
----------------
steakhal wrote:

I think you should have a RUN line for a case when "true" is a keyword.

https://github.com/llvm/llvm-project/pull/128265


More information about the cfe-commits mailing list