diff options
author | Mike Stump <mrs@apple.com> | 2009-04-14 02:45:29 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-04-14 02:45:29 +0000 |
commit | f0c9083c04d9c7d7aa099813f06d339bdbb5eab9 (patch) | |
tree | 555b06656cb92c0fd84d60ae724163c404229915 | |
parent | 5466c7b0ca8ce662e2c0bc295cecba2b78d6957d (diff) |
Use hasAttr instead of getAttr for conditionals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69021 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index a1eb5c4e57..1db3b6ebc0 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -631,7 +631,7 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { if (VD && (VD->isBlockVarDecl() || isa<ParmVarDecl>(VD) || isa<ImplicitParamDecl>(VD))) { LValue LV; - bool GCable = VD->hasLocalStorage() && ! VD->getAttr<BlocksAttr>(); + bool GCable = VD->hasLocalStorage() && ! VD->hasAttr<BlocksAttr>(); if (VD->hasExternalStorage()) { LV = LValue::MakeAddr(CGM.GetAddrOfGlobalVar(VD), E->getType().getCVRQualifiers(), diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 73d2a5237a..7675d5a9d6 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1807,7 +1807,7 @@ bool Sema::CheckVariableDeclaration(VarDecl *NewVD, NamedDecl *PrevDecl, } if (NewVD->hasLocalStorage() && T.isObjCGCWeak() - && !NewVD->getAttr<BlocksAttr>()) + && !NewVD->hasAttr<BlocksAttr>()) Diag(NewVD->getLocation(), diag::warn_attribute_weak_on_local); bool isIllegalVLA = T->isVariableArrayType() && NewVD->hasGlobalStorage(); |