diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-07-30 21:42:05 +0000 | 
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-07-30 21:42:05 +0000 | 
| commit | 711ceba5abae8b2adfced417b31c9ce018ca66c1 (patch) | |
| tree | f8fb0b521c3c3ee78fec27a3750c9ab9a7c364af /clang/test | |
| parent | 943c4404555120ccf87d2f23807104e7cbf04439 (diff) | |
| download | bcm5719-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.cpp | 5 | 
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 { }; | 

