[all-commits] [llvm/llvm-project] acb1b4: Fix wrong error message when compiling C souce code:

jyu2-git via All-commits all-commits at lists.llvm.org
Fri May 26 10:27:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: acb1b4fbb7939faa369337b9b26b960fdc91e4b8
      https://github.com/llvm/llvm-project/commit/acb1b4fbb7939faa369337b9b26b960fdc91e4b8
  Author: Jennifer Yu <jennifer.yu at intel.com>
  Date:   2023-05-26 (Fri, 26 May 2023)

  Changed paths:
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/test/OpenMP/target_uses_allocators.c

  Log Message:
  -----------
  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




More information about the All-commits mailing list