diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -60,6 +60,8 @@ - No longer assert/miscompile when trying to make a vectorized ``_BitInt`` type using the ``ext_vector_type`` attribute (the ``vector_size`` attribute was already properly diagnosing this case). +- Fix clang not properly diagnosing the failing subexpression when chained + binary operators are used in a ``static_assert`` expression. Improvements to Clang's diagnostics ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -3585,9 +3585,8 @@ if (BinOp->getOpcode() == BO_LAnd) { collectConjunctionTerms(BinOp->getLHS(), Terms); collectConjunctionTerms(BinOp->getRHS(), Terms); + return; } - - return; } Terms.push_back(Clause);