[compiler-rt] [rtsan] Add basic test for c compilation (PR #107717)

via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 7 13:29:41 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Chris Apple (cjappl)

<details>
<summary>Changes</summary>

I was reminded of https://github.com/realtime-sanitizer/radsan/issues/25, where we were including C++ code that was never linked in C.

Adding this test to ensure that we don't break this functionality in the future

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


1 Files Affected:

- (modified) compiler-rt/test/rtsan/basic.cpp (+1) 


``````````diff
diff --git a/compiler-rt/test/rtsan/basic.cpp b/compiler-rt/test/rtsan/basic.cpp
index c7cbfcda31562e..f4075bb27e4f91 100644
--- a/compiler-rt/test/rtsan/basic.cpp
+++ b/compiler-rt/test/rtsan/basic.cpp
@@ -1,4 +1,5 @@
 // RUN: %clangxx -fsanitize=realtime %s -o %t
+// RUN: %clang -fsanitize=realtime %s -o %t
 // RUN: not %run %t 2>&1 | FileCheck %s
 // UNSUPPORTED: ios
 

``````````

</details>


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


More information about the llvm-commits mailing list