Nice, then I leave this for you to deal with. Any ideas regarding llvm bugs
and LLVM_FALLTHROUGH macro?

On Fri, Jun 1, 2012 at 1:47 AM, Richard Smith <[email protected]> wrote:

> On Mon, May 28, 2012, at 8:08PM, Alexander Kornienko <[email protected]>
> wrote:
> > I've put aside header changes for now. There are patches with bug fixes
> (at
> > least, those seem to be bugs to me) and a patch with LLVM_FALLTHROUGH
> macro.
> > Please, take a look at these. Thanks!
>
> Looking at fallthrough-bugs-clang.diff:
>
> --- tools/clang/lib/Sema/SemaDeclAttr.cpp       (revision 157508)
> +++ tools/clang/lib/Sema/SemaDeclAttr.cpp       (working copy)
> @@ -3342,6 +3342,7 @@
>     }
>
>     D->addAttr(::new (S.Context) PcsAttr(Attr.getRange(), S.Context, PCS));
> +    return;
>   }
>   default:
>     llvm_unreachable("unexpected attribute kind");
>
> Thanks for spotting this. The problem here goes deeper than a simple
> missing 'return': this code is not reached at all for the AT_pcs
> attribute. The following crashes clang (with or without this change):
>
> int f() __attribute__((pcs("something")));
>



-- 
Best regards,
Alexander Kornienko
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to