[all-commits] [llvm/llvm-project] 2e2709: [clang] Include clang config.h in LangStandards.cpp
Cassie Jones via All-commits
all-commits at lists.llvm.org
Sat May 14 01:50:06 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e270947963659cf9db4099f42387144feb10fec
https://github.com/llvm/llvm-project/commit/2e270947963659cf9db4099f42387144feb10fec
Author: Cassie Jones <code at witchoflight.com>
Date: 2022-05-14 (Sat, 14 May 2022)
Changed paths:
M clang/lib/Basic/LangStandards.cpp
Log Message:
-----------
[clang] Include clang config.h in LangStandards.cpp
This is necessary in order to pick up the default C/C++ standard from
the CLANG_DEFAULT_STD_C(XX) defines. This fixes a bug that was
introduced when this default language standard code was moved from
Frontend to Basic, making compilers ignore the configured default
language version override.
Fixes a bug introduced by D121375.
Reviewed By: hokein, dexonsmith
Differential Revision: https://reviews.llvm.org/D124974
Commit: ae8bbc43f4709b910cd6c1e1ddc5bc854785a142
https://github.com/llvm/llvm-project/commit/ae8bbc43f4709b910cd6c1e1ddc5bc854785a142
Author: Cassie Jones <code at witchoflight.com>
Date: 2022-05-14 (Sat, 14 May 2022)
Changed paths:
M clang/include/clang/Config/config.h.cmake
M clang/lib/Basic/LangStandards.cpp
Log Message:
-----------
[clang] Require including config.h for CLANG_DEFAULT_STD_C
This makes CLANG_DEFAULT_STD_C(XX) always be defined, defaulting to
lang_unspecified, so you are forced to check its value instead of using
an #ifdef. This should help avoid accidentally omitting the include in
places where that's important, so that the default language version bug
isn't re-introduced.
Reviewed By: hokein, dexonsmith
Differential Revision: https://reviews.llvm.org/D124974
Compare: https://github.com/llvm/llvm-project/compare/6f5f847a36af...ae8bbc43f470
More information about the All-commits
mailing list