This is an archive of the discontinued LLVM Phabricator instance.

[flang][nfc] Fix variable names in `FrontendOptions`
ClosedPublic

Authored by awarzynski on Jul 29 2021, 5:45 AM.

Details

Summary

As all member variables in FrontendOptions are public, we should be
naming them as variable rather than variable_ [1]. This patch will
fix that.

Also, FrontendOptions is re-defined as a struct rather than a
class (all fields are meant to be public).

[1]
https://github.com/llvm/llvm-project/blob/main/flang/docs/C%2B%2Bstyle.md#naming

Diff Detail

Event Timeline

awarzynski created this revision.Jul 29 2021, 5:45 AM
awarzynski requested review of this revision.Jul 29 2021, 5:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2021, 5:45 AM
awarzynski added a project: Restricted Project.
klausler accepted this revision.Jul 29 2021, 12:00 PM
klausler added inline comments.
flang/include/flang/Frontend/FrontendOptions.h
253

It is confusing to have data member initialization mixed between the constructor and the data member declarations when all of initialization expressions are constants.

This revision is now accepted and ready to land.Jul 29 2021, 12:00 PM

Similar refactor for PreprocessorOptions

flang/include/flang/Frontend/FrontendOptions.h
253

I agree that the location of this constructor is unfortunate. Let me move it to the top.

This revision was landed with ongoing or failed builds.Aug 2 2021, 3:09 AM
This revision was automatically updated to reflect the committed changes.