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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343591
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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) {