[libcxx-commits] [PATCH] D86685: [libcxx] Fix the broken test after D82657.

Sam McCall via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 27 08:26:53 PDT 2020


sammccall added a comment.

@hokein here's a minimized version:

  template <int>
  struct flag {
    static constexpr bool value = true;
  };
  
  template <class T>
  struct trait : flag<sizeof(T)> {};
  
  template <class T, bool Inferred = trait<T>::value>
  struct a {};
  
  template <class T>
  class b {
    a<T> x;
    using U = a<T>;
  };
  
  template <int>
  struct Impossible {
    static_assert(false, "");
  };
  
  constexpr auto v = trait<b<Impossible<0>>>::value;

It does look like a bug somewhere in clang.

Strangely, `-Xclang -fno-recovery-ast-type` doesn't make it go away - how sure are we that your patch is the culprit? And how sure are we that those flags work properly?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86685



More information about the libcxx-commits mailing list