This is an automated email from the git hooks/post-receive script.
"tcwg-buildslave pushed a change to branch linaro-local/tested/gnu-master in repository toolchain/llvm/clang-tools-extra.
from 6d085e0a [clangd] Record the file being processed in a TUScheduler thr [...] adds 0a2b7a8d [clangd] Try to fix buildbot after r339320. adds 4cacbf2c Port getLocStart -> getBeginLoc adds a32ea61a Port getLocEnd -> getEndLoc adds 46c3aff5 [clang-tidy] Omit cases where loop variable is not used in lo [...] adds 997b4bc0 [clangd] Fix a "-Wdangling-else" compiler warning in the test. adds 274dfdca [clangd] Allow consuming limited number of items adds 7654135f [clang-tidy] run-clang-tidy.py - add synchronisation to the [...] adds 166628a6 [clang-tidy: modernize] modernize-redundant-void-arg crashes [...] adds 3a14fe2e [clang-tidy] check_clang_tidy.py: support CHECK-NOTES prefix adds db1904c5 [clangd] extend the publishDiagnostics response to send back [...] adds c86f5b0c [clangd] Avoid duplicates in findDefinitions response adds dd74695a Add a new check to the readability module that flags uses of [...] adds 7e714d5a Adding the readability module to the list of dependencies for [...] adds b756f893 [clangd] Support textEdit in addition to insertText. adds ef438809 [clangd] Introduce scoring mechanism for SignatureInformations. adds 6f44c50f [clangd] Generate incomplete trigrams for the Dex index adds 4283deeb Fix MSVC 'std::min: no matching overloaded function found' error. adds 3adbe986 [clang-tidy] Recognize [[clang::reinitializes]] attribute in [...] adds 43afd584 Fix lint tests for D50449
No new revisions were added by this update.
Summary of changes: change-namespace/ChangeNamespace.cpp | 16 +- clang-doc/Mapper.cpp | 4 +- clang-move/ClangMove.cpp | 16 +- clang-tidy/abseil/StringFindStartswithCheck.cpp | 6 +- clang-tidy/android/CloexecCheck.cpp | 8 +- .../android/ComparisonInTempFailureRetryCheck.cpp | 6 +- clang-tidy/boost/UseToStringCheck.cpp | 6 +- clang-tidy/bugprone/ArgumentCommentCheck.cpp | 8 +- clang-tidy/bugprone/AssertSideEffectCheck.cpp | 2 +- .../BoolPointerImplicitConversionCheck.cpp | 6 +- clang-tidy/bugprone/CopyConstructorInitCheck.cpp | 4 +- clang-tidy/bugprone/DanglingHandleCheck.cpp | 2 +- clang-tidy/bugprone/InaccurateEraseCheck.cpp | 4 +- clang-tidy/bugprone/IncorrectRoundingsCheck.cpp | 2 +- clang-tidy/bugprone/IntegerDivisionCheck.cpp | 2 +- .../MisplacedOperatorInStrlenInAllocCheck.cpp | 5 +- clang-tidy/bugprone/MisplacedWideningCastCheck.cpp | 6 +- .../bugprone/MoveForwardingReferenceCheck.cpp | 2 +- .../bugprone/MultipleStatementMacroCheck.cpp | 8 +- clang-tidy/bugprone/SizeofContainerCheck.cpp | 2 +- clang-tidy/bugprone/SizeofExpressionCheck.cpp | 28 +-- clang-tidy/bugprone/StringConstructorCheck.cpp | 2 +- .../bugprone/StringIntegerAssignmentCheck.cpp | 4 +- .../bugprone/StringLiteralWithEmbeddedNulCheck.cpp | 4 +- clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp | 6 +- .../bugprone/SuspiciousMissingCommaCheck.cpp | 2 +- clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp | 6 +- .../bugprone/SuspiciousStringCompareCheck.cpp | 17 +- clang-tidy/bugprone/SwappedArgumentsCheck.cpp | 2 +- clang-tidy/bugprone/TerminatingContinueCheck.cpp | 2 +- clang-tidy/bugprone/ThrowKeywordMissingCheck.cpp | 2 +- .../bugprone/UndefinedMemoryManipulationCheck.cpp | 4 +- .../bugprone/UndelegatedConstructorCheck.cpp | 2 +- clang-tidy/bugprone/UnusedRaiiCheck.cpp | 6 +- clang-tidy/bugprone/UnusedReturnValueCheck.cpp | 4 +- clang-tidy/bugprone/UseAfterMoveCheck.cpp | 4 + clang-tidy/bugprone/VirtualNearMissCheck.cpp | 2 +- clang-tidy/cert/LimitedRandomnessCheck.cpp | 2 +- clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp | 4 +- clang-tidy/cppcoreguidelines/CMakeLists.txt | 1 + .../CppCoreGuidelinesTidyModule.cpp | 3 + .../NarrowingConversionsCheck.cpp | 4 +- clang-tidy/cppcoreguidelines/NoMallocCheck.cpp | 4 +- clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp | 24 +-- .../ProBoundsConstantArrayIndexCheck.cpp | 2 +- .../cppcoreguidelines/ProTypeCstyleCastCheck.cpp | 10 +- .../cppcoreguidelines/ProTypeMemberInitCheck.cpp | 12 +- clang-tidy/fuchsia/DefaultArgumentsCheck.cpp | 18 +- clang-tidy/fuchsia/MultipleInheritanceCheck.cpp | 5 +- clang-tidy/fuchsia/OverloadedOperatorCheck.cpp | 4 +- .../fuchsia/StaticallyConstructedObjectsCheck.cpp | 2 +- clang-tidy/fuchsia/TrailingReturnCheck.cpp | 2 +- clang-tidy/fuchsia/VirtualInheritanceCheck.cpp | 2 +- clang-tidy/google/AvoidCStyleCastsCheck.cpp | 10 +- clang-tidy/google/ExplicitConstructorCheck.cpp | 2 +- clang-tidy/google/ExplicitMakePairCheck.cpp | 6 +- clang-tidy/google/GlobalNamesInHeadersCheck.cpp | 8 +- clang-tidy/google/IntegerTypesCheck.cpp | 2 +- clang-tidy/google/OverloadedUnaryAndCheck.cpp | 2 +- .../google/UnnamedNamespaceInHeaderCheck.cpp | 2 +- clang-tidy/google/UsingNamespaceDirectiveCheck.cpp | 2 +- clang-tidy/hicpp/ExceptionBaseclassCheck.cpp | 4 +- clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp | 8 +- clang-tidy/hicpp/SignedBitwiseCheck.cpp | 6 +- clang-tidy/llvm/TwineLocalCheck.cpp | 4 +- clang-tidy/misc/DefinitionsInHeadersCheck.cpp | 2 +- clang-tidy/misc/RedundantExpressionCheck.cpp | 6 +- clang-tidy/misc/StaticAssertCheck.cpp | 4 +- .../misc/ThrowByValueCatchByReferenceCheck.cpp | 8 +- .../misc/UnconventionalAssignOperatorCheck.cpp | 4 +- clang-tidy/misc/UnusedAliasDeclsCheck.cpp | 4 +- clang-tidy/misc/UnusedParametersCheck.cpp | 8 +- clang-tidy/misc/UnusedUsingDeclsCheck.cpp | 4 +- clang-tidy/modernize/AvoidBindCheck.cpp | 4 +- clang-tidy/modernize/MakeSmartPtrCheck.cpp | 6 +- clang-tidy/modernize/PassByValueCheck.cpp | 6 +- clang-tidy/modernize/RawStringLiteralCheck.cpp | 6 +- clang-tidy/modernize/RedundantVoidArgCheck.cpp | 19 +- clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp | 10 +- clang-tidy/modernize/ShrinkToFitCheck.cpp | 4 +- clang-tidy/modernize/UnaryStaticAssertCheck.cpp | 2 +- clang-tidy/modernize/UseBoolLiteralsCheck.cpp | 2 +- clang-tidy/modernize/UseDefaultMemberInitCheck.cpp | 2 +- clang-tidy/modernize/UseEmplaceCheck.cpp | 2 +- clang-tidy/modernize/UseEqualsDefaultCheck.cpp | 2 +- clang-tidy/modernize/UseEqualsDeleteCheck.cpp | 2 +- clang-tidy/modernize/UseNullptrCheck.cpp | 12 +- .../modernize/UseTransparentFunctorsCheck.cpp | 4 +- .../modernize/UseUncaughtExceptionsCheck.cpp | 12 +- clang-tidy/modernize/UseUsingCheck.cpp | 2 +- clang-tidy/objc/AvoidNSErrorInitCheck.cpp | 2 +- clang-tidy/objc/AvoidSpinlockCheck.cpp | 2 +- clang-tidy/performance/FasterStringFindCheck.cpp | 11 +- clang-tidy/performance/ForRangeCopyCheck.cpp | 33 ++-- .../performance/ImplicitConversionInLoopCheck.cpp | 2 +- .../performance/InefficientAlgorithmCheck.cpp | 4 +- .../InefficientVectorOperationCheck.cpp | 6 +- clang-tidy/performance/MoveConstArgCheck.cpp | 6 +- .../performance/TypePromotionInMathFnCheck.cpp | 2 +- .../performance/UnnecessaryValueParamCheck.cpp | 10 +- clang-tidy/readability/AvoidConstParamsInDecls.cpp | 8 +- .../readability/BracesAroundStatementsCheck.cpp | 8 +- clang-tidy/readability/CMakeLists.txt | 1 + clang-tidy/readability/ContainerSizeEmptyCheck.cpp | 4 +- clang-tidy/readability/DeleteNullPointerCheck.cpp | 6 +- clang-tidy/readability/DeletedDefaultCheck.cpp | 4 +- clang-tidy/readability/FunctionSizeCheck.cpp | 8 +- clang-tidy/readability/IdentifierNamingCheck.cpp | 2 +- .../readability/ImplicitBoolConversionCheck.cpp | 20 +-- .../InconsistentDeclarationParameterNameCheck.cpp | 2 +- clang-tidy/readability/MagicNumbersCheck.cpp | 171 ++++++++++++++++++ clang-tidy/readability/MagicNumbersCheck.h | 97 ++++++++++ .../readability/MisleadingIndentationCheck.cpp | 8 +- .../readability/MisplacedArrayIndexCheck.cpp | 2 +- clang-tidy/readability/NamedParameterCheck.cpp | 4 +- clang-tidy/readability/NamespaceCommentCheck.cpp | 4 +- clang-tidy/readability/NonConstParameterCheck.cpp | 2 +- clang-tidy/readability/ReadabilityTidyModule.cpp | 3 + .../readability/RedundantControlFlowCheck.cpp | 2 +- .../readability/RedundantDeclarationCheck.cpp | 2 +- .../readability/RedundantSmartptrGetCheck.cpp | 2 +- .../readability/RedundantStringCStrCheck.cpp | 2 +- .../readability/SimplifyBooleanExprCheck.cpp | 22 +-- .../readability/SimplifySubscriptExprCheck.cpp | 4 +- .../StaticAccessedThroughInstanceCheck.cpp | 4 +- clang-tidy/readability/StringCompareCheck.cpp | 6 +- .../readability/UniqueptrDeleteReleaseCheck.cpp | 10 +- clang-tidy/tool/run-clang-tidy.py | 16 +- clang-tidy/utils/ASTUtils.cpp | 4 +- clang-tidy/utils/NamespaceAliaser.cpp | 2 +- clang-tidy/utils/UsingInserter.cpp | 2 +- clangd/ClangdLSPServer.cpp | 18 +- clangd/ClangdLSPServer.h | 2 + clangd/CodeComplete.cpp | 120 +++++++++++-- clangd/CodeComplete.h | 3 + clangd/CodeCompletionStrings.cpp | 4 +- clangd/Diagnostics.h | 6 + clangd/FindSymbols.cpp | 2 +- clangd/Protocol.cpp | 10 ++ clangd/Protocol.h | 15 ++ clangd/Quality.cpp | 12 ++ clangd/Quality.h | 10 ++ clangd/SourceCode.cpp | 39 +++- clangd/SourceCode.h | 17 +- clangd/TUScheduler.cpp | 2 +- clangd/XRefs.cpp | 6 +- clangd/index/dex/Iterator.cpp | 5 +- clangd/index/dex/Iterator.h | 15 +- clangd/index/dex/Trigram.cpp | 95 ++++++---- clangd/index/dex/Trigram.h | 14 +- docs/ReleaseNotes.rst | 6 + docs/clang-tidy/checks/bugprone-use-after-move.rst | 3 + .../cppcoreguidelines-avoid-magic-numbers.rst | 10 ++ docs/clang-tidy/checks/list.rst | 2 + .../checks/readability-magic-numbers.rst | 113 ++++++++++++ docs/clang-tidy/index.rst | 3 +- test/clang-tidy/bugprone-use-after-move.cpp | 35 ++++ test/clang-tidy/check_clang_tidy.py | 20 ++- test/clang-tidy/hicpp-exception-baseclass.cpp | 53 +++--- test/clang-tidy/modernize-redundant-void-arg.cpp | 43 +++++ test/clang-tidy/performance-for-range-copy.cpp | 5 + test/clang-tidy/readability-magic-numbers.cpp | 199 +++++++++++++++++++++ test/clangd/completion-snippets.test | 13 ++ test/clangd/completion.test | 26 +++ tool-template/ToolTemplate.cpp | 4 +- unittests/clang-tidy/IncludeInserterTest.cpp | 2 +- unittests/clang-tidy/NamespaceAliaserTest.cpp | 10 +- .../clang-tidy/OverlappingReplacementsTest.cpp | 6 +- unittests/clang-tidy/UsingInserterTest.cpp | 4 +- unittests/clangd/CodeCompleteTests.cpp | 101 ++++++++++- unittests/clangd/DexIndexTests.cpp | 81 ++++++--- unittests/clangd/SourceCodeTests.cpp | 15 ++ unittests/clangd/TestFS.cpp | 26 ++- unittests/clangd/TestFS.h | 15 +- unittests/clangd/XRefsTests.cpp | 50 +++++- 175 files changed, 1736 insertions(+), 518 deletions(-) create mode 100644 clang-tidy/readability/MagicNumbersCheck.cpp create mode 100644 clang-tidy/readability/MagicNumbersCheck.h create mode 100644 docs/clang-tidy/checks/cppcoreguidelines-avoid-magic-numbers.rst create mode 100644 docs/clang-tidy/checks/readability-magic-numbers.rst create mode 100644 test/clang-tidy/readability-magic-numbers.cpp