[cfe-commits] [PATCH] Fixes for unintended fall-through bugs (-Wimplicit-fallthrough)
alexfh at google.com
Fri Jun 1 02:17:20 PDT 2012
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 <richard at metafoo.co.uk> wrote:
> On Mon, May 28, 2012, at 8:08PM, Alexander Kornienko <alexfh at google.com>
> > I've put aside header changes for now. There are patches with bug fixes
> > least, those seem to be bugs to me) and a patch with LLVM_FALLTHROUGH
> > 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;
> 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")));
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits