<div dir="ltr">Any feedback?<div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Thanks,<br>--Serge<br></div></div>
<br><div class="gmail_quote">2015-04-16 0:52 GMT+06:00 Serge Pavlov <span dir="ltr"><<a href="mailto:sepavloff@gmail.com" target="_blank">sepavloff@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ping.</div><div class="gmail_extra"><br clear="all"><div><div>Thanks,<br>--Serge<br></div></div><div><div class="h5">
<br><div class="gmail_quote">2015-03-19 10:22 GMT+06:00 Serge Pavlov <span dir="ltr"><<a href="mailto:sepavloff@gmail.com" target="_blank">sepavloff@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ping.</div><div class="gmail_extra"><br clear="all"><div><div>Thanks,<br>--Serge<br></div></div><div><div>
<br><div class="gmail_quote">2015-03-12 23:30 GMT+06:00 Serge Pavlov <span dir="ltr"><<a href="mailto:sepavloff@gmail.com" target="_blank">sepavloff@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Any feedback?</div><div class="gmail_extra"><br clear="all"><div><div>Thanks,<br>--Serge<br></div></div><div><div>
<br><div class="gmail_quote">2015-03-02 23:54 GMT+06:00 Serge Pavlov <span dir="ltr"><<a href="mailto:sepavloff@gmail.com" target="_blank">sepavloff@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If definition of a class is unknown and out-of-line definition of its<br>
member is encountered, do not parse the member declaration.<br>
This change fixes PR18542.<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D8010&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=eO_njjNY_VmsNqv5xOgSoNHFN0dqi-HV_dqr4NTFamw&s=J2ASH_1DcCu7xLAk-91cL08D2NVZVIzby9cR4kr5M6U&e=" target="_blank">http://reviews.llvm.org/D8010</a><br>
<br>
Files:<br>
lib/Sema/SemaDecl.cpp<br>
test/SemaCXX/incomplete-call.cpp<br>
<br>
Index: lib/Sema/SemaDecl.cpp<br>
===================================================================<br>
--- lib/Sema/SemaDecl.cpp<br>
+++ lib/Sema/SemaDecl.cpp<br>
@@ -4573,12 +4573,14 @@<br>
RequireCompleteDeclContext(D.getCXXScopeSpec(), DC))<br>
return nullptr;<br>
<br>
+ // If a class is incomplete, do not parse entities inside it.<br>
if (isa<CXXRecordDecl>(DC) && !cast<CXXRecordDecl>(DC)->hasDefinition()) {<br>
Diag(D.getIdentifierLoc(),<br>
diag::err_member_def_undefined_record)<br>
<< Name << DC << D.getCXXScopeSpec().getRange();<br>
- D.setInvalidType();<br>
- } else if (!D.getDeclSpec().isFriendSpecified()) {<br>
+ return nullptr;<br>
+ }<br>
+ if (!D.getDeclSpec().isFriendSpecified()) {<br>
if (diagnoseQualifiedDeclaration(D.getCXXScopeSpec(), DC,<br>
Name, D.getIdentifierLoc())) {<br>
if (DC->isRecord())<br>
Index: test/SemaCXX/incomplete-call.cpp<br>
===================================================================<br>
--- test/SemaCXX/incomplete-call.cpp<br>
+++ test/SemaCXX/incomplete-call.cpp<br>
@@ -47,3 +47,15 @@<br>
void test_incomplete_object_call(C& c) {<br>
c(); // expected-error{{incomplete type in call to object of type}}<br>
}<br>
+<br>
+namespace pr18542 {<br>
+ struct X {<br>
+ int count;<br>
+ template<typename CharT> class basic_istream;<br>
+ template<typename CharT><br>
+ void basic_istream<CharT>::read() { // expected-error{{out-of-line definition of 'read' from class 'basic_istream<CharT>' without definition}}<br>
+ count = 0;<br>
+ }<br>
+ };<br>
+}<br>
+<br>
<br>
EMAIL PREFERENCES<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=eO_njjNY_VmsNqv5xOgSoNHFN0dqi-HV_dqr4NTFamw&s=y6C-6RBaPS3QWnRkdKxmODcP8vqQfabNiI1-0aGO5z8&e=" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>