Index: clang/lib/Parse/ParseOpenMP.cpp =================================================================== --- clang/lib/Parse/ParseOpenMP.cpp +++ clang/lib/Parse/ParseOpenMP.cpp @@ -2706,7 +2706,8 @@ return nullptr; SmallVector Data; do { - ExprResult Allocator = ParseCXXIdExpression(); + ExprResult Allocator = + getLangOpts().CPlusPlus ? ParseCXXIdExpression() : ParseExpression(); if (Allocator.isInvalid()) { SkipUntil(tok::comma, tok::r_paren, tok::annot_pragma_openmp_end, StopBeforeMatch); @@ -2718,7 +2719,8 @@ BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end); T.consumeOpen(); - ExprResult AllocatorTraits = ParseCXXIdExpression(); + ExprResult AllocatorTraits = + getLangOpts().CPlusPlus ? ParseCXXIdExpression() : ParseExpression(); T.consumeClose(); if (AllocatorTraits.isInvalid()) { SkipUntil(tok::comma, tok::r_paren, tok::annot_pragma_openmp_end,