Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CXX / over / over.built / p24.cpp
bloba1c0d4f3f612a0c02d814ae8ee2ef5e1ad9cd867
1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2 // expected-no-diagnostics
4 struct Variant {
5 template <typename T> operator T();
6 };
8 Variant getValue();
10 void testVariant() {
11 bool ret1 = getValue() || getValue();
12 bool ret2 = getValue() && getValue();
13 bool ret3 = !getValue();
16 struct ExplicitVariant {
17 template <typename T> explicit operator T();
20 ExplicitVariant getExplicitValue();
22 void testExplicitVariant() {
23 bool ret1 = getExplicitValue() || getExplicitValue();
24 bool ret2 = getExplicitValue() && getExplicitValue();
25 bool ret3 = !getExplicitValue();