This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Allow disabling typo correction when doing code completion.
AbandonedPublic

Authored by hokein on Jan 24 2018, 2:43 AM.

Details

Reviewers
ilya-biryukov

Diff Detail

Event Timeline

hokein created this revision.Jan 24 2018, 2:43 AM
ilya-biryukov added inline comments.Jan 24 2018, 6:40 AM
lib/Sema/Sema.cpp
143

It seems weird that typo-correction is only controlled by CodeCompleter for all of Sema.
I wonder whether putting that into FrontendOptions makes more sense. WDYT?

hokein abandoned this revision.Jan 24 2018, 8:42 AM
hokein added inline comments.
lib/Sema/Sema.cpp
143

Yeah, it is weird.

After looking through the code of Sema, modifying DisableTypoCorrection is not the right way - as this method variable is controlled by Sema internally (it will change the value back and forth).

Fortunately I figured out clang already provides a way to control the typo correction. We don't need this patch. Sorry for the noise.