[clang] [Clang][OpenMP]Default clause variable category (PR #157063)

via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 11 09:46:16 PDT 2025


================
@@ -3734,6 +3734,32 @@ OMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind,
       ConsumeAnyToken();
     if (Arg.back() == OMPC_DIST_SCHEDULE_static && Tok.is(tok::comma))
       DelimLoc = ConsumeAnyToken();
+  } else if (Kind == OMPC_default) {
----------------
SunilKuravinakop wrote:

This is applicable for even versions before 6.0. Within this if  there is another ` if ` statement at 3748 which has
```
if (Tok.is(tok::colon) && getLangOpts().OpenMP >= 60) { 
} else {
      Arg.push_back(OMPC_DEFAULT_VC_all);
      KLoc.push_back(SourceLocation());
}
```
The rest of the code below ` } else if (Kind == OMPC_default) { `  has been re-used. There is no need for a check for version 6.0 at 3737

https://github.com/llvm/llvm-project/pull/157063


More information about the cfe-commits mailing list