This is an archive of the discontinued LLVM Phabricator instance.

[CompilerInstance] Fix weird condition on `createCodeCompletionConsumer`
ClosedPublic

Authored by JohnTitor on May 27 2022, 1:43 AM.

Details

Summary

This patch moves a (weird) condition to a more suitable place on createCodeCompletionConsumer

Fixes llvm#53545

Diff Detail

Event Timeline

JohnTitor created this revision.May 27 2022, 1:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2022, 1:43 AM
JohnTitor requested review of this revision.May 27 2022, 1:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2022, 1:43 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
JohnTitor edited the summary of this revision. (Show Details)May 27 2022, 1:54 AM
JohnTitor added reviewers: rsmith, jansvoboda11.
JohnTitor updated this revision to Diff 432526.May 27 2022, 4:59 AM

[CompilerInstance] Tweak the condition on createCodeCompletionConsumer

JohnTitor updated this revision to Diff 432527.May 27 2022, 5:00 AM

Fix the indention

jansvoboda11 accepted this revision.May 27 2022, 6:46 AM

Nice. This is the patch that makes the condition obsolete: D60871. You might also remove the else, since the first if now has an unconditional early return.

This revision is now accepted and ready to land.May 27 2022, 6:46 AM

The differential I linked doesn't contain the right diff. Here's the commit I meant to point out: 3a75330f573a31c7e0f7e27c5d34501c293673a5.