Skip to content

Commit e5a3480

Browse files
authored
Remove unneeded FixTypeName (#699)
1 parent dba60ff commit e5a3480

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

lib/CppInterOp/CXCppInterOp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ CXString clang_getTypeAsString(CXQualType type) {
437437
clang::PrintingPolicy Policy = C.getPrintingPolicy();
438438
Policy.Bool = true; // Print bool instead of _Bool.
439439
Policy.SuppressTagKeyword = true; // Do not print `class std::string`.
440-
return makeCXString(compat::FixTypeName(QT.getAsString(Policy)));
440+
return makeCXString(QT.getAsString(Policy));
441441
}
442442

443443
CXQualType clang_getComplexType(CXQualType eltype) {

lib/CppInterOp/Compatibility.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,6 @@ class SynthesizingCodeRAII {
393393

394394
namespace compat {
395395

396-
// Clang >= 14 change type name to string (spaces formatting problem)
397-
inline std::string FixTypeName(const std::string type_name) {
398-
return type_name;
399-
}
400-
401396
inline std::string MakeResourceDir(llvm::StringRef Dir) {
402397
llvm::SmallString<128> P(Dir);
403398
llvm::sys::path::append(P, CLANG_INSTALL_LIBDIR_BASENAME, "clang",

lib/CppInterOp/CppInterOp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ std::string GetTypeAsString(TCppType_t var) {
17271727
Policy.SuppressTagKeyword = true; // Do not print `class std::string`.
17281728
Policy.SuppressElaboration = true;
17291729
Policy.FullyQualifiedName = true;
1730-
return compat::FixTypeName(QT.getAsString(Policy));
1730+
return QT.getAsString(Policy);
17311731
}
17321732

17331733
TCppType_t GetCanonicalType(TCppType_t type) {

0 commit comments

Comments
 (0)