aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/direct-initializer.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-07 10:21:57 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-07 10:21:57 +0000
commit3f2a8a0de575b02408384f92914729b7518d4e77 (patch)
treefc4553aeec4cbc1ca9f8dea5807a6f13723ccc81 /test/SemaCXX/direct-initializer.cpp
parentbb316c5b561a2d8a31ead6800e05ca923a255cb8 (diff)
In ParseParenDeclarator match "D.setGroupingParens(true);" with another setGroupingParens call after the ')' is parsed.
Fixes this bug: int (x)(0); // error, expected function declarator where the '(0)' initializer is git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57241 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/direct-initializer.cpp')
-rw-r--r--test/SemaCXX/direct-initializer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/SemaCXX/direct-initializer.cpp b/test/SemaCXX/direct-initializer.cpp
index bb0aab6500..c756e473dd 100644
--- a/test/SemaCXX/direct-initializer.cpp
+++ b/test/SemaCXX/direct-initializer.cpp
@@ -1,8 +1,10 @@
-// RUN: clang -fsyntax-only %s
+// RUN: clang -fsyntax-only -verify %s
int x(1);
+int (x2)(1);
void f() {
int x(1);
+ int (x2)(1); // expected-warning {{statement was disambiguated as declaration}}
for (int x(1);;) {}
}