[cfe-commits] Note and FixIt for additional case of vexing parse

Nikola Smiljanic popizdeh at gmail.com
Wed Jul 25 04:10:05 PDT 2012


> Because that could never be valid as an initializer.

I have no idea what I was thinking :)

What I find confusing is that you're thinking in terms of when to
suppress the warning and I'm looking for the opposite, conditions that
need to be satisfied to emit the warning.

If the return type is a reference then we only have to check that
there is exactly one argument as this is the only valid way (that I
know of) to initialize a reference. This suppresses the warning for
zero arguments and more than one argument no matter if the return type
is a class type or not.

Here's a new patch, the only failing test is this piece of
objective-c++ code that I don't know what to do about? This is
ambiguous if we disregard the attribute, but the attribute makes the
fixit incorrect.

[[noreturn]]int(e)();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vexing.patch
Type: application/octet-stream
Size: 31394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120725/aea8ca2e/attachment.obj>


More information about the cfe-commits mailing list