[PATCH] D52778: [Preprocessor] Hide include typo correction behind SpellChecking.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 2 07:02:43 PDT 2018


hokein updated this revision to Diff 167939.
hokein added a comment.

Fix review comment.


Repository:
  rC Clang

https://reviews.llvm.org/D52778

Files:
  lib/Lex/PPDirectives.cpp


Index: lib/Lex/PPDirectives.cpp
===================================================================
--- lib/Lex/PPDirectives.cpp
+++ lib/Lex/PPDirectives.cpp
@@ -1888,7 +1888,7 @@
       // 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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52778.167939.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181002/4579fa86/attachment.bin>


More information about the cfe-commits mailing list