[cfe-commits] [Patch] Fix for r163013 regression and further __interface enhancement
Andy Gibbs
andyg1001 at hotmail.co.uk
Wed Sep 12 02:08:23 PDT 2012
Hi,
Attached are two patches to complement the recent work done by David Robins
on __interface.
The first, interface-fix.diff, corrects a codegen regression created by
r163013 whereby all methods (including constructors) inside an __interface
were being marked pure virtual and were causing the vtable generation to be
invalid.
The second, interface-enh.diff, adds in diagnostics for __interface, to
match the spec laid down by Microsoft, i.e. that interfaces:
* Can inherit from zero or more base interfaces.
* Cannot inherit from a base class.
* Can only contain public, pure virtual methods.
* Cannot contain constructors, destructors, or operators.
* Cannot contain static methods.
* Cannot contain data members; properties are allowed.
[source: http://msdn.microsoft.com/en-us/library/50h7kwtb(v=vs.110).aspx]
And another not explicitly in the spec:
* Cannot be declared 'final'
I've run my test-case against VS2010 (I don't have VS2012), and it generates
similar diagnostics.
I hope the patches are good to commit; any comments welcome, although I'm
travelling over the next few days and may not reply immediately!
Cheers
Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interface-fix.diff
Type: application/octet-stream
Size: 3956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120912/19c47e74/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interface-enh.diff
Type: application/octet-stream
Size: 20071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120912/19c47e74/attachment-0001.obj>
More information about the cfe-commits
mailing list