Revert "Give external linkage and mangling to lambdas inside inline variables and variable templates."
To fix: runtime error: load of value 15, which is not a valid value for type 'clang::LVComputationKind'
This reverts commit r313827.
llvm-svn: 313856
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index 996ed3e..bbd7c4a 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -288,9 +288,7 @@
Normal,
DefaultArgument,
DataMember,
- StaticDataMember,
- InlineVariable,
- VariableTemplate
+ StaticDataMember
} Kind = Normal;
// Default arguments of member function parameters that appear in a class
@@ -305,14 +303,6 @@
} else if (VarDecl *Var = dyn_cast<VarDecl>(ManglingContextDecl)) {
if (Var->getDeclContext()->isRecord())
Kind = StaticDataMember;
- else if (Var->getMostRecentDecl()->isInline())
- Kind = InlineVariable;
- else if (Var->getDescribedVarTemplate())
- Kind = VariableTemplate;
- else if (auto *VTS = dyn_cast<VarTemplateSpecializationDecl>(Var)) {
- if (!VTS->isExplicitSpecialization())
- Kind = VariableTemplate;
- }
} else if (isa<FieldDecl>(ManglingContextDecl)) {
Kind = DataMember;
}
@@ -353,10 +343,6 @@
// -- the in-class initializers of class members
case DefaultArgument:
// -- default arguments appearing in class definitions
- case InlineVariable:
- // -- the initializers of inline variables
- case VariableTemplate:
- // -- the initializers of templated variables
return &ExprEvalContexts.back().getMangleNumberingContext(Context);
}