Merge "Default to pattern initialization for uninitialized variables."

This commit is contained in:
Stephen Hines 2020-01-21 18:06:31 +00:00 committed by Gerrit Code Review
commit b9b979c8aa
1 changed files with 3 additions and 0 deletions

View File

@ -165,6 +165,9 @@ func init() {
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") {
flags = append(flags, "-ftrivial-auto-var-init=pattern")
} else {
// Default to pattern initialization.
flags = append(flags, "-ftrivial-auto-var-init=pattern")
}
return strings.Join(flags, " ")