[llvm-bugs] [Bug 46992] New: clang-format breaks symlinks

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 4 10:37:07 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46992

            Bug ID: 46992
           Summary: clang-format breaks symlinks
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: srhines at google.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

This comes from an Android bug about running clang-format on a symlinked file
(in this case, one named DisplayId.h that is pointing to a different
DisplayId.h).

diff --git a/libs/ui/include_vndk/ui/DisplayId.h
b/libs/ui/include_vndk/ui/DisplayId.h
index 73c9fe8d689..ec31ce4a306 120000
--- a/libs/ui/include_vndk/ui/DisplayId.h
+++ b/libs/ui/include_vndk/ui/DisplayId.h
@@ -1 +1 @@
-../../include/ui/DisplayId.h
\ No newline at end of file
+../../ include / ui / DisplayId.h
\ No newline at end of file

Ideally, clang-format would detect that it is running on a symlink and not
adjust the file at all.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200804/b911ae9e/attachment-0001.html>


More information about the llvm-bugs mailing list