diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 8ba84fe86a..ec92470ae1 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -16,6 +16,7 @@ #include "clang/Sema/Scope.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Lookup.h" +#include "clang/Sema/ScopeInfo.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" #include "clang/AST/ASTMutationListener.h" @@ -9223,6 +9224,9 @@ void Sema::AddCXXDirectInitializerToDecl(Decl *RealDecl, return; } + if (VDecl->hasLocalStorage()) + getCurFunction()->setHasBranchProtectedScope(); + bool IsDependent = false; for (unsigned I = 0, N = Exprs.size(); I != N; ++I) { if (DiagnoseUnexpandedParameterPack(Exprs.get()[I], UPPC_Expression)) { |