missing return in lib/Sema/SemaDeclAttr.cpp???

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

missing return in lib/Sema/SemaDeclAttr.cpp???

dawn
In HandleCallConvAttr(), the case for "AttributeList::AT_thiscall" isn't
followed by a return, so the case for "AttributeList::AT_cdecl" will be
executed also.  Is this intentional?

The code appears to have been added in this rev:

r104026 | dgregor | 2010-05-18 09:57:00 -0700 (Tue, 18 May 2010) | 2 lines

Add support for Microsoft's __thiscall, from Steven Watanabe!

-Dawn
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: missing return in lib/Sema/SemaDeclAttr.cpp???

Douglas Gregor

On Aug 30, 2010, at 2:38 PM, [hidden email] wrote:

> In HandleCallConvAttr(), the case for "AttributeList::AT_thiscall" isn't
> followed by a return, so the case for "AttributeList::AT_cdecl" will be
> executed also.  Is this intentional?

Definitely a bug. Nice catch!

> The code appears to have been added in this rev:
>
> r104026 | dgregor | 2010-05-18 09:57:00 -0700 (Tue, 18 May 2010) | 2 lines


... and the egg is on my face.

Fixed in Clang r112552.

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev