Author: jyu2-git Date: 2024-05-03T17:51:42-07:00 New Revision: ae7c7fd37eed7ff76ffddd778685450f084f3162
URL: https://github.com/llvm/llvm-project/commit/ae7c7fd37eed7ff76ffddd778685450f084f3162 DIFF: https://github.com/llvm/llvm-project/commit/ae7c7fd37eed7ff76ffddd778685450f084f3162.diff LOG: Update ParseOpenMP.cpp Move static_cast when return MapType. Added: Modified: clang/lib/Parse/ParseOpenMP.cpp Removed: ################################################################################ diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index b1cff11af590a5..bb1cbcc23318b7 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -4323,13 +4323,12 @@ static OpenMPMapClauseKind isMapType(Parser &P) { if (!Tok.isOneOf(tok::identifier, tok::kw_delete)) return OMPC_MAP_unknown; Preprocessor &PP = P.getPreprocessor(); - OpenMPMapClauseKind MapType = - static_cast<OpenMPMapClauseKind>(getOpenMPSimpleClauseType( - OMPC_map, PP.getSpelling(Tok), P.getLangOpts())); + unsigned MapType = getOpenMPSimpleClauseType( + OMPC_map, PP.getSpelling(Tok), P.getLangOpts()); if (MapType == OMPC_MAP_to || MapType == OMPC_MAP_from || MapType == OMPC_MAP_tofrom || MapType == OMPC_MAP_alloc || MapType == OMPC_MAP_delete || MapType == OMPC_MAP_release) - return MapType; + return static_cast<OpenMPMapClauseKind>(MapType); return OMPC_MAP_unknown; } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits