[all-commits] [llvm/llvm-project] be9371: Clarify language option default value behavior; NFC
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Fri Apr 8 07:26:34 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: be9371659380388a693ec99624e1f3d02f07047f
https://github.com/llvm/llvm-project/commit/be9371659380388a693ec99624e1f3d02f07047f
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2022-04-08 (Fri, 08 Apr 2022)
Changed paths:
M clang/include/clang/Basic/LangOptions.def
M clang/lib/Frontend/CompilerInvocation.cpp
Log Message:
-----------
Clarify language option default value behavior; NFC
The LANGOPT macro allows you to specify a default value for the
langauge option. However, it's expected that these values be constant
rather than depending on other language options (because the
constructor setting the default values does not know the language mode
at the time it's being constructed).
Some of our language options were abusing this and passing in other
language mode options which were then set correctly by other parts of
frontend initialization. This removes the default values for the
language options, and then ensures they're consistently set from the
same place when setting language standard defaults.
More information about the All-commits
mailing list