[RISCV] Add shrinkwrap test cases showing gaps in current impl
[llvm-project.git] / clang / test / SemaTemplate / overload-uneval.cpp
blobc952ef8ec7c452727dcc8dffa6088b69006228cf
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused %s
2 // expected-no-diagnostics
4 // Tests that overload resolution is treated as an unevaluated context.
5 // PR5541
6 struct Foo
8 Foo *next;
9 };
11 template <typename>
12 struct Bar
17 template <typename T>
18 class Wibble
20 typedef Bar<T> B;
22 static inline B *concrete(Foo *node) {
23 int a[sizeof(T) ? -1 : -1];
24 return reinterpret_cast<B *>(node);
27 public:
28 class It
30 Foo *i;
32 public:
33 inline operator B *() const { return concrete(i); }
34 inline bool operator!=(const It &o) const { return i !=
35 o.i; }
39 void f() {
40 Wibble<void*>::It a, b;
42 a != b;