[Sema] Fix typos handling in an overloadable call.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Mon, 8 May 2017 16:05:54 +0000 (16:05 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Mon, 8 May 2017 16:05:54 +0000 (16:05 +0000)
commitf16634c884b6e3aa1a573d0a1f4727103ca8ccf8
treea4b1859e22b8134d9576ce5a3f8b52d12963854f
parent0fbdaa1f0c136ce8921beca6a9dee72c70134b1c
[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!

llvm-svn: 302435
clang/lib/Sema/SemaExpr.cpp
clang/test/Sema/typo-correction.c