aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx0x-decl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-19 21:33:05 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-19 21:33:05 +0000
commit0706df40064d4d7559b4304af79d519033414b84 (patch)
treea746b692d4ae341fe5402dfc52efc808dd0c6aea /test/Parser/cxx0x-decl.cpp
parente7d7c39be90bf654a8da0f53f6682d965426d081 (diff)
Improve the diagnostic when a comma ends up at the end of a declarator group
instead of a semicolon (as sometimes happens during refactorings). When such a comma is seen at the end of a line, and is followed by something which can't possibly be a declarator (or even something which might be a plausible typo for a declarator), suggest that a semicolon was intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx0x-decl.cpp')
-rw-r--r--test/Parser/cxx0x-decl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Parser/cxx0x-decl.cpp b/test/Parser/cxx0x-decl.cpp
new file mode 100644
index 0000000000..73aa3fdc40
--- /dev/null
+++ b/test/Parser/cxx0x-decl.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -verify -fsyntax-only -std=c++0x %s
+
+// Make sure we know these are legitimate commas and not typos for ';'.
+namespace Commas {
+ int a,
+ b [[ ]],
+ c alignas(double);
+}