From: Ted Kremenek Date: Thu, 4 Dec 2008 19:38:33 +0000 (+0000) Subject: Fix bug in attribute(nonnull) processing where not all of the parameter indices in... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5e883474796afd26e52a010cd9bf90374fa1915;p=clang Fix bug in attribute(nonnull) processing where not all of the parameter indices in nonnull(...) were actually processed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60546 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 2e6108cf0a..bff650db5f 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -313,7 +313,7 @@ static void HandleNonNullAttr(Decl *d, const AttributeList &Attr, Sema &S) { // The argument must be an integer constant expression. - Expr *Ex = static_cast(Attr.getArg(0)); + Expr *Ex = static_cast(*I); llvm::APSInt ArgNum(32); if (!Ex->isIntegerConstantExpr(ArgNum, S.Context)) { S.Diag(Attr.getLoc(), diag::err_attribute_argument_not_int)