================
@@ -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:

We should preserve false-positives in code, because someone could make a 
refactor/speedup patch of the check and accidentally fix FP. Without this test, 
developer wouldn't know he fixed a FP with an NFC patch.

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

Reply via email to