forked from OSchip/llvm-project
[Preprocessor] Hide include typo correction behind SpellChecking.
Summary: Similar to Sema typo correction, the Preprocessor typo correction should also be hidden behind the SpellChecking flag. Reviewers: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52778 llvm-svn: 343591
This commit is contained in:
parent
51be55d0ec
commit
dea577191c
|
@ -1888,7 +1888,7 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc,
|
|||
// Check for likely typos due to leading or trailing non-isAlphanumeric
|
||||
// characters
|
||||
StringRef OriginalFilename = Filename;
|
||||
if (!File) {
|
||||
if (LangOpts.SpellChecking && !File) {
|
||||
// A heuristic to correct a typo file name by removing leading and
|
||||
// trailing non-isAlphanumeric characters.
|
||||
auto CorrectTypoFilename = [](llvm::StringRef Filename) {
|
||||
|
|
Loading…
Reference in New Issue