[cfe-commits] r162639 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/CodeGenCXX/microsoft-abi-default-cc.cpp

Alexander Zinenko ftynse at gmail.com
Tue Feb 19 04:53:52 PST 2013


I investigated it a bit:
the issue is in Sema::MergeFunctionDecl, for the following example
---
struct Foo {
  static void foo(); // CXXMethodDecl->isStatic() = true
};
--
void Foo::foo(); // CXXMethodDecl->isStatic() = false since there's no
static keyword here

But MergeFunctionDecl relies on the latter declaration being static also
when checking CC compatibility.
I'm on it.



On 19 February 2013 12:54, Timur Iskhodzhanov <timurrrr at google.com> wrote:

> 2012/8/25 John McCall <rjmccall at apple.com>:
> > +  void static_baz();
> > +  void __cdecl static_qux();
> FYI these lines are missing 'static' keywords; I've fixed that in r175502.
> Bug found by Alexander Zinenko!
>
> Hm, interesting - looks like a method declared without a CC can be
> defined with __cdecl?..
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130219/02b3bcd7/attachment.html>


More information about the cfe-commits mailing list