diff options
author | Anastasia Stulova <anastasia.stulova@arm.com> | 2017-05-08 16:05:54 +0000 |
---|---|---|
committer | Anastasia Stulova <anastasia.stulova@arm.com> | 2017-05-08 16:05:54 +0000 |
commit | 6cbdcab82174e2a78c3a6953c8d1151bc42bb7c6 (patch) | |
tree | 1868bf28231be281aa7aee11d10a5259b328970a /test/Sema | |
parent | 6878143d92cd036e9916ff853b8bc522e6e118b7 (diff) |
[Sema] Fix typos handling in an overloadable call.
In C typos in arguments in a call of an overloadable function lead
to a failure of construction of CallExpr and following recovery does
not handle created delayed typos. This causes an assertion fail in
Sema::~Sema since Sema::DelayedTypos remains not empty.
The patch fixes that behavior by handling a call with arguments
having dependant types in the way that C++ does.
Differential Revision: https://reviews.llvm.org/D31764
Patch by Dmitry Borisenkov!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302435 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema')
-rw-r--r-- | test/Sema/typo-correction.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/typo-correction.c b/test/Sema/typo-correction.c index 59f022dfe5..78007015dc 100644 --- a/test/Sema/typo-correction.c +++ b/test/Sema/typo-correction.c @@ -80,3 +80,10 @@ int h() { g(x, 5 ? z : 0); // expected-error 2 {{use of undeclared identifier}} (x, 5 ? z : 0); // expected-error 2 {{use of undeclared identifier}} } + +__attribute__((overloadable)) void func_overloadable(int); +__attribute__((overloadable)) void func_overloadable(float); + +void overloadable_callexpr(int arg) { + func_overloadable(ar); //expected-error{{use of undeclared identifier}} +} |