summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-06-26 18:41:36 +0000
committerAnders Carlsson <andersca@mac.com>2009-06-26 18:41:36 +0000
commit082acded4425ed6812c71f989ba91cf6b665d329 (patch)
tree6477a12f7c3cdb19bc4ec84396ef58af0e039f2f /clang/test
parenta720af1370deea007e5de644ac7a89c694ffe040 (diff)
downloadbcm5719-llvm-082acded4425ed6812c71f989ba91cf6b665d329.tar.gz
bcm5719-llvm-082acded4425ed6812c71f989ba91cf6b665d329.zip
Implement enough of the 'auto' keyword so we can claim to support N2546.
llvm-svn: 74307
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/auto-cxx0x.cpp5
-rw-r--r--clang/test/SemaCXX/auto-cxx98.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/auto-cxx0x.cpp b/clang/test/SemaCXX/auto-cxx0x.cpp
new file mode 100644
index 00000000000..33156ef23d2
--- /dev/null
+++ b/clang/test/SemaCXX/auto-cxx0x.cpp
@@ -0,0 +1,5 @@
+// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
+void f() {
+ auto int a; // expected-error{{cannot combine with previous 'auto' declaration specifier}}
+ int auto b; // expected-error{{cannot combine with previous 'int' declaration specifier}}
+}
diff --git a/clang/test/SemaCXX/auto-cxx98.cpp b/clang/test/SemaCXX/auto-cxx98.cpp
new file mode 100644
index 00000000000..14670cd6994
--- /dev/null
+++ b/clang/test/SemaCXX/auto-cxx98.cpp
@@ -0,0 +1,5 @@
+// RUN: clang-cc -fsyntax-only -verify %s -std=c++98
+void f() {
+ auto int a;
+ int auto b;
+}
OpenPOWER on IntegriCloud