[clang-tools-extra] Re-add path normalization that was removed in 315561c86778 (PR #118718)

via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 4 15:56:24 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-tidy

Author: Mike Hommey (glandium)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/118718.diff


1 Files Affected:

- (modified) clang-tools-extra/clang-tidy/tool/run-clang-tidy.py (+4-1) 


``````````diff
diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
index f1b934f7139e94..d4cbcd2f564cbb 100755
--- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -522,7 +522,10 @@ async def main() -> None:
     # Load the database and extract all files.
     with open(os.path.join(build_path, db_path)) as f:
         database = json.load(f)
-    files = {os.path.abspath(os.path.join(e["directory"], e["file"])) for e in database}
+    files = {
+        os.path.normpath(os.path.abspath(os.path.join(e["directory"], e["file"])))
+        for e in database
+    }
     number_files_in_database = len(files)
 
     # Filter source files from compilation database.

``````````

</details>


https://github.com/llvm/llvm-project/pull/118718


More information about the cfe-commits mailing list