[PATCH] D79595: Fix bugs when an included file name is typo corrected.

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 7 13:35:48 PDT 2020


thakis created this revision.
thakis added a reviewer: hans.

D52774 <https://reviews.llvm.org/D52774> fixed a bug with typo correction of includes, but didn't add
a test.

D65907 <https://reviews.llvm.org/D65907> then broke recovery of typo correction of includes again,
because it extracted the code that writes to Filename to a separate
function that took the parameter not by reference.

Fix that, and also don't repeat the slash normalization computation
and fix both lookup and regular file name after recovery.


https://reviews.llvm.org/D79595

Files:
  clang/include/clang/Lex/Preprocessor.h
  clang/lib/Lex/PPDirectives.cpp
  clang/test/Lexer/case-insensitive-include-pr31836.sh
  clang/test/Lexer/case-insensitive-include-win.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79595.262741.patch
Type: text/x-patch
Size: 5124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200507/6b155486/attachment.bin>


More information about the cfe-commits mailing list