[clang] [llvm] [Clang] Add `-fsanitize-prefix-map` for remapping source paths in sanitizer metadata (PR #186908)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 16 15:58:31 PDT 2026


=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>,
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>,
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>,
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>,
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>,
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/186908 at github.com>


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- clang/test/CodeGen/asan-prefix-map.cpp clang/test/CodeGen/ubsan-prefix-map.cpp clang/test/Driver/fsanitize-prefix-map.cpp clang/include/clang/Basic/CodeGenOptions.h clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGExpr.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Frontend/CompilerInvocation.cpp llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index c762ec883..7ffa4df97 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -2817,9 +2817,9 @@ GlobalVariable *ModuleAddressSanitizer::getOrCreateModuleName() {
       }
     }
 
-    ModuleName = createPrivateGlobalForString(M, ModuleNameStr,
-                                              /*AllowMerging*/ false,
-                                              genName("module"));
+    ModuleName =
+        createPrivateGlobalForString(M, ModuleNameStr,
+                                     /*AllowMerging*/ false, genName("module"));
   }
   return ModuleName;
 }

``````````

</details>


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


More information about the cfe-commits mailing list