[PATCH] D26808: [Sema] Don't allow applying address-of operator to a call to a function with __unknown_anytype return type

Sean Callanan via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 18 11:08:16 PST 2016


spyffe accepted this revision.
spyffe added a comment.
This revision is now accepted and ready to land.

I think it's all right to be conservative here.  The inference rules could get quite complicated if (for example) the use looked like this

  extern void foo (double *bar);
  extern __unknown_anytype func();
  // ...
  foo(&func());

One could come up with even more complicated cases.  It's probably not worth making sure they all work.


https://reviews.llvm.org/D26808





More information about the cfe-commits mailing list