[PATCH] D42466: [Sema] Allow disabling typo correction when doing code completion.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 24 08:43:36 PST 2018
hokein abandoned this revision.
hokein added inline comments.
================
Comment at: lib/Sema/Sema.cpp:143
ArgumentPackSubstitutionIndex(-1), CurrentInstantiationScope(nullptr),
- DisableTypoCorrection(false), TyposCorrected(0), AnalysisWarnings(*this),
+ DisableTypoCorrection(
+ CodeCompleter ? CodeCompleter->disableTypoCorrection() : false),
----------------
ilya-biryukov wrote:
> 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?
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.
Repository:
rC Clang
https://reviews.llvm.org/D42466
More information about the cfe-commits
mailing list