This is an archive of the discontinued LLVM Phabricator instance.

[clang] Do not warn unused -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
ClosedPublic

Authored by kongyi on Aug 18 2021, 1:34 AM.

Details

Summary

Android enables zero initialisation globally by default, but also allows subprojects to override with different option. Clang complains the above flag being unused in this case.

Instead of adding a 75 char long -no-* flag, don't warn unused argument for this flag.

Diff Detail

Event Timeline

kongyi created this revision.Aug 18 2021, 1:34 AM
kongyi requested review of this revision.Aug 18 2021, 1:35 AM
kongyi edited the summary of this revision. (Show Details)
glider accepted this revision.Aug 19 2021, 2:13 AM

I don't have a strong opinion on this. On one hand, passing the correct flags should be something best taken care of by the build system.
On the other hand, letting this flag proliferate is a good thing to do, so let's make the users' life a bit easier.

This revision is now accepted and ready to land.Aug 19 2021, 2:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2021, 9:38 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript