Skip to content

Commit

Permalink
[clang-tidy][NFC] Fix performance-unnecessary-copy-initialization fin…
Browse files Browse the repository at this point in the history
…dings

Fix issues found by clang-tidy in clang-tidy source directory.
  • Loading branch information
PiotrZSL committed Aug 27, 2023
1 parent 9999423 commit 4d81b14
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static bool hasDisjointValueRange(const EnumDecl *Enum1,
}

static bool isNonPowerOf2NorNullLiteral(const EnumConstantDecl *EnumConst) {
llvm::APSInt Val = EnumConst->getInitVal();
const llvm::APSInt &Val = EnumConst->getInitVal();
if (Val.isPowerOf2() || !Val.getBoolValue())
return false;
const Expr *InitExpr = EnumConst->getInitExpr();
Expand Down

0 comments on commit 4d81b14

Please sign in to comment.