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: unassignedclangb...@nondot.org
          Reporter: srhi...@google.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to