[PATCH] D20985: [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue.
    Justin Lebar via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Fri Jun  3 14:32:30 PDT 2016
    
    
  
jlebar accepted this revision.
This revision is now accepted and ready to land.
================
Comment at: lib/Sema/SemaDeclAttr.cpp:4044
@@ +4043,3 @@
+// Checks whether an argument of launch_bounds attribute is
+// acceptable, performs implicit conversion to Rvalue and returns
+// non-nullptr Expr result on success. Returns nullptr otherwise and
----------------
Nit, Oxford comma helps some here.
================
Comment at: lib/Sema/SemaDeclAttr.cpp:4046
@@ +4045,3 @@
+// non-nullptr Expr result on success. Returns nullptr otherwise and
+// may output an error.
+static Expr *makeLaunchBoundsArgExpr(Sema &S, Expr *E,
----------------
Presumably it "returns nullptr and outputs an error" otherwise?  Like, we get nullptr iff it outputs an error?
================
Comment at: lib/Sema/SemaDeclAttr.cpp:4079
@@ +4078,3 @@
+  if (ValArg.isInvalid())
+    return nullptr;
+
----------------
Do we need to output an error here, or is does PerformCopyInitialization do so for us?  In any case, is it covered by a test?
http://reviews.llvm.org/D20985
    
    
More information about the cfe-commits
mailing list