[PATCH] D123300: [Clang] Enable opaque pointers by default

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 12 08:48:38 PDT 2022


mstorsjo added a comment.

In D123300#3444903 <https://reviews.llvm.org/D123300#3444903>, @nikic wrote:

> @mstorsjo Thanks for the report, the issue should be fixed by https://github.com/llvm/llvm-project/commit/8d5c8d57c637d898094af323d1888ea5a3364f8c.

Awesome, thanks! Unfortunately, there seems to be more issues:

  $ cat lazycallgraph.cpp
  typedef char a;
  typedef unsigned b;
  typedef int c;
  namespace {
  typedef void *d;
  void e(void *) {}
  void *f;
  template <typename, typename, typename, typename> void g(d, d, d, d, d h, d i) {
    int (*j)(const void *) = (int (*)(const void *))h;
    c (*k)(int) = (c(*)(int))i;
    int l = j(f);
    k(l);
  }
  } // namespace
  template <typename, typename> void m(b, b, b, const char *) {
    d n, o(&n);
    g<long, short, c, int>(d(), d(), o, d(), d(e), n);
  }
  template void m<c, a>(b, b, b, const char *);
  $ clang -target x86_64-linux-gnu -c lazycallgraph.cpp -O3


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123300/new/

https://reviews.llvm.org/D123300



More information about the llvm-commits mailing list