jyu2-git wrote:

> It fails with
> 
> ```
> diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
> index 53d89ce2fa3e..1a4442f38f6d 100644
> --- a/clang/lib/Parse/ParseOpenMP.cpp
> +++ b/clang/lib/Parse/ParseOpenMP.cpp
> @@ -4326,6 +4326,7 @@ static OpenMPMapClauseKind isMapType(Parser &P) {
>    OpenMPMapClauseKind MapType =
>        static_cast<OpenMPMapClauseKind>(getOpenMPSimpleClauseType(
>            OMPC_map, PP.getSpelling(Tok), P.getLangOpts()));
> +  assert((int)MapType < 6);
>    return MapType;
>  }
> ```

So if I MapType is 6 and up it will assert?  Should I check 
if (MapType >= 6)
  MapType = OMPC_MAP_unknown
Thanks.



https://github.com/llvm/llvm-project/pull/90935
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to