[PATCH] D124974: [clang] Include clang config.h in LangStandards.cpp

Cassie Jones via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 4 19:14:48 PDT 2022


porglezomp created this revision.
porglezomp added reviewers: hokein, sammccall, dexonsmith.
Herald added a project: All.
porglezomp requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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 <https://reviews.llvm.org/D121375>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124974

Files:
  clang/lib/Basic/LangStandards.cpp


Index: clang/lib/Basic/LangStandards.cpp
===================================================================
--- clang/lib/Basic/LangStandards.cpp
+++ clang/lib/Basic/LangStandards.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Basic/LangStandard.h"
+#include "clang/Config/config.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/ErrorHandling.h"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124974.427175.patch
Type: text/x-patch
Size: 465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220505/3b5b8160/attachment-0001.bin>


More information about the cfe-commits mailing list