aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-12-04 19:38:33 +0000
committerTed Kremenek <kremenek@apple.com>2008-12-04 19:38:33 +0000
commitf5e883474796afd26e52a010cd9bf90374fa1915 (patch)
tree5c1b3b5efe83f7df7bbcf597969f76f40148d227
parent3fa1fff997eb9119b922aa18934d0a5f7364a1d7 (diff)
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
-rw-r--r--lib/Sema/SemaDeclAttr.cpp2
1 files changed, 1 insertions, 1 deletions
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<Expr *>(Attr.getArg(0));
+ Expr *Ex = static_cast<Expr *>(*I);
llvm::APSInt ArgNum(32);
if (!Ex->isIntegerConstantExpr(ArgNum, S.Context)) {
S.Diag(Attr.getLoc(), diag::err_attribute_argument_not_int)