diff options
| author | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2019-11-26 13:13:47 -0500 |
|---|---|---|
| committer | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2019-11-26 21:43:29 -0500 |
| commit | ded249049429a26d3748926c04bd7169f0170714 (patch) | |
| tree | 594f6b7e702ab02b2d360ad662bae81c94c8ff6b /clang/lib | |
| parent | 350565dbc06d32096ae3ade7bc3d2e58ac654273 (diff) | |
| download | bcm5719-llvm-ded249049429a26d3748926c04bd7169f0170714.tar.gz bcm5719-llvm-ded249049429a26d3748926c04bd7169f0170714.zip | |
Workaround for EvalInfo ctor for MSVC 2017
Current EvalInfo ctor causes EnableNewConstInterp to be true even though
it is supposed to be false on MSVC 2017. This is because a virtual function
getLangOpts() is called in member initializer lists, whereas on MSVC
member ctors are called before function virtual function pointers are
initialized.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D70729
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 79659261388..eec9bbdaef8 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -921,10 +921,10 @@ namespace { EvalInfo(const ASTContext &C, Expr::EvalStatus &S, EvaluationMode Mode) : Ctx(const_cast<ASTContext &>(C)), EvalStatus(S), CurrentCall(nullptr), CallStackDepth(0), NextCallIndex(1), - StepsLeft(getLangOpts().ConstexprStepLimit), - ForceNewConstInterp(getLangOpts().ForceNewConstInterp), + StepsLeft(C.getLangOpts().ConstexprStepLimit), + ForceNewConstInterp(C.getLangOpts().ForceNewConstInterp), EnableNewConstInterp(ForceNewConstInterp || - getLangOpts().EnableNewConstInterp), + C.getLangOpts().EnableNewConstInterp), BottomFrame(*this, SourceLocation(), nullptr, nullptr, nullptr), EvaluatingDecl((const ValueDecl *)nullptr), EvaluatingDeclValue(nullptr), HasActiveDiagnostic(false), |

