Add AUTO_UNINITIALIZE as another option for trivial initialization.
This lets us test uninitialized variables even if we change the defaults for -ftrivial-auto-var-init. Bug: 131390872 Test: AUTO_UNINITIALIZE=true m Change-Id: I2b4473a0547dc9c4d9f081d8af2d283f17f66f7a
This commit is contained in:
parent
55f3001447
commit
797e1959e3
|
@ -166,6 +166,8 @@ func init() {
|
||||||
flags = append(flags, "-ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang")
|
flags = append(flags, "-ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang")
|
||||||
} else if ctx.Config().IsEnvTrue("AUTO_PATTERN_INITIALIZE") {
|
} else if ctx.Config().IsEnvTrue("AUTO_PATTERN_INITIALIZE") {
|
||||||
flags = append(flags, "-ftrivial-auto-var-init=pattern")
|
flags = append(flags, "-ftrivial-auto-var-init=pattern")
|
||||||
|
} else if ctx.Config().IsEnvTrue("AUTO_UNINITIALIZE") {
|
||||||
|
flags = append(flags, "-ftrivial-auto-var-init=uninitialized")
|
||||||
}
|
}
|
||||||
|
|
||||||
return strings.Join(flags, " ")
|
return strings.Join(flags, " ")
|
||||||
|
|
Loading…
Reference in New Issue