]> granicus.if.org Git - clang/commitdiff
Per offline discussion with Doug, don't perform typo correction when we have encounte...
authorTed Kremenek <kremenek@apple.com>
Wed, 6 Jan 2010 00:23:04 +0000 (00:23 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 6 Jan 2010 00:23:04 +0000 (00:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92809 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaLookup.cpp

index 1f2943cb1f294bdf833b76e1fae3b6da579ab71d..9ed15225b49acb82e38e5c7b2090a3a5c38a533c 100644 (file)
@@ -2199,6 +2199,10 @@ void TypoCorrectionConsumer::FoundDecl(NamedDecl *ND, NamedDecl *Hiding) {
 bool Sema::CorrectTypo(LookupResult &Res, Scope *S, const CXXScopeSpec *SS,
                        DeclContext *MemberContext, bool EnteringContext,
                        const ObjCObjectPointerType *OPT) {
+  
+  if (Diags.hasFatalErrorOccurred())
+    return false;
+  
   // We only attempt to correct typos for identifiers.
   IdentifierInfo *Typo = Res.getLookupName().getAsIdentifierInfo();
   if (!Typo)