[all-commits] [llvm/llvm-project] 4b5366: [clang-tidy] Avoid checking magic numbers if _BitI...
vabridgers via All-commits
all-commits at lists.llvm.org
Sun Sep 17 12:01:12 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4b5366c9512aa273a5272af1d833961e1ed156e7
https://github.com/llvm/llvm-project/commit/4b5366c9512aa273a5272af1d833961e1ed156e7
Author: vabridgers <58314289+vabridgers at users.noreply.github.com>
Date: 2023-09-17 (Sun, 17 Sep 2023)
Changed paths:
M clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
A clang-tools-extra/test/clang-tidy/checkers/readability/bitint-no-crash.c
Log Message:
-----------
[clang-tidy] Avoid checking magic numbers if _BitInt (#65888)
Recent changes to add _BitInt support have caused our internal random
testing to fail. This change just avoids a readability magic numbers
check for now if a _BitInt. The crash seen (edited for clarity) is shown
below.
<src-root>/llvm/include/llvm/ADT/APInt.h:1488:
uint64_t llvm::APInt::getZExtValue() const: Assertion `getActiveBits()
<= 64 && "Too many bits for uint64_t"' failed.
...
#9 <address> llvm::APInt::getZExtValue() const
<src-root>/llvm/include/llvm/ADT/APInt.h:1488:5
clang::IntegerLiteral const*) const
<src-root>/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp:198:47
<clang::IntegerLiteral>(clang::ast_matchers::MatchFinder::MatchResult
const&, char const*)
<src-root>/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.h:67:5
clang::ast_matchers::MatchFinder::MatchResult const&)
<src-root>/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp:152:35
...
Reviewed By: donat.nagy
More information about the All-commits
mailing list