From 4958d4c0de2f137e6dc83a9efccaa84433091051 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 13 Nov 2017 23:52:05 +0000 Subject: Merging r313675: ------------------------------------------------------------------------ r313675 | rcraik | 2017-09-19 14:04:23 -0700 (Tue, 19 Sep 2017) | 9 lines [OpenMP] fix seg-faults printing diagnostics with invalid ordered(n) values When the value specified for n in ordered(n) is larger than the number of loops a segmentation fault can occur in one of two ways when attempting to print out a diagnostic for an associated depend(sink : vec): 1) The iteration vector vec contains less than n items 2) The iteration vector vec contains a variable that is not a loop control variable This patch addresses both of these issues. Differential Revision: https://reviews.llvm.org/D38049 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@318116 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticSemaKinds.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/clang/Basic') diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 6456913a15..8dc6e7b460 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -8830,7 +8830,7 @@ def err_omp_firstprivate_distribute_in_teams_reduction : Error< def err_omp_depend_clause_thread_simd : Error< "'depend' clauses cannot be mixed with '%0' clause">; def err_omp_depend_sink_expected_loop_iteration : Error< - "expected %0 loop iteration variable">; + "expected%select{| %1}0 loop iteration variable">; def err_omp_depend_sink_unexpected_expr : Error< "unexpected expression: number of expressions is larger than the number of associated loops">; def err_omp_depend_sink_expected_plus_minus : Error< -- cgit v1.2.3