[PATCH] D40118: [Lint] Don't warn about noalias argument aliasing if other argument is byval

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 23:13:51 PST 2017


uabelho marked 2 inline comments as done.
uabelho added a comment.

Thanks for the comments!



================
Comment at: lib/Analysis/Lint.cpp:275
+          unsigned ArgNo = 0;
+          for (CallSite::arg_iterator BI = CS.arg_begin(); BI != AE; ++BI) {
+            // Skip ByVal arguments since they will be memcpy'd to the callee's
----------------
rnk wrote:
> `for (Value *OtherArg : CS.args()) {` ?
I could probably change it but I'm hesitant to do it since BI is also used in "AI != BI" below to skip over when "OtherArg == Arg" and I don't want to mess up anything just to do some kind of unrelated refactoring.


https://reviews.llvm.org/D40118





More information about the llvm-commits mailing list