@@ -857,7 +857,7 @@ namespace Cpp {
857
857
858
858
TCppIndex_t GetFunctionRequiredArgs (TCppConstFunction_t func)
859
859
{
860
- auto * D = ( const clang::Decl *) func;
860
+ const auto * D = static_cast < const clang::Decl*>( func) ;
861
861
if (auto * FD = llvm::dyn_cast_or_null<FunctionDecl>(D))
862
862
return FD->getMinRequiredArguments ();
863
863
@@ -923,7 +923,8 @@ namespace Cpp {
923
923
}
924
924
925
925
bool IsFunctionDeleted (TCppConstFunction_t function) {
926
- auto *FD = cast<const FunctionDecl>((const clang::Decl*)function);
926
+ const auto * FD =
927
+ cast<const FunctionDecl>(static_cast <const clang::Decl*>(function));
927
928
return FD->isDeleted ();
928
929
}
929
930
@@ -1054,7 +1055,8 @@ namespace Cpp {
1054
1055
1055
1056
bool IsMethod (TCppConstFunction_t method)
1056
1057
{
1057
- return dyn_cast_or_null<CXXMethodDecl>((const clang::Decl*)method);
1058
+ return dyn_cast_or_null<CXXMethodDecl>(
1059
+ static_cast <const clang::Decl*>(method));
1058
1060
}
1059
1061
1060
1062
bool IsPublicMethod (TCppFunction_t method)
@@ -1073,18 +1075,18 @@ namespace Cpp {
1073
1075
1074
1076
bool IsConstructor (TCppConstFunction_t method)
1075
1077
{
1076
- auto * D = ( const Decl *) method;
1078
+ const auto * D = static_cast < const Decl*>( method) ;
1077
1079
return llvm::isa_and_nonnull<CXXConstructorDecl>(D);
1078
1080
}
1079
1081
1080
1082
bool IsDestructor (TCppConstFunction_t method)
1081
1083
{
1082
- auto * D = ( const Decl *) method;
1084
+ const auto * D = static_cast < const Decl*>( method) ;
1083
1085
return llvm::isa_and_nonnull<CXXDestructorDecl>(D);
1084
1086
}
1085
1087
1086
1088
bool IsStaticMethod (TCppConstFunction_t method) {
1087
- const auto * D = ( const Decl*) method;
1089
+ const auto * D = static_cast < const Decl*>( method) ;
1088
1090
if (auto *CXXMD = llvm::dyn_cast_or_null<CXXMethodDecl>(D)) {
1089
1091
return CXXMD->isStatic ();
1090
1092
}
@@ -1456,10 +1458,6 @@ namespace Cpp {
1456
1458
}
1457
1459
}
1458
1460
1459
- QualType GetBuiltinType (const std::string& name, Sema& sema) {
1460
- return findBuiltinType (name, sema.getASTContext ());
1461
- }
1462
-
1463
1461
TCppType_t GetType (const std::string &name) {
1464
1462
QualType builtin = findBuiltinType (name, getASTContext ());
1465
1463
if (!builtin.isNull ())
@@ -2583,7 +2581,7 @@ namespace Cpp {
2583
2581
2584
2582
CPPINTEROP_API JitCall MakeFunctionCallable (TInterp_t I,
2585
2583
TCppConstFunction_t func) {
2586
- auto * D = ( const clang::Decl*) func;
2584
+ const auto * D = static_cast < const clang::Decl*>( func) ;
2587
2585
if (!D)
2588
2586
return {};
2589
2587
0 commit comments