[clang-tools-extra] [clang-tidy] Add `-std` argument in `check_clang_tidy.py` for C files (PR #150791)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 27 06:05:57 PDT 2025


================
@@ -19,13 +18,16 @@ void notRelated(int A, int B) {}
 
 int addedTogether(int A, int B) { return add(A, B); } // NO-WARN: Passed to same function.
 
+// FIXME: This triggers a false positive: the "passed to same function" heuristic
+// can't map the parameter index 1 to A and B because myprint() has no
+// parameters.
+//     warning: 2 adjacent parameters of 'passedToSameKNRFunction' of similar type ('int')
+//     note: the first parameter in the range is 'A'
+//     note: the last parameter in the range is 'B'
+#if 0
+int myprint();
----------------
vbvictor wrote:

I didn't look at the nature of this FP. If it is unfixable in theory then we could disable it forever. If there is a chance to fix it, I'd leave the test to give warnings.

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


More information about the cfe-commits mailing list