[all-commits] [llvm/llvm-project] 51d938: Fix bugs when an included file name is typo correc...

Nico Weber via All-commits all-commits at lists.llvm.org
Fri May 8 10:34:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 51d938bc94433b03cfbe60758642dbe70269ae3b
      https://github.com/llvm/llvm-project/commit/51d938bc94433b03cfbe60758642dbe70269ae3b
  Author: Nico Weber <thakis at chromium.org>
  Date:   2020-05-08 (Fri, 08 May 2020)

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

  Log Message:
  -----------
  Fix bugs when an included file name is typo corrected.

D52774 fixed a bug with typo correction of includes, but didn't add
a test.

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.

Differential Revision: https://reviews.llvm.org/D79595




More information about the All-commits mailing list