[PATCH] D28823: Enabled -fsanitize-address-use-after-scope for -DLLVM_USE_SANITIZER=Address
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 13:04:45 PST 2017
vitalybuka created this revision.
Herald added a subscriber: mgorny.
https://reviews.llvm.org/D28823
Files:
cmake/modules/HandleLLVMOptions.cmake
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -588,6 +588,9 @@
else()
message(FATAL_ERROR "LLVM_USE_SANITIZER is not supported on this platform.")
endif()
+ if (LLVM_USE_SANITIZER MATCHES "(Undefined;)?Address(;Undefined)?")
+ append("-fsanitize-address-use-after-scope" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ endif()
if (LLVM_USE_SANITIZE_COVERAGE)
append("-fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28823.84727.patch
Type: text/x-patch
Size: 633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170117/81658ec9/attachment.bin>
More information about the llvm-commits
mailing list