]> granicus.if.org Git - clang/commit
Fix a typo correction crash when resolving ambiguous corrections.
authorKaelyn Takata <rikka@google.com>
Thu, 25 Jun 2015 23:47:39 +0000 (23:47 +0000)
committerKaelyn Takata <rikka@google.com>
Thu, 25 Jun 2015 23:47:39 +0000 (23:47 +0000)
commit428bcf580b2c70c44da536e5f075c4d895ee3c3e
treee544dab4bcc923c0f1020b88cd02f740da146ce5
parent376b838032b355301f5ec068217f3c87731e6068
Fix a typo correction crash when resolving ambiguous corrections.

In certain cases, the tree transform would introduce new TypoExprs while
trying one of the corrections, invalidating the unique_ptr in the state
reference, and also causing a TypoExpr to exist that will never be
corrected since it doesn't exist in the final corrected expression. The
simple solution to both problems is to temporarily disable typo
correction while handling potentially ambiguous typo corrections.

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