[PATCH] D58463: [CUDA]Delayed diagnostics for the asm instructions.

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 20 14:07:02 PST 2019


tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.

Thank you.



================
Comment at: lib/Sema/Sema.cpp:1494-1496
+    if (getLangOpts().CUDAIsDevice)
+      return CUDADiagIfDeviceCode(Loc, DiagID);
+    return CUDADiagIfHostCode(Loc, DiagID);
----------------
Nit: i'd use ternary op here or explicit if/else to indicate that CUDADiagIfDeviceCode/CUDADiagIfHostCode are treated the same and that CUDADiagIfHostCode() is *not* a catch-all of some kind.

```
return getLangOpts().CUDAIsDevice 
           ? CUDADiagIfDeviceCode(Loc, DiagID) 
           : CUDADiagIfHostCode(Loc, DiagID)

```


Repository:
  rC Clang

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

https://reviews.llvm.org/D58463





More information about the cfe-commits mailing list