File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -3172,13 +3172,11 @@ static void DiagnoseForRangeVariableCopies(Sema &SemaRef,
31723172 if (SemaRef.inTemplateInstantiation ())
31733173 return ;
31743174
3175+ SourceLocation Loc = ForStmt->getBeginLoc ();
31753176 if (SemaRef.Diags .isIgnored (
3176- diag::warn_for_range_const_ref_binds_temp_built_from_ref,
3177- ForStmt->getBeginLoc ()) &&
3178- SemaRef.Diags .isIgnored (diag::warn_for_range_ref_binds_ret_temp,
3179- ForStmt->getBeginLoc ()) &&
3180- SemaRef.Diags .isIgnored (diag::warn_for_range_copy,
3181- ForStmt->getBeginLoc ())) {
3177+ diag::warn_for_range_const_ref_binds_temp_built_from_ref, Loc) &&
3178+ SemaRef.Diags .isIgnored (diag::warn_for_range_ref_binds_ret_temp, Loc) &&
3179+ SemaRef.Diags .isIgnored (diag::warn_for_range_copy, Loc)) {
31823180 return ;
31833181 }
31843182
You can’t perform that action at this time.
0 commit comments