bool isVM = T->isVariablyModifiedType();
if (isVM || NewVD->hasAttr<CleanupAttr>() ||
- NewVD->hasAttr<BlocksAttr>() ||
- (LangOpts.CPlusPlus && NewVD->hasLocalStorage()))
+ NewVD->hasAttr<BlocksAttr>())
setFunctionHasBranchProtectedScope();
if ((isVM && NewVD->hasLinkage()) ||
return;
}
+ if (getLangOptions().CPlusPlus && VDecl->hasLocalStorage())
+ setFunctionHasBranchProtectedScope();
+
// Take ownership of the expression, now that we're sure we have somewhere
// to put it.
Expr *Init = init.takeAs<Expr>();
// program is ill-formed.
// FIXME: DPG thinks it is very fishy that C++0x disables this.
} else {
+ // Check for jumps past the implicit initializer. C++0x
+ // clarifies that this applies to a "variable with automatic
+ // storage duration", not a "local variable".
+ if (getLangOptions().CPlusPlus && Var->hasLocalStorage())
+ setFunctionHasBranchProtectedScope();
+
InitializedEntity Entity = InitializedEntity::InitializeVariable(Var);
InitializationKind Kind
= InitializationKind::CreateDefault(Var->getLocation());