rjmccall added inline comments.
================ Comment at: include/clang/Basic/AttrDocs.td:252 +declaration to specify that the return value of the function (which must be a +pointer type) is at least as aligned as the value indicated parameter. The +parameter is given by its index in the list of formal parameters; the first ---------------- "value *of the* indicated parameter" ================ Comment at: include/clang/Basic/AttrDocs.td:254 +parameter is given by its index in the list of formal parameters; the first +parameter hs index 1 unless the function is a C++ non-static member function, +in which case the first parameter has index 2 to account for the implicit ``this`` ---------------- "has" ================ Comment at: lib/CodeGen/CGCall.cpp:4363 + } else if (AllocAlignParam && TargetDecl->hasAttr<AllocAlignAttr>()) + EmitAlignmentAssumption(Ret.getScalarVal(), AllocAlignParam); } ---------------- Your old code was fine, you just needed to get the value with CallArgs[index].second.getScalarVal() instead of IRCallArgs[index]. https://reviews.llvm.org/D29599 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits