diff options
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/Lexer/coroutines.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Lexer/coroutines.cpp b/clang/test/Lexer/coroutines.cpp new file mode 100644 index 00000000000..86d5f969374 --- /dev/null +++ b/clang/test/Lexer/coroutines.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only %s +// RUN: %clang_cc1 -fcoroutines -DCORO -fsyntax-only %s + +#ifdef CORO +#define CORO_KEYWORD(NAME) _Static_assert(!__is_identifier(NAME), #NAME) +#else +#define CORO_KEYWORD(NAME) _Static_assert(__is_identifier(NAME), #NAME) +#endif + +CORO_KEYWORD(co_await); +CORO_KEYWORD(co_return); +CORO_KEYWORD(co_yield); |

