<p dir="ltr">That seems fine. I just wanted to be sure it didn't crash.</p>
<div class="gmail_quote">On 25 Jun 2014 18:30, "Serge Pavlov" <<a href="mailto:sepavloff@gmail.com">sepavloff@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Thank you for review.<br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-24 23:24 GMT+07:00 Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">LGTM<br>
<br>
================<br>
Comment at: test/SemaCXX/type-definition-in-specifier.cpp:44<br>
@@ +43,3 @@<br>
+  void func4(struct t19018 {int qq;} x);  // expected-error{{cannot be defined in a parameter type}}<br>
+  void func5(struct {int qq;} x); // expected-error{{cannot be defined in a parameter type}}<br>
+};<br>
----------------<br>
Does this still work if you put something more complex into the struct definition? (For instance, if it tries to reference a member of the surrounding struct, or if it has member functions, or similar.)<br></blockquote><div>

It still works, corresponding testcases are added. However, access to a member of the surrounding struct is resolved as for nested types, the code:</div><div><br></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">

<div class="gmail_extra"><div class="gmail_quote"><div><div>struct aaa {</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>  int xx;</div></div></div></div><div class="gmail_extra"><div class="gmail_quote">

<div><div>  void func5(struct { int qq() { return xx; }; } x);</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>};</div></div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote">

<div><br></div><div>produces also a message:</div><div><br></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div>error: use of non-static data member 'xx' of 'aaa' from nested type ''</div>

</div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>I don't know if this behavior need to be fixed, as type defined in prototype itself is erroneous.</div><div><br></div><div>

Thanks,</div><div>--Serge<br></div></div></div><div class="gmail_extra"><div><br></div></div></div>
</blockquote></div>