This is an archive of the discontinued LLVM Phabricator instance.

[clang][cli] Store LangStandard::Kind in LangOptions
ClosedPublic

Authored by jansvoboda11 on Jan 25 2021, 3:53 AM.

Details

Summary

The LangStandard::Kind parsed from command line arguments is used to set up some LangOption defaults, but isn't stored anywhere.

To be able to generate -std= (in future patch), we need CompilerInvocation to not forget it.

This patch demonstrates another use-case: using LangStd to set up defaults of marshalled options.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Jan 25 2021, 3:53 AM
jansvoboda11 requested review of this revision.Jan 25 2021, 3:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2021, 3:53 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Remove Digraphs from CompilerInvocation.cpp

dexonsmith accepted this revision.Jan 25 2021, 12:03 PM

LGTM.

clang/include/clang/Basic/LangOptions.h
18

Nit: clang-format wants you to move this for better #include sorting.

This revision is now accepted and ready to land.Jan 25 2021, 12:03 PM
jansvoboda11 added inline comments.Jan 25 2021, 11:54 PM
clang/include/clang/Basic/LangOptions.h
18

Thanks, committing with this fixed.

This revision was landed with ongoing or failed builds.Jan 26 2021, 12:06 AM
This revision was automatically updated to reflect the committed changes.