[coroutines] Add forgotten test for lexing coroutines keywords.

llvm-svn: 250992
This commit is contained in:
Richard Smith 2015-10-22 05:21:12 +00:00
parent 9be594e36d
commit f8bdb0a9e4
1 changed files with 12 additions and 0 deletions

View File

@ -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);