Index: clang/lib/Sema/SemaDeclCXX.cpp =================================================================== --- clang/lib/Sema/SemaDeclCXX.cpp +++ clang/lib/Sema/SemaDeclCXX.cpp @@ -16819,8 +16819,9 @@ if (InnerCond && isa(InnerCond)) { // Drill down into concept specialization expressions to see why they // weren't satisfied. - Diag(StaticAssertLoc, diag::err_static_assert_failed) - << !AssertMessage << Msg.str() << AssertExpr->getSourceRange(); + Diag(AssertExpr->getSourceRange().getBegin(), + diag::err_static_assert_failed) + << !AssertMessage << Msg.str() << AssertExpr->getSourceRange(); ConstraintSatisfaction Satisfaction; if (!CheckConstraintSatisfaction(InnerCond, Satisfaction)) DiagnoseUnsatisfiedConstraint(Satisfaction); @@ -16831,7 +16832,8 @@ << Msg.str() << InnerCond->getSourceRange(); DiagnoseStaticAssertDetails(InnerCond); } else { - Diag(StaticAssertLoc, diag::err_static_assert_failed) + Diag(AssertExpr->getSourceRange().getBegin(), + diag::err_static_assert_failed) << !AssertMessage << Msg.str() << AssertExpr->getSourceRange(); PrintContextStack(); }