<div dir="ltr"><div>Hello all,</div><div><br></div><div>It seems like our __uuidof implementation has some interesting quirks.</div><div><br></div><div>We currently allow:</div><div><div>struct __declspec(uuid("{12345678-1234-1234-1234-1234567890ab}")) uuid;</div>
<div><br></div><div>struct _GUID;</div><div>template <float *></div><div>struct thing {};</div><div><br></div><div>thing<__uuidof(uuid)> x;</div></div><div><br></div><div><br></div>__uuidof is treated as a bit of a celebrity in some areas in clang and I believe it's special treatment makes it easier for gaps like these to show up.<div>
<br></div><div>I don't know what's the best thing to do here but I see two obvious choices:</div><div>1. We continue treating __uuidof as a special thing, making CheckTemplateArgumentAddressOfObjectOrFunction smarter, etc.</div>
<div>2. We change the way we semantically model the keyword/operator so that instead of a specially handled operand, we have a DeclRefExpr like CheckTemplateArgumentAddressOfObjectOrFunction would normally expect.</div><div>
<br></div><div>Thanks</div><div>-- </div><div>David Majnemer</div></div>