================
Comment at: clang-tidy/google/MemsetZeroLengthCheck.cpp:60
@@ +59,3 @@
+  // Try to evaluate the second argument so we can also find values that are 
not
+  // just literals. We don't emit a warning if the second argument also
+  // evaluates to zero.
----------------
Maybe we should emit a warning, that this call is a no-op?

================
Comment at: clang-tidy/google/MemsetZeroLengthCheck.cpp:64
@@ +63,3 @@
+  if (!Arg2->EvaluateAsInt(Value2, *Result.Context) || Value2 != 0 ||
+      (Arg1->EvaluateAsInt(Value1, *Result.Context) && Value1 == 0))
+    return;
----------------
I'd say Value1 < 0 is also not when we want to swap the arguments.

http://reviews.llvm.org/D4535



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to