[PATCH] D121765: [CUDA][HIP] Fix hostness check with -fopenmp

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 16 12:37:03 PDT 2022


tra added a subscriber: rsmith.
tra added a comment.

@rsmith - this touches generic Sema functionality and could use your input.

Overall, the patch looks OK to me.



================
Comment at: clang/include/clang/Sema/Sema.h:3327-3328
+  /// a pointer to the function or lambda decl for the function or lambda being
+  /// parsed if \p AllowLambda is true. If we're currently in a 'block', this
+  /// returns the containing context. If \p AllowLambda is false and we are
+  /// currently in a 'lambda', this returns the function enclosing the lambda.
----------------
Perhaps the comment should be restructured so that the cases accected by `AllowLambda` are described together.

```
If parsing a lambda, then return X if `AllowLambda`, Y otherwise.
If in 'block' context, return Z.
For regular functions, return W.
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121765/new/

https://reviews.llvm.org/D121765



More information about the cfe-commits mailing list