diff options
Diffstat (limited to 'clang/test/SemaCXX/decl-expr-ambiguity.cpp')
| -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 { }; |

