diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index a1eb5c4e577..1db3b6ebc06 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/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/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 73d2a5237aa..7675d5a9d69 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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(); |