Fix wrong error message when compiling C souce code:
authorJennifer Yu <jennifer.yu@intel.com>
Thu, 25 May 2023 16:29:59 +0000 (09:29 -0700)
committerJennifer Yu <jennifer.yu@intel.com>
Fri, 26 May 2023 17:14:52 +0000 (10:14 -0700)
commitacb1b4fbb7939faa369337b9b26b960fdc91e4b8
tree80c44a39ca4fe43418038275824cb9063da62f8f
parent235fbe792b4cb167403bba8770629a295ce81c6c
Fix wrong error message when compiling C souce code:
Currently emit error for uses_allocators(alloc(traits)):

called object type 'omp_allocator_handle_t' (aka
'enum omp_allocator_handle_t') is not a function or function pointer

To fix this, since "alloc" is Id expresison(spce 5.2), during the parser
(in ParseOpenMP.cpp), using tryParseCXXIdExpression instead of
ParseExpression for C.

Differential Revision: https://reviews.llvm.org/D151517
clang/lib/Parse/ParseOpenMP.cpp
clang/test/OpenMP/target_uses_allocators.c