Skip to content

Commit 513fd2f

Browse files
committed
Follow LLVM naming conventions for function parameters
1 parent c597141 commit 513fd2f

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

clang/lib/CIR/CodeGen/CIRGenCXXABI.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,19 @@ void CIRGenCXXABI::setCXXABIThisValue(CIRGenFunction &cgf,
7777
cgf.cxxabiThisValue = thisPtr;
7878
}
7979

80-
CharUnits CIRGenCXXABI::getArrayCookieSize(const CXXNewExpr *E) {
81-
if (!requiresArrayCookie(E))
80+
CharUnits CIRGenCXXABI::getArrayCookieSize(const CXXNewExpr *e) {
81+
if (!requiresArrayCookie(e))
8282
return CharUnits::Zero();
8383

84-
cgm.errorNYI(E->getSourceRange(), "CIRGenCXXABI::getArrayCookieSize");
84+
cgm.errorNYI(e->getSourceRange(), "CIRGenCXXABI::getArrayCookieSize");
8585
return CharUnits::Zero();
8686
}
8787

88-
bool CIRGenCXXABI::requiresArrayCookie(const CXXNewExpr *E) {
88+
bool CIRGenCXXABI::requiresArrayCookie(const CXXNewExpr *e) {
8989
// If the class's usual deallocation function takes two arguments,
9090
// it needs a cookie.
91-
if (E->doesUsualArrayDeleteWantSize())
91+
if (e->doesUsualArrayDeleteWantSize())
9292
return true;
9393

94-
return E->getAllocatedType().isDestructedType();
94+
return e->getAllocatedType().isDestructedType();
9595
}

clang/lib/CIR/CodeGen/CIRGenCXXABI.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CIRGenCXXABI {
2828
CIRGenModule &cgm;
2929
std::unique_ptr<clang::MangleContext> mangleContext;
3030

31-
virtual bool requiresArrayCookie(const CXXNewExpr *E);
31+
virtual bool requiresArrayCookie(const CXXNewExpr *e);
3232

3333
public:
3434
// TODO(cir): make this protected when target-specific CIRGenCXXABIs are
@@ -255,7 +255,7 @@ class CIRGenCXXABI {
255255
/// - calls to \::operator new(size_t, void*) never need a cookie
256256
///
257257
/// \param E - the new-expression being allocated.
258-
virtual CharUnits getArrayCookieSize(const CXXNewExpr *E);
258+
virtual CharUnits getArrayCookieSize(const CXXNewExpr *e);
259259
};
260260

261261
/// Creates and Itanium-family ABI

clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ static mlir::Value emitCXXNewAllocSize(CIRGenFunction &cgf, const CXXNewExpr *e,
339339
unsigned numElementsWidth = count.getBitWidth();
340340

341341
// The equivalent code in CodeGen/CGExprCXX.cpp handles these cases as
342-
// overflow, but they should never happen. The size argument is implicitly
342+
// overflow, but that should never happen. The size argument is implicitly
343343
// cast to a size_t, so it can never be negative and numElementsWidth will
344344
// always equal sizeWidth.
345345
assert(!count.isNegative() && "Expected non-negative array size");
@@ -350,7 +350,7 @@ static mlir::Value emitCXXNewAllocSize(CIRGenFunction &cgf, const CXXNewExpr *e,
350350
llvm::APInt adjustedCount = count.zextOrTrunc(sizeWidth);
351351

352352
// Scale numElements by that. This might overflow, but we don't
353-
// care because it only overflows if allocationSize does, too, and
353+
// care because it only overflows if allocationSize does too, and
354354
// if that overflows then we shouldn't use this.
355355
// This emits a constant that may not be used, but we can't tell here
356356
// whether it will be needed or not.

0 commit comments

Comments
 (0)