This is an archive of the discontinued LLVM Phabricator instance.

Treat default values in LangOptions.def in the scope of enums
AbandonedPublic

Authored by sepavloff on Apr 5 2020, 9:59 PM.

Details

Summary

If an option specified in LangOptions.def is of enum type, its default
value should be a member of that enum, so scope qualifier may always
be added in such cases. It allows to omit the scope qualifiers from
'LangOptions.def', which improves readability.

No functional changes.

Diff Detail

Event Timeline

sepavloff created this revision.Apr 5 2020, 9:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2020, 9:59 PM
Herald added a subscriber: wdng. · View Herald Transcript
rnk requested changes to this revision.Apr 6 2020, 8:15 AM

I don't think we can do this because GCC 5.1 won't support it.

To confirm, that's still the minimum supported version:
https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library

And here's a godbolt example showing the error: https://gcc.godbolt.org/z/fYb58Q

This revision now requires changes to proceed.Apr 6 2020, 8:15 AM
sepavloff abandoned this revision.Apr 6 2020, 9:41 AM

Thank you, Reid!