Sure, I'll add a SemaCXX test for that.
================
Comment at: lib/AST/ExprConstant.cpp:4395
@@ -4393,1 +4394,3 @@
+ if (VD->hasAttr<DLLImportAttr>())
+ return ZeroInitialization(E);
return Success(VD);
----------------
Reid Kleckner wrote:
> How is ZeroInitialization(E) different from Error(E)?
It isn't other than being, in my opinion, less confusing. This isn't actually
an error per-se because it isn't outright nonsense, it's just not evaluatable.
This matches what the codebase does for:
int x = foo();
where `x` is at file scope and `foo` isn't constexpr.
http://reviews.llvm.org/D4250
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits