diff options
| author | Olivier Goffart <ogoffart@woboq.com> | 2015-08-20 13:11:14 +0000 |
|---|---|---|
| committer | Olivier Goffart <ogoffart@woboq.com> | 2015-08-20 13:11:14 +0000 |
| commit | 66be61ad4f3032495aa7fc29313bd81a0996b5ff (patch) | |
| tree | 8086eb0f3676e04760b0458d437dc6b8db9e9a42 /clang/test | |
| parent | 862b9b5239861f1991494057b779913869ee7b8d (diff) | |
| download | bcm5719-llvm-66be61ad4f3032495aa7fc29313bd81a0996b5ff.tar.gz bcm5719-llvm-66be61ad4f3032495aa7fc29313bd81a0996b5ff.zip | |
Fix crash with two typos in the arguments of a function
The problem is that the arguments are of TheCall are reset later
to the ones in Args, making TypoExpr put back. Some TypoExpr that have
already been diagnosed and will assert later in Sema::getTypoExprState
llvm-svn: 245560
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Sema/typo-correction.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/typo-correction.c b/clang/test/Sema/typo-correction.c index ff43064d5b7..4ef50570899 100644 --- a/clang/test/Sema/typo-correction.c +++ b/clang/test/Sema/typo-correction.c @@ -49,3 +49,9 @@ extern double cabs(_Complex double z); void fn1() { cabs(errij); // expected-error {{use of undeclared identifier 'errij'}} } + +extern long afunction(int); // expected-note {{'afunction' declared here}} +void fn2() { + f(THIS_IS_AN_ERROR, // expected-error {{use of undeclared identifier 'THIS_IS_AN_ERROR'}} + afunction(afunction_)); // expected-error {{use of undeclared identifier 'afunction_'; did you mean 'afunction'?}} +} |

