diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-31 00:47:41 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-31 00:47:41 +0000 |
commit | 6fff5c412be27c1be4612449ed2f4d660f4f9421 (patch) | |
tree | cf4d0d83e6f219283be914ba82867daa21e90a1c /clang/lib/AST/StmtProfile.cpp | |
parent | 9164b9b16e48092162758eef0cf6accf6d210add (diff) | |
download | bcm5719-llvm-6fff5c412be27c1be4612449ed2f4d660f4f9421.tar.gz bcm5719-llvm-6fff5c412be27c1be4612449ed2f4d660f4f9421.zip |
[coroutines] Fix handling of dependent co_await in StmtProfiler.
Fix "Invalid operator call kind" error (llvm_unreachable) in
DecodeOperatorCall when profiling a dependent co_await.
Patch by Victor Zverovich!
Differential Revision: https://reviews.llvm.org/D50002
llvm-svn: 338343
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 34175bf9fe1..15653c4fd83 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -1277,7 +1277,6 @@ static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S, case OO_Arrow: case OO_Call: case OO_Conditional: - case OO_Coawait: case NUM_OVERLOADED_OPERATORS: llvm_unreachable("Invalid operator call kind"); @@ -1449,6 +1448,10 @@ static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S, case OO_Subscript: return Stmt::ArraySubscriptExprClass; + + case OO_Coawait: + UnaryOp = UO_Coawait; + return Stmt::UnaryOperatorClass; } llvm_unreachable("Invalid overloaded operator expression"); |