Use hasAttr instead of getAttr for conditionals.
llvm-svn: 69021
This commit is contained in:
parent
0ca1660129
commit
4c0dc0e48a
|
@ -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(),
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue