Ensure all TypoExprs are diagnosed by the tree transform.
authorKaelyn Takata <rikka@google.com>
Thu, 20 Nov 2014 22:06:44 +0000 (22:06 +0000)
committerKaelyn Takata <rikka@google.com>
Thu, 20 Nov 2014 22:06:44 +0000 (22:06 +0000)
commit57e07c950d858229249b362c0ae3b49401e40b17
tree3bde032f120d1d77b17594a8f9684eb385f49fe3
parentb16e632c64666bfab88518b369ecaab989a4915d
Ensure all TypoExprs are diagnosed by the tree transform.

If there is more than one TypoExpr within the expr being transformed and
any but the last TypoExpr seen don't have any viable candidates, the
tree transform will be aborted early and the remaining TypoExprs are
never seen and hence never diagnosed. This adds a simple
RecursiveASTVisitor to find all of the TypoExprs to be diagnosed in the
case where typo correction of the entire expr fails (and the result of
the tree transform is an ExprError).

llvm-svn: 222465
clang/lib/Sema/SemaExprCXX.cpp
clang/test/SemaCXX/typo-correction-delayed.cpp
clang/test/SemaTemplate/crash-10438657.cpp