summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-07-30 21:42:05 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-07-30 21:42:05 +0000
commit711ceba5abae8b2adfced417b31c9ce018ca66c1 (patch)
treef8fb0b521c3c3ee78fec27a3750c9ab9a7c364af /clang/test
parent943c4404555120ccf87d2f23807104e7cbf04439 (diff)
downloadbcm5719-llvm-711ceba5abae8b2adfced417b31c9ce018ca66c1.tar.gz
bcm5719-llvm-711ceba5abae8b2adfced417b31c9ce018ca66c1.zip
Extend the ',' versus ';' diagnostic for -Wvexing-parse to cover the with-arguments case as well as the no-arguments case.
llvm-svn: 160999
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/decl-expr-ambiguity.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/decl-expr-ambiguity.cpp b/clang/test/SemaCXX/decl-expr-ambiguity.cpp
index 7ee699c1a8b..0980c40cbfd 100644
--- a/clang/test/SemaCXX/decl-expr-ambiguity.cpp
+++ b/clang/test/SemaCXX/decl-expr-ambiguity.cpp
@@ -49,6 +49,7 @@ struct RAII {
};
void func();
+void func2(short);
namespace N {
struct S;
@@ -59,6 +60,10 @@ namespace N {
S s(); // expected-warning {{function declaration}}
}
+ void nonEmptyParens() {
+ int f = 0, // g = 0; expected-note {{change this ',' to a ';' to call 'func2'}}
+ func2(short(f)); // expected-warning {{function declaration}} expected-note {{add a pair of parentheses}}
+ }
}
class C { };
OpenPOWER on IntegriCloud