[all-commits] [llvm/llvm-project] 2154cf: [clang][cli] Store LangStandard::Kind in LangOptions

Jan Svoboda via All-commits all-commits at lists.llvm.org
Tue Jan 26 00:06:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2154cffdc2a6fc9bc7fc75064dc875fa9bf18190
      https://github.com/llvm/llvm-project/commit/2154cffdc2a6fc9bc7fc75064dc875fa9bf18190
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.h
    M clang/include/clang/Driver/Options.td
    M clang/lib/Basic/LangOptions.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/unittests/Frontend/CompilerInvocationTest.cpp

  Log Message:
  -----------
  [clang][cli] Store LangStandard::Kind in LangOptions

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.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D95342




More information about the All-commits mailing list