diff --git a/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h b/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h index 95216368492ca..d72d021f44838 100644 --- a/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h +++ b/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h @@ -137,7 +137,7 @@ class ExpandModularHeadersPPCallbacks : public PPCallbacks { std::unique_ptr PP; bool EnteredMainFile = false; bool StartedLexing = false; - Token CurrentToken; + Token CurrentToken = Token(); }; } // namespace tooling diff --git a/clang-tools-extra/clang-tidy/bugprone/FloatLoopCounterCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/FloatLoopCounterCheck.cpp index adf2d2b4bcc07..38a0234337756 100644 --- a/clang-tools-extra/clang-tidy/bugprone/FloatLoopCounterCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/FloatLoopCounterCheck.cpp @@ -31,6 +31,7 @@ void FloatLoopCounterCheck::registerMatchers(MatchFinder *Finder) { void FloatLoopCounterCheck::check(const MatchFinder::MatchResult &Result) { const auto *FS = Result.Nodes.getNodeAs("for"); + assert(FS && "FS should not be null"); diag(FS->getInc()->getBeginLoc(), "loop induction expression should not have " "floating-point type") diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsAvoidUncheckedContainerAccessCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsAvoidUncheckedContainerAccessCheck.cpp index 54c4692923949..cf4b445a554e8 100644 --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsAvoidUncheckedContainerAccessCheck.cpp +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsAvoidUncheckedContainerAccessCheck.cpp @@ -176,7 +176,7 @@ void ProBoundsAvoidUncheckedContainerAccessCheck::check( } } else if (const auto *MCE = dyn_cast(MatchedExpr)) { // Case: a.operator[](i) or a->operator[](i) - const auto *Callee = dyn_cast(MCE->getCallee()); + const auto *Callee = cast(MCE->getCallee()); if (FixMode == At) { // Cases: a.operator[](i) => a.at(i) and a->operator[](i) => a->at(i) diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst index 4d9dc817c4b52..d1303b1eb3b1b 100644 --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -1827,23 +1827,6 @@ Builtin type aliases Clang provides a few builtin aliases to improve the throughput of certain metaprogramming facilities. -__builtin_common_reference --------------------------- - -.. code-block:: c++ - - template