mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 23:56:49 +00:00
[clang][rtsan] Add realtime_sanitizer to Features.def (#106650)
Allows us to introduce the scoped disabler in #106736
This commit is contained in:
parent
a6577791d4
commit
fb1494137e
@ -54,6 +54,8 @@ FEATURE(memtag_globals,
|
||||
FEATURE(xray_instrument, LangOpts.XRayInstrument)
|
||||
FEATURE(undefined_behavior_sanitizer,
|
||||
LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined))
|
||||
FEATURE(realtime_sanitizer,
|
||||
LangOpts.Sanitize.has(SanitizerKind::Realtime))
|
||||
FEATURE(coverage_sanitizer, LangOpts.SanitizeCoverage)
|
||||
FEATURE(assume_nonnull, true)
|
||||
FEATURE(attribute_analyzer_noreturn, true)
|
||||
|
12
clang/test/Lexer/has_feature_realtime_sanitizer.cpp
Normal file
12
clang/test/Lexer/has_feature_realtime_sanitizer.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
// RUN: %clang_cc1 -E -fsanitize=realtime %s -o - | FileCheck --check-prefix=CHECK-RTSAN %s
|
||||
// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-RTSAN %s
|
||||
|
||||
#if __has_feature(realtime_sanitizer)
|
||||
int RealtimeSanitizerEnabled();
|
||||
#else
|
||||
int RealtimeSanitizerDisabled();
|
||||
#endif
|
||||
|
||||
// CHECK-RTSAN: RealtimeSanitizerEnabled
|
||||
|
||||
// CHECK-NO-RTSAN: RealtimeSanitizerDisabled
|
Loading…
x
Reference in New Issue
Block a user