[PATCH] D14350: [FunctionAttrs] Fix an iterator wraparound bug

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 20:24:34 PST 2015


sanjoy added inline comments.

================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:446
@@ +445,3 @@
+      bool InVarArgSection = false;
+      for (CallSite::arg_iterator A = B; A != E; ++A) {
+        InVarArgSection |= (AI == AE);
----------------
reames wrote:
> I think this would be far clearer as:
> for (non var arg arguments) { do previous code)
> for (var arg arguments) { return nope! }
Yeah, that's a good idea.  I'll do that restructuring and check in.


http://reviews.llvm.org/D14350





More information about the llvm-commits mailing list