diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-16 19:53:22 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-16 19:53:22 +0000 |
| commit | 2e3ed4a852d07ef2d329fbb391a8d1c5bec337d2 (patch) | |
| tree | fdc1bc03d6d9c9229e0e06df02585afff0c0c381 /clang/lib/Sema/Sema.cpp | |
| parent | 234eda563df3c207ed641c0ee550d73e10577d82 (diff) | |
| download | bcm5719-llvm-2e3ed4a852d07ef2d329fbb391a8d1c5bec337d2.tar.gz bcm5719-llvm-2e3ed4a852d07ef2d329fbb391a8d1c5bec337d2.zip | |
Stop abusing SuppressAllDiagnostics when speculatively determining
whether an expression would be valid during error recovery.
llvm-svn: 369145
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
| -rw-r--r-- | clang/lib/Sema/Sema.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index e8bad88aee6..89e7d4c9e6d 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -1929,11 +1929,9 @@ bool Sema::tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy, // member templates with defaults/deduction of template arguments, overloads // with default arguments, etc. if (IsMemExpr && !E.isTypeDependent()) { - bool Suppress = getDiagnostics().getSuppressAllDiagnostics(); - getDiagnostics().setSuppressAllDiagnostics(true); + Sema::TentativeAnalysisScope Trap(*this); ExprResult R = BuildCallToMemberFunction(nullptr, &E, SourceLocation(), None, SourceLocation()); - getDiagnostics().setSuppressAllDiagnostics(Suppress); if (R.isUsable()) { ZeroArgCallReturnTy = R.get()->getType(); return true; |

