Skip to content

Commit 653584a

Browse files
committed
format
Signed-off-by: Justin Stitt <[email protected]>
1 parent e53caae commit 653584a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

clang/include/clang/AST/Expr.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4019,9 +4019,7 @@ class BinaryOperator : public Expr {
40194019
return isShiftAssignOp(getOpcode());
40204020
}
40214021

4022-
bool ignoreOverflowSanitizers() const {
4023-
return isOverflowIdiom;
4024-
}
4022+
bool ignoreOverflowSanitizers() const { return isOverflowIdiom; }
40254023

40264024
/// Return true if a binary operator using the specified opcode and operands
40274025
/// would match the 'p = (i8*)nullptr + n' idiom for casting a pointer-sized

clang/lib/AST/Expr.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4764,7 +4764,8 @@ namespace {
47644764
/// sanitization disabled. Check for the common pattern `if (a + b < a)` and
47654765
/// return the resulting BinaryOperator responsible for the addition so we can
47664766
/// elide overflow checks during codegen.
4767-
static std::optional<BinaryOperator *> getOverflowIdiomBinOp(const BinaryOperator *E) {
4767+
static std::optional<BinaryOperator *>
4768+
getOverflowIdiomBinOp(const BinaryOperator *E) {
47684769
Expr *Addition, *ComparedTo;
47694770
if (E->getOpcode() == BO_LT) {
47704771
Addition = E->getLHS();
@@ -4819,7 +4820,7 @@ BinaryOperator::BinaryOperator(const ASTContext &Ctx, Expr *lhs, Expr *rhs,
48194820
SubExprs[LHS] = lhs;
48204821
SubExprs[RHS] = rhs;
48214822
if (!Ctx.getLangOpts().SanitizeOverflowIdioms) {
4822-
std::optional<BinaryOperator*> Result = getOverflowIdiomBinOp(this);
4823+
std::optional<BinaryOperator *> Result = getOverflowIdiomBinOp(this);
48234824
if (Result.has_value())
48244825
Result.value()->isOverflowIdiom = true;
48254826
}

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#include "clang/AST/Attr.h"
2525
#include "clang/AST/DeclObjC.h"
2626
#include "clang/AST/Expr.h"
27-
#include "clang/AST/RecordLayout.h"
2827
#include "clang/AST/ParentMapContext.h"
28+
#include "clang/AST/RecordLayout.h"
2929
#include "clang/AST/StmtVisitor.h"
3030
#include "clang/Basic/CodeGenOptions.h"
3131
#include "clang/Basic/TargetInfo.h"

0 commit comments

Comments
 (0)