[PATCH] D20985: [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue.
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 3 15:00:59 PDT 2016
tra marked 3 inline comments as done.
================
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,
----------------
jlebar wrote:
> Presumably it "returns nullptr and outputs an error" otherwise? Like, we get nullptr iff it outputs an error?
It returns nullptr without error message in case of unexpanded parameter pack.
Arguments for that case will be checked after template instantiation is done. See instantiateDependentCUDALaunchBoundsAttr() in SemaTemplateInstantiateDecl.cpp.
================
Comment at: lib/Sema/SemaDeclAttr.cpp:4079
@@ +4078,3 @@
+ if (ValArg.isInvalid())
+ return nullptr;
+
----------------
jlebar wrote:
> 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?
Actually, by this point we've verified that Expr is an ICE. I assume that PerformCopyInitialization() should always succeed for such an expression.
http://reviews.llvm.org/D20985
More information about the cfe-commits
mailing list