diff options
author | Kaelyn Takata <rikka@google.com> | 2015-01-21 00:04:19 +0000 |
---|---|---|
committer | Kaelyn Takata <rikka@google.com> | 2015-01-21 00:04:19 +0000 |
commit | 2fd6030616bedd66990e39b7104f4f2e250d81cc (patch) | |
tree | 1dd89782d73d71ee6bcbe75445d9595a071864e6 /test/SemaCXX/typo-correction-delayed.cpp | |
parent | f00d8b0a11be0325bfa4573cd7f0c98cf231016f (diff) |
Correct all typos in the initialization arguments, even if one could not
be corrected.
This fixes PR22250, which exposed the bug where if there's more than one
TypoExpr in the arguments, once one failed to be corrected none of the
TypoExprs after it would be handled at all thanks to an early return.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r-- | test/SemaCXX/typo-correction-delayed.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCXX/typo-correction-delayed.cpp b/test/SemaCXX/typo-correction-delayed.cpp index 454a8b365c..f09dd330db 100644 --- a/test/SemaCXX/typo-correction-delayed.cpp +++ b/test/SemaCXX/typo-correction-delayed.cpp @@ -167,3 +167,11 @@ void MovePointer(Pointer &Click, int x, int y) { // expected-note 2 {{'Click' d click.set_xpos(x); // expected-error {{use of undeclared identifier 'click'; did you mean 'Click'?}} click.set_ypos(x); // expected-error {{use of undeclared identifier 'click'; did you mean 'Click'?}} } + +namespace PR22250 { +// expected-error@+4 {{use of undeclared identifier 'size_t'; did you mean 'sizeof'?}} +// expected-error-re@+3 {{use of undeclared identifier 'y'{{$}}}} +// expected-error-re@+2 {{use of undeclared identifier 'z'{{$}}}} +// expected-error@+1 {{expected ';' after top level declarator}} +int getenv_s(size_t *y, char(&z)) {} +} |