[cfe-commits] r60546 - /cfe/trunk/lib/Sema/SemaDeclAttr.cpp

Ted Kremenek kremenek at apple.com
Thu Dec 4 11:38:34 PST 2008


Author: kremenek
Date: Thu Dec  4 13:38:33 2008
New Revision: 60546

URL: http://llvm.org/viewvc/llvm-project?rev=60546&view=rev
Log:
Fix bug in attribute(nonnull) processing where not all of the parameter indices in nonnull(...) were actually processed.

Modified:
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=60546&r1=60545&r2=60546&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Thu Dec  4 13:38:33 2008
@@ -313,7 +313,7 @@
     
     
     // 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)





More information about the cfe-commits mailing list