From 55eb8442598e3f16415f3cd42e834a0e77726623 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 16 Aug 2017 00:06:07 +0000 Subject: [PATCH] Add missing test for warning added in r310803. llvm-svn: 310978 --- clang/test/Lexer/cxx2a_keyword_as_cxx17.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 clang/test/Lexer/cxx2a_keyword_as_cxx17.cpp diff --git a/clang/test/Lexer/cxx2a_keyword_as_cxx17.cpp b/clang/test/Lexer/cxx2a_keyword_as_cxx17.cpp new file mode 100644 index 000000000000..c6a821be0ea7 --- /dev/null +++ b/clang/test/Lexer/cxx2a_keyword_as_cxx17.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 %s -verify -fsyntax-only -Wc++2a-compat -std=c++17 + +#define concept constexpr bool +template +concept x = 0; +#undef concept + +int concept = 0; // expected-warning {{'concept' is a keyword in C++2a}} +int requires = 0; // expected-warning {{'requires' is a keyword in C++2a}}