[PATCH] [Sema] Don't crash when initializing an incomplete list-initialized variable
Richard Smith
richard at metafoo.co.uk
Fri Apr 17 20:01:59 PDT 2015
================
Comment at: lib/Sema/SemaExprCXX.cpp:5113-5115
@@ +5112,5 @@
+ if (!IsDecltype &&
+ RequireCompleteType(E->getExprLoc(), QualType(RT, 0),
+ diag::err_typecheck_decl_incomplete_type,
+ SourceRange(E->getLocStart(), E->getLocEnd())))
+ return ExprError();
----------------
I think this is the wrong place for this: the code creating the rvalue should be checking that its type is complete.
http://reviews.llvm.org/D8951
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list