r250992 - [coroutines] Add forgotten test for lexing coroutines keywords.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 22:21:13 PDT 2015


Author: rsmith
Date: Thu Oct 22 00:21:12 2015
New Revision: 250992

URL: http://llvm.org/viewvc/llvm-project?rev=250992&view=rev
Log:
[coroutines] Add forgotten test for lexing coroutines keywords.

Added:
    cfe/trunk/test/Lexer/coroutines.cpp

Added: cfe/trunk/test/Lexer/coroutines.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/coroutines.cpp?rev=250992&view=auto
==============================================================================
--- cfe/trunk/test/Lexer/coroutines.cpp (added)
+++ cfe/trunk/test/Lexer/coroutines.cpp Thu Oct 22 00:21:12 2015
@@ -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);




More information about the cfe-commits mailing list