]> granicus.if.org Git - clang/commit
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)
commitfeea241eacd2e89751d297322fa74c7ce239d2e4
tree9ca68cabc0ee1f8eb96ee6d6cd89059a56f0bd34
parentb11b40a67ef9847447d3066fad06698dd9c317d2
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222465 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExprCXX.cpp
test/SemaCXX/typo-correction-delayed.cpp
test/SemaTemplate/crash-10438657.cpp