[all-commits] [llvm/llvm-project] 35ab2a: Fix a buglet in remove_dots().

Reid Kleckner via All-commits all-commits at lists.llvm.org
Thu Jun 2 11:07:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 35ab2a11bb55c39ef9fe389aeacc14bb55c5a12d
      https://github.com/llvm/llvm-project/commit/35ab2a11bb55c39ef9fe389aeacc14bb55c5a12d
  Author: Paul Pluzhnikov <ppluzhnikov at google.com>
  Date:   2022-06-02 (Thu, 02 Jun 2022)

  Changed paths:
    M clang/unittests/Basic/FileManagerTest.cpp
    M clang/unittests/Frontend/PCHPreambleTest.cpp
    M llvm/lib/Support/Path.cpp
    M llvm/unittests/Support/Path.cpp
    M llvm/unittests/Support/VirtualFileSystemTest.cpp

  Log Message:
  -----------
  Fix a buglet in remove_dots().

The function promises to canonicalize the path, but neglected to do so
for the root component.

For example, calling remove_dots("/tmp/foo.c", Style::windows_backslash)
resulted in "/tmp\foo.c". Now it produces "\tmp\foo.c".

Also fix FIXME in the corresponding test.

Reviewed By: rnk

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




More information about the All-commits mailing list