[PATCH] D67719: [clang] [Basic] Enable __has_feature(leak_sanitizer)
Michał Górny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 18 09:53:57 PDT 2019
mgorny created this revision.
mgorny added reviewers: krytarowski, eugenis, leonardchan, vitalybuka, phosek.
Add a 'leak_sanitizer' feature akin to existing '*_sanitizer' features
to let programmers switch code paths accounting for leak sanitizers
being enabled.
https://reviews.llvm.org/D67719
Files:
clang/include/clang/Basic/Features.def
Index: clang/include/clang/Basic/Features.def
===================================================================
--- clang/include/clang/Basic/Features.def
+++ clang/include/clang/Basic/Features.def
@@ -39,6 +39,8 @@
FEATURE(address_sanitizer,
LangOpts.Sanitize.hasOneOf(SanitizerKind::Address |
SanitizerKind::KernelAddress))
+FEATURE(leak_sanitizer,
+ LangOpts.Sanitize.has(SanitizerKind::Leak))
FEATURE(hwaddress_sanitizer,
LangOpts.Sanitize.hasOneOf(SanitizerKind::HWAddress |
SanitizerKind::KernelHWAddress))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67719.220696.patch
Type: text/x-patch
Size: 614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190918/ba5b2fd1/attachment.bin>
More information about the cfe-commits
mailing list