llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Zahira Ammarguellat (zahiraam) <details> <summary>Changes</summary> Fixed typo and added initialization of modifier. --- Full diff: https://github.com/llvm/llvm-project/pull/174784.diff 3 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticParseKinds.td (+1-1) - (modified) clang/lib/Parse/ParseOpenMP.cpp (+2) - (modified) clang/test/OpenMP/need_device_ptr_kind_messages.cpp (+1-1) ``````````diff diff --git a/clang/include/clang/Basic/DiagnosticParseKinds.td b/clang/include/clang/Basic/DiagnosticParseKinds.td index 662fe16d965b6..f1ef33f1dd981 100644 --- a/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/clang/include/clang/Basic/DiagnosticParseKinds.td @@ -1730,7 +1730,7 @@ def err_omp_expected_modifier : Error<"expected modifier in '%0' clause">; def err_omp_unknown_need_device_ptr_kind : Error< "invalid argument for 'need_device_ptr' kind in 'adjust_args' clause; " - "expected 'fp_nullify' or 'fb_preserve'">; + "expected 'fb_nullify' or 'fb_preserve'">; // Pragma loop support. def err_pragma_loop_missing_argument : Error< diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index 15c3f7594bf44..01fd05961f876 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -5047,6 +5047,8 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, StopBeforeMatch); return false; } + } else { + Data.NeedDevicePtrModifier = OMPC_NEED_DEVICE_PTR_unknown; } } } diff --git a/clang/test/OpenMP/need_device_ptr_kind_messages.cpp b/clang/test/OpenMP/need_device_ptr_kind_messages.cpp index 64b785c4cfc3d..9f3781b1d0420 100644 --- a/clang/test/OpenMP/need_device_ptr_kind_messages.cpp +++ b/clang/test/OpenMP/need_device_ptr_kind_messages.cpp @@ -3,7 +3,7 @@ void __attribute__((noinline)) device_impl(int *xp, int *&xpref, int n) {} #pragma omp declare variant(device_impl) \ - adjust_args(need_device_ptr(foo) : xp, xpref) // omp61-error{{invalid argument for 'need_device_ptr' kind in 'adjust_args' clause; expected 'fp_nullify' or 'fb_preserve'}} // omp61-error{{expected 'match', 'adjust_args', or 'append_args' clause on 'omp declare variant' directive}} + adjust_args(need_device_ptr(foo) : xp, xpref) // omp61-error{{invalid argument for 'need_device_ptr' kind in 'adjust_args' clause; expected 'fb_nullify' or 'fb_preserve'}} // omp61-error{{expected 'match', 'adjust_args', or 'append_args' clause on 'omp declare variant' directive}} void __attribute__((noinline)) host_entry_a(int *xp, int *&xpref, int n) {} #pragma omp declare variant(device_impl) \ `````````` </details> https://github.com/llvm/llvm-project/pull/174784 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
