This is an archive of the discontinued LLVM Phabricator instance.

Change keep-static-consts to work on static storage duration, not storage class.
ClosedPublic

Authored by erichkeane on Oct 25 2018, 11:13 AM.

Details

Summary

To be more in line with what GCC does, switch the condition to be based
on the Static Storage duration instead of the storage class.

Diff Detail

Event Timeline

erichkeane created this revision.Oct 25 2018, 11:13 AM

Will this work for the following variable?

constexpr int N = 3;

Will this work for the following variable?

constexpr int N = 3;

Yep, just confirmed that it does! Adding to the test and will update the review.

erichkeane edited the summary of this revision. (Show Details)

Add to the test

zturner accepted this revision.Oct 25 2018, 12:14 PM
This revision is now accepted and ready to land.Oct 25 2018, 12:14 PM