diff options
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/CodeCompleteConsumer.cpp | 20 | ||||
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 8 |
2 files changed, 6 insertions, 22 deletions
diff --git a/lib/Sema/CodeCompleteConsumer.cpp b/lib/Sema/CodeCompleteConsumer.cpp index 0ef9a15faa..52562f6b44 100644 --- a/lib/Sema/CodeCompleteConsumer.cpp +++ b/lib/Sema/CodeCompleteConsumer.cpp @@ -459,11 +459,6 @@ PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &SemaRef, } } } - - // Once we've printed the code-completion results, suppress remaining - // diagnostics. - // FIXME: Move this somewhere else! - SemaRef.PP.getDiagnostics().setSuppressAllDiagnostics(); } void @@ -478,11 +473,6 @@ PrintingCodeCompleteConsumer::ProcessOverloadCandidates(Sema &SemaRef, delete CCS; } } - - // Once we've printed the code-completion results, suppress remaining - // diagnostics. - // FIXME: Move this somewhere else! - SemaRef.PP.getDiagnostics().setSuppressAllDiagnostics(); } void @@ -599,11 +589,6 @@ CIndexCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &SemaRef, CCS->Serialize(OS); delete CCS; } - - // Once we've printed the code-completion results, suppress remaining - // diagnostics. - // FIXME: Move this somewhere else! - SemaRef.PP.getDiagnostics().setSuppressAllDiagnostics(); } void @@ -619,9 +604,4 @@ CIndexCodeCompleteConsumer::ProcessOverloadCandidates(Sema &SemaRef, CCS->Serialize(OS); delete CCS; } - - // Once we've printed the code-completion results, suppress remaining - // diagnostics. - // FIXME: Move this somewhere else! - SemaRef.PP.getDiagnostics().setSuppressAllDiagnostics(); } diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 036ae7e869..1685cd572e 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -843,6 +843,7 @@ static void AddFunctionSpecifiers(Action::CodeCompletionContext CCC, case Action::CCC_Statement: case Action::CCC_ForInit: case Action::CCC_Condition: + case Action::CCC_RecoveryInFunction: break; } } @@ -994,6 +995,7 @@ static void AddOrdinaryNameResults(Action::CodeCompletionContext CCC, AddObjCVisibilityResults(SemaRef.getLangOptions(), Results, true); break; + case Action::CCC_RecoveryInFunction: case Action::CCC_Statement: { Results.AddResult(Result("typedef")); @@ -1925,6 +1927,10 @@ void Sema::CodeCompleteOrdinaryName(Scope *S, case CCC_Condition: Results.setFilter(&ResultBuilder::IsOrdinaryName); break; + + case CCC_RecoveryInFunction: + // Unfiltered + break; } CodeCompletionDeclConsumer Consumer(Results, CurContext); @@ -3079,8 +3085,6 @@ void Sema::CodeCompleteObjCClassMessage(Scope *S, TypeTy *Receiver, } Results.ExitScope(); - - // This also suppresses remaining diagnostics. HandleCodeCompleteResults(this, CodeCompleter, Results.data(),Results.size()); } |