diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2020-01-03 11:58:16 -0500 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2020-01-03 12:13:03 -0500 |
commit | add743b4348095c0d2e407c7a2b8a87a5f8194b0 (patch) | |
tree | 5ef6842681207c2bb1fd9e4a24bbe81de0c562a8 /clang/lib/Sema/SemaOpenMP.cpp | |
parent | ba3484c051b62a662c555200f4a03b2e8df8e094 (diff) | |
download | bcm5719-llvm-add743b4348095c0d2e407c7a2b8a87a5f8194b0.tar.gz bcm5719-llvm-add743b4348095c0d2e407c7a2b8a87a5f8194b0.zip |
[OPENMP]Fix crash on error message for declare reduction.
If the qualified reduction name is specified and not found, the compiler
may crash because of not specified parameter.
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 5a4254f11a8..d2393c17bcc 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -13498,7 +13498,8 @@ buildDeclareReductionRef(Sema &SemaRef, SourceLocation Loc, SourceRange Range, } } if (ReductionIdScopeSpec.isSet()) { - SemaRef.Diag(Loc, diag::err_omp_not_resolved_reduction_identifier) << Range; + SemaRef.Diag(Loc, diag::err_omp_not_resolved_reduction_identifier) + << Ty << Range; return ExprError(); } return ExprEmpty(); |