[all-commits] [llvm/llvm-project] 6ee6fa: [OpenMP5.0] Allow pointer arithmetic in motion/map...

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Fri Feb 28 12:16:00 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6ee6fa28a74e9b33475a153f35b169f0c83a6ec6
      https://github.com/llvm/llvm-project/commit/6ee6fa28a74e9b33475a153f35b169f0c83a6ec6
  Author: cchen <cchen at cray.com>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/test/OpenMP/target_map_messages.cpp
    M clang/test/OpenMP/target_teams_map_messages.cpp
    M clang/test/OpenMP/target_update_codegen.cpp
    M clang/test/OpenMP/target_update_from_messages.cpp
    M clang/test/OpenMP/target_update_to_messages.cpp

  Log Message:
  -----------
  [OpenMP5.0] Allow pointer arithmetic in motion/map clause, by Chi Chun
Chen

Summary:
Base declaration in pointer arithmetic expression is determined by
binary search with type information. Take "int *a, *b; *(a+*b)" as an
example, we determine the base by checking the type of LHS and RHS. In
this case the type of LHS is "int *", the type of RHS is "int",
therefore, we know that we need to visit LHS in order to find base
declaration.

Reviewers: ABataev, jdoerfert

Reviewed By: ABataev

Subscribers: guansong, cfe-commits, sandoval, dreachem

Tags: #clang

Differential Revision: https://reviews.llvm.org/D75077




More information about the All-commits mailing list