[all-commits] [llvm/llvm-project] be9339: [clang][Basic] Add helper APIs to get language ver...

Michael Buch via All-commits all-commits at lists.llvm.org
Wed Oct 15 07:18:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: be93399e619848c96b101172e68c29336fa589fe
      https://github.com/llvm/llvm-project/commit/be93399e619848c96b101172e68c29336fa589fe
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-10-15 (Wed, 15 Oct 2025)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.h
    M clang/include/clang/Basic/LangStandard.h
    M clang/include/clang/Basic/LangStandards.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/Basic/LangOptions.cpp
    M clang/lib/Basic/LangStandards.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Frontend/InitPreprocessor.cpp
    M clang/unittests/Basic/CMakeLists.txt
    A clang/unittests/Basic/LangOptionsTest.cpp

  Log Message:
  -----------
  [clang][Basic] Add helper APIs to get language version codes from LangOptions (#163348)

Motivated by this discussion:
https://github.com/llvm/llvm-project/pull/163208#discussion_r2426842999

We will soon want to emit language version codes into debug-info.
Instead of replicating the `LangOptions -> version code` mapping we
thought we'd try to share some of the logic with the Clang frontend.

This patch teaches `LangStandard` about language versions (currently just C++ and C).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list