summaryrefslogtreecommitdiff
path: root/cc/sanitize.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/sanitize.go')
-rw-r--r--cc/sanitize.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 9ceb1c8a0..6329e9769 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -1113,12 +1113,15 @@ func (sanitize *sanitize) isSanitizerExplicitlyDisabled(t SanitizerType) bool {
// indirectly (via a mutator) sets the bool ptr to true, and you can't
// distinguish between the cases. It isn't needed though - both cases can be
// treated identically.
-func (sanitize *sanitize) isSanitizerEnabled(t SanitizerType) bool {
- if sanitize == nil {
+func (s *sanitize) isSanitizerEnabled(t SanitizerType) bool {
+ if s == nil {
+ return false
+ }
+ if proptools.Bool(s.Properties.SanitizeMutated.Never) {
return false
}
- sanitizerVal := sanitize.getSanitizerBoolPtr(t)
+ sanitizerVal := s.getSanitizerBoolPtr(t)
return sanitizerVal != nil && *sanitizerVal == true
}