[clang] 2e27094 - [clang] Include clang config.h in LangStandards.cpp

Cassie Jones via cfe-commits cfe-commits at lists.llvm.org
Sat May 14 01:49:57 PDT 2022


Author: Cassie Jones
Date: 2022-05-14T01:47:41-07:00
New Revision: 2e270947963659cf9db4099f42387144feb10fec

URL: https://github.com/llvm/llvm-project/commit/2e270947963659cf9db4099f42387144feb10fec
DIFF: https://github.com/llvm/llvm-project/commit/2e270947963659cf9db4099f42387144feb10fec.diff

LOG: [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

Added: 
    

Modified: 
    clang/lib/Basic/LangStandards.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Basic/LangStandards.cpp b/clang/lib/Basic/LangStandards.cpp
index 11599cf96b33a..6643af38ba01c 100644
--- a/clang/lib/Basic/LangStandards.cpp
+++ b/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"


        


More information about the cfe-commits mailing list