[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause
    Alexey Bataev via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Feb 27 13:30:33 PST 2020
    
    
  
ABataev added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15684-15685
+  bool VisitUnaryOperator(UnaryOperator *UO) {
+    if (SemaRef.getLangOpts().OpenMP < 50 || UO->getOpcode() != UO_Deref ||
+        !UO->isLValue()) {
+      emitErrorMsg();
----------------
`UO_Deref` is always r-value. So, `!UO->isLValue()` will be always triggered for `UO_Deref`. You can just exclude it from the condition.
================
Comment at: clang/test/OpenMP/target_update_codegen.cpp:375
+  // CK6-DAG: [[L_VAL]] = load i32, i32* [[L_ADDR:%.+]]
+  // CK6-DAG: store i32 [[L:%.+]], i32* [[L_ADDR]]
+  #pragma omp target update to(*(B+l))
----------------
Seems to me, `L` is not used in the test, so you can just use `{{%.+}}` here
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75077/new/
https://reviews.llvm.org/D75077
    
    
More information about the cfe-commits
mailing list