Author: Piotr Zegar Date: 2023-08-27T08:52:10Z New Revision: 4d81b1450dd227c0d3da615f7e4f5937378cc05c
URL: https://github.com/llvm/llvm-project/commit/4d81b1450dd227c0d3da615f7e4f5937378cc05c DIFF: https://github.com/llvm/llvm-project/commit/4d81b1450dd227c0d3da615f7e4f5937378cc05c.diff LOG: [clang-tidy][NFC] Fix performance-unnecessary-copy-initialization findings Fix issues found by clang-tidy in clang-tidy source directory. Added: Modified: clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp index 90e68d15e4c00c..ca1ae551cc632a 100644 --- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp @@ -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(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits