summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-16 04:18:29 +0000
committerChris Lattner <sabre@nondot.org>2007-07-16 04:18:29 +0000
commit539007a78a23349130794e94da6ef7f3464c4535 (patch)
treea2ef26aa8e1af90c5474f9a59ab98946082d5c7c /clang/test/Lexer
parent640fd5124d372aa5997af1d7626bb658b858ee6c (diff)
downloadbcm5719-llvm-539007a78a23349130794e94da6ef7f3464c4535.tar.gz
bcm5719-llvm-539007a78a23349130794e94da6ef7f3464c4535.zip
Add support for C++'0x keywords, patch by Doug Gregor
llvm-svn: 39897
Diffstat (limited to 'clang/test/Lexer')
-rw-r--r--clang/test/Lexer/cxx0x_keyword.cpp2
-rw-r--r--clang/test/Lexer/cxx0x_keyword_as_cxx98.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Lexer/cxx0x_keyword.cpp b/clang/test/Lexer/cxx0x_keyword.cpp
new file mode 100644
index 00000000000..f3a8a7add28
--- /dev/null
+++ b/clang/test/Lexer/cxx0x_keyword.cpp
@@ -0,0 +1,2 @@
+// RUN: clang -parse-ast-check -std=c++0x %s 2>&1
+int static_assert; /* expected-error {{expected identifier or '('}}} */
diff --git a/clang/test/Lexer/cxx0x_keyword_as_cxx98.cpp b/clang/test/Lexer/cxx0x_keyword_as_cxx98.cpp
new file mode 100644
index 00000000000..6700dcb1827
--- /dev/null
+++ b/clang/test/Lexer/cxx0x_keyword_as_cxx98.cpp
@@ -0,0 +1,2 @@
+// RUN: clang %s -fsyntax-only
+int static_assert;
OpenPOWER on IntegriCloud