[clang] 9c39095 - Recognize *.hxx as a C++ header extension, like *.hpp.
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 8 02:50:46 PDT 2020
Author: Sam McCall
Date: 2020-06-08T11:50:34+02:00
New Revision: 9c3909556b31e1ca5c63ba0a54db69e298b08b1a
URL: https://github.com/llvm/llvm-project/commit/9c3909556b31e1ca5c63ba0a54db69e298b08b1a
DIFF: https://github.com/llvm/llvm-project/commit/9c3909556b31e1ca5c63ba0a54db69e298b08b1a.diff
LOG: Recognize *.hxx as a C++ header extension, like *.hpp.
Reviewers: kadircet
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81366
Added:
Modified:
clang/lib/Driver/Types.cpp
clang/lib/Frontend/FrontendOptions.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/Types.cpp b/clang/lib/Driver/Types.cpp
index 3ab48a0180c1..399e26d8d64a 100644
--- a/clang/lib/Driver/Types.cpp
+++ b/clang/lib/Driver/Types.cpp
@@ -278,6 +278,7 @@ types::ID types::lookupTypeForExtension(llvm::StringRef Ext) {
.Case("gch", TY_PCH)
.Case("hip", TY_HIP)
.Case("hpp", TY_CXXHeader)
+ .Case("hxx", TY_CXXHeader)
.Case("iim", TY_PP_CXXModule)
.Case("lib", TY_Object)
.Case("mii", TY_PP_ObjCXX)
diff --git a/clang/lib/Frontend/FrontendOptions.cpp b/clang/lib/Frontend/FrontendOptions.cpp
index 63088b95c310..9f080db733f1 100644
--- a/clang/lib/Frontend/FrontendOptions.cpp
+++ b/clang/lib/Frontend/FrontendOptions.cpp
@@ -25,7 +25,7 @@ InputKind FrontendOptions::getInputKindForExtension(StringRef Extension) {
.Cases("mm", "M", Language::ObjCXX)
.Case("mii", InputKind(Language::ObjCXX).getPreprocessed())
.Cases("C", "cc", "cp", Language::CXX)
- .Cases("cpp", "CPP", "c++", "cxx", "hpp", Language::CXX)
+ .Cases("cpp", "CPP", "c++", "cxx", "hpp", "hxx", Language::CXX)
.Case("cppm", Language::CXX)
.Case("iim", InputKind(Language::CXX).getPreprocessed())
.Case("cl", Language::OpenCL)
More information about the cfe-commits
mailing list