llvm-capstone/clang-tools-extra/clang-tidy
vabridgers 4b5366c951
[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
2023-09-17 14:00:57 -05:00
..
abseil [clang] NFCI: Use FileEntryRef in 'clang-tools-extra' 2023-09-10 19:53:54 -07:00
altera [clang] NFCI: Use FileEntryRef in 'clang-tools-extra' 2023-09-10 19:53:54 -07:00
android cmake: add missing dependencies on ClangDriverOptions tablegen 2023-08-04 10:27:19 -07:00
boost cmake: add missing dependencies on ClangDriverOptions tablegen 2023-08-04 10:27:19 -07:00
bugprone [clang-tidy]add new check bugprone-compare-pointer-to-member-virtual-function (#66055) 2023-09-15 20:59:12 +08:00
cert [clang-tidy][NFC] Fix cppcoreguidelines-init-variables findings 2023-08-27 11:59:03 +00:00
concurrency [clang-tidy][NFC] Fix modernize-return-braced-init-list findings 2023-08-27 08:52:10 +00:00
cppcoreguidelines [clang-tidy][NFC] Fix cppcoreguidelines-init-variables findings 2023-08-27 11:59:03 +00:00
darwin cmake: add missing dependencies on ClangDriverOptions tablegen 2023-08-04 10:27:19 -07:00
fuchsia [lldb] Fix duplicate word typos; NFC 2023-09-01 21:32:24 -07:00
google [clang-tidy][NFC] Fix llvm-else-after-return findings 2023-08-30 17:41:41 +00:00
hicpp [clang-tidy][NFC][DOC] Update links to HICPP standard 2023-08-30 18:02:34 +00:00
linuxkernel [clang-tidy][NFC] Fix modernize-use-auto findings 2023-08-27 11:59:02 +00:00
llvm [clang-tidy][NFC] Fix cppcoreguidelines-init-variables findings 2023-08-27 11:59:03 +00:00
llvmlibc [clang-tidy] Add fix-it support to llvmlibc-inline-function-decl 2023-08-07 12:15:59 -07:00
misc [clang] NFCI: Use FileEntryRef in 'clang-tools-extra' 2023-09-10 19:53:54 -07:00
modernize [clang-tidy] Add IgnoreTypes option to modernize-use-nullptr 2023-09-10 12:22:53 +00:00
mpi cmake: add missing dependencies on ClangDriverOptions tablegen 2023-08-04 10:27:19 -07:00
objc [clang-tidy][NFC] Fix modernize-return-braced-init-list findings 2023-08-27 08:52:10 +00:00
openmp [clang-tidy][NFC] Remove redundant allOf matcher calls 2023-04-11 00:38:37 +01:00
performance [clang-tidy][NFC] Fix cppcoreguidelines-init-variables findings 2023-08-27 11:59:03 +00:00
plugin cmake: add missing dependencies on ClangDriverOptions tablegen 2023-08-04 10:27:19 -07:00
portability cmake: add missing dependencies on ClangDriverOptions tablegen 2023-08-04 10:27:19 -07:00
readability [clang-tidy] Avoid checking magic numbers if _BitInt (#65888) 2023-09-17 14:00:57 -05:00
tool [clang-tidy][NFC] Minor cleanup in ClangTidyMain.cpp 2023-09-16 06:17:57 +00:00
utils [clang] NFCI: Use FileEntryRef in 'clang-tools-extra' 2023-09-10 19:53:54 -07:00
zircon cmake: add missing dependencies on ClangDriverOptions tablegen 2023-08-04 10:27:19 -07:00
add_new_check.py [clang-tidy][NFC][DOC] Use internal references instead of external 2023-08-21 17:02:44 +00:00
clang-tidy-config.h.cmake
ClangTidy.cpp [clang] NFCI: Change returned AnalyzerOptions smart pointer to reference 2023-09-05 13:23:53 -07:00
ClangTidy.h [clang-tidy] Add -verify-config command line argument 2022-06-23 19:23:09 +01:00
ClangTidyCheck.cpp [clang-tidy][NFC] Fix cppcoreguidelines-init-variables findings 2023-08-27 11:59:03 +00:00
ClangTidyCheck.h [clang-tidy][NFC] Fix modernize-type-traits findings 2023-08-27 08:52:11 +00:00
ClangTidyDiagnosticConsumer.cpp [clang] NFCI: Use FileEntryRef in 'clang-tools-extra' 2023-09-10 19:53:54 -07:00
ClangTidyDiagnosticConsumer.h [clang-tidy][NFC] Fix modernize-use-default-member-init findings 2023-08-27 08:52:11 +00:00
ClangTidyForceLinker.h [clang-tidy][NFC] Use C++17 nested namespaces in clang-tidy headers 2023-01-23 21:23:16 +00:00
ClangTidyModule.cpp [clang-tidy][NFC] Fix modernize-return-braced-init-list findings 2023-08-27 08:52:10 +00:00
ClangTidyModule.h [clang-tidy][NFC] Fix modernize-use-using findings 2023-08-27 08:52:10 +00:00
ClangTidyModuleRegistry.h [clang-tidy][NFC] Fix modernize-use-using findings 2023-08-27 08:52:10 +00:00
ClangTidyOptions.cpp [clang-tidy][NFC] Fix modernize-use-auto findings 2023-08-27 11:59:02 +00:00
ClangTidyOptions.h [clang-tidy][NFC] Fix readability-redundant-access-specifiers findings 2023-08-27 08:52:10 +00:00
ClangTidyProfiling.cpp [clang-tidy][NFC] Fix modernize-raw-string-literal findings 2023-08-27 08:52:10 +00:00
ClangTidyProfiling.h [clang-tidy][NFC] Use C++17 nested namespaces in clang-tidy headers 2023-01-23 21:23:16 +00:00
CMakeLists.txt cmake: add missing dependencies on ClangDriverOptions tablegen 2023-08-04 10:27:19 -07:00
ExpandModularHeadersPPCallbacks.cpp [clang-tidy] Initialize DiagnosticEngine in ExpandModularHeaders 2023-07-24 19:43:47 +00:00
ExpandModularHeadersPPCallbacks.h [clang-tidy][NFC] Fix readability-inconsistent-declaration-parameter-name findings 2023-08-27 08:52:09 +00:00
FileExtensionsSet.h [clang-tidy][NFC] Fix modernize-use-using findings 2023-08-27 08:52:10 +00:00
GlobList.cpp Silence an illegal conversion warning in MSVC; NFC 2023-08-28 08:06:03 -04:00
GlobList.h [clang-tidy][NFC] Use C++17 nested namespaces in clang-tidy headers 2023-01-23 21:23:16 +00:00
NoLintDirectiveHandler.cpp [clang-tidy][NFC] Use C++17 nested namespaces in the clang-tidy folder 2023-01-14 18:51:39 +00:00
NoLintDirectiveHandler.h [clang-tidy][NFC] Use C++17 nested namespaces in clang-tidy headers 2023-01-23 21:23:16 +00:00
rename_check.py [NFC][Py Reformat] Reformat python files in clang and clang-tools-extra 2023-05-23 08:29:52 +02:00