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,
3172
3172
if (SemaRef.inTemplateInstantiation ())
3173
3173
return ;
3174
3174
3175
+ SourceLocation Loc = ForStmt->getBeginLoc ();
3175
3176
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)) {
3182
3180
return ;
3183
3181
}
3184
3182
You can’t perform that action at this time.
0 commit comments