Skip to content

Commit a680f29

Browse files
author
Deepak Raj H R
committed
Format code
1 parent d6f9eb6 commit a680f29

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

clang/lib/DPCT/RuleInfra/CallExprRewriterCommon.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -818,15 +818,17 @@ inline std::function<std::string(const CallExpr *C)> getDerefedType(size_t Idx)
818818
};
819819
}
820820

821-
inline std::function<std::string(const CallExpr *C)> getReplacedTypeNameForDerefExpr(size_t Idx) {
821+
inline std::function<std::string(const CallExpr *C)>
822+
getReplacedTypeNameForDerefExpr(size_t Idx) {
822823
return [=](const CallExpr *C) -> std::string {
823824
if (Idx >= C->getNumArgs())
824825
return "";
825826

826-
const auto* ArgExpr = C->getArg(Idx);
827+
const auto *ArgExpr = C->getArg(Idx);
827828
QualType ArgExprType = ArgExpr->getType();
828829

829-
if (auto *CSCE = dyn_cast<ExplicitCastExpr>(ArgExpr->IgnoreImplicitAsWritten()))
830+
if (auto *CSCE =
831+
dyn_cast<ExplicitCastExpr>(ArgExpr->IgnoreImplicitAsWritten()))
830832
ArgExprType = CSCE->getTypeAsWritten();
831833

832834
while (const auto *ET = dyn_cast<ElaboratedType>(ArgExprType)) {
@@ -839,7 +841,9 @@ inline std::function<std::string(const CallExpr *C)> getReplacedTypeNameForDeref
839841
}
840842

841843
ArgExprType = DerefQualType(ArgExprType);
842-
return ArgExprType.isNull() ? "" : DpctGlobalInfo::getReplacedTypeName(ArgExprType);
844+
return ArgExprType.isNull()
845+
? ""
846+
: DpctGlobalInfo::getReplacedTypeName(ArgExprType);
843847
};
844848
}
845849

clang/lib/DPCT/RulesLang/APINamesMemory.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ ASSIGNABLE_FACTORY(ASSIGN_FACTORY_ENTRY("cudaHostGetDevicePointer",
217217

218218
ASSIGNABLE_FACTORY(ASSIGN_FACTORY_ENTRY("cuMemHostGetDevicePointer_v2",
219219
DEREF(makeCallArgCreatorWithCall(0)),
220-
CAST(getReplacedTypeNameForDerefExpr(0), ARG(1))))
220+
CAST(getReplacedTypeNameForDerefExpr(0),
221+
ARG(1))))
221222

222223
ASSIGNABLE_FACTORY(CONDITIONAL_FACTORY_ENTRY(
223224
checkIsUSM(),

0 commit comments

Comments
 (0)