It'd be simpler and would more directly match the C specification (and would handle a few other cases better, such as placeholder types and atomic types) if you instead passed the operand through DefaultLvalueConversion rather than matching against the decayed form of the type.
On Wed, Nov 4, 2015 at 11:23 AM, Aaron Ballman <aa...@aaronballman.com> wrote: > The control expression for a _Generic selection expression should have > its type decayed and qualifiers stripped when determining which > selection it matches. e.g., the following should compile: > > _Generic("test", char *: 1); > const int i = 12; > _Generic(i, int: 1); > > This patch fixes PR16340. > > ~Aaron >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits