diff options
author | Gor Nishanov <GorNishanov@gmail.com> | 2017-05-23 05:25:31 +0000 |
---|---|---|
committer | Gor Nishanov <GorNishanov@gmail.com> | 2017-05-23 05:25:31 +0000 |
commit | 858db66427d9907e20879fc1dd01e1b840add2f3 (patch) | |
tree | f494d7ebe8b1ebcfd4bfb526fa11bd98d71160c8 /test/CodeGenCoroutines | |
parent | 2c7bb6c07235bcd3f74acee01d772fa6d5991c9f (diff) |
[coroutines] Skip over passthrough operator co_await
https://reviews.llvm.org/D31627
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCoroutines')
-rw-r--r-- | test/CodeGenCoroutines/coro-await.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGenCoroutines/coro-await.cpp b/test/CodeGenCoroutines/coro-await.cpp index dfeeba035f..1e2deaa8f5 100644 --- a/test/CodeGenCoroutines/coro-await.cpp +++ b/test/CodeGenCoroutines/coro-await.cpp @@ -271,3 +271,10 @@ extern "C" void EndlessLoop() { // CHECK-NOT: call void @_ZNSt12experimental16coroutine_traitsIJvEE12promise_type13final_suspendEv( // CHECK-NOT: call zeroext i1 @_ZN10final_susp11await_readyEv(%struct.final_susp* } + +// Verifies that we don't crash when awaiting on an lvalue. +// CHECK-LABEL: @_Z11AwaitLValuev( +void AwaitLValue() { + suspend_always lval; + co_await lval; +} |