[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:33 PDT 2018


This revision was automatically updated to reflect the committed changes.
hokein marked an inline comment as done.
Closed by commit rC343591: [Preprocessor] Hide include typo correction behind SpellChecking. (authored by hokein, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D52778?vs=167939&id=167941#toc

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.167941.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181002/b114a7ff/attachment.bin>


More information about the cfe-commits mailing list