[cfe-commits] [Patch] Warn about self-init of refs using parenthesized initializers

Jordan Rose jordan_rose at apple.com
Fri Sep 28 09:18:37 PDT 2012


This still doesn't handle C++11 initialization, does it?

void g() {
	int &a{a};
}

Jordan


On Sep 28, 2012, at 4:05 , Hans Wennborg <hans at chromium.org> wrote:

> Hi,
> 
> As pointed out in Wei's email [1], Clang currently fails to warn about
> self-initialized references when using parenthesized initializers:
> 
>  void f() {
>    int &a(a);
>  }
> 
> The attached patch fixes this. Please take a look.
> 
> Thanks,
> Hans
> 
> [1]. http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-September/024582.html
> <ref_self_init_parenthesized_initializers.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list