Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ bool MagicNumbersCheck::isConstant(const MatchFinder::MatchResult &Result,
}

bool MagicNumbersCheck::isIgnoredValue(const IntegerLiteral *Literal) const {
if (Literal->getType()->isBitIntType()) {
return true;
}
const llvm::APInt IntValue = Literal->getValue();
const int64_t Value = IntValue.getZExtValue();
if (Value == 0)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// RUN: %check_clang_tidy %s readability-magic-numbers %t --

// Don't crash

_BitInt(128) A = 4533629751480627964421wb;
// CHECK-MESSAGES: warning