Index: cfe/trunk/lib/AST/StmtProfile.cpp =================================================================== --- cfe/trunk/lib/AST/StmtProfile.cpp +++ cfe/trunk/lib/AST/StmtProfile.cpp @@ -1277,7 +1277,6 @@ 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 @@ case OO_Subscript: return Stmt::ArraySubscriptExprClass; + + case OO_Coawait: + UnaryOp = UO_Coawait; + return Stmt::UnaryOperatorClass; } llvm_unreachable("Invalid overloaded operator expression"); Index: cfe/trunk/test/PCH/coroutines.cpp =================================================================== --- cfe/trunk/test/PCH/coroutines.cpp +++ cfe/trunk/test/PCH/coroutines.cpp @@ -66,6 +66,14 @@ co_return x; // checks coreturn_stmt with expr } +struct S {}; +S operator co_await(S) { return S(); } + +template +int f3(T x) { + co_await x; // checks dependent_coawait with overloaded co_await operator +} + #else // expected-no-diagnostics