/home/arjun/llvm-project/llvm/utils/unittest/googletest/include/gtest/internal/custom/raw-ostream.h
Line | Count | Source (jump to first uncovered line) |
1 | | //===-- raw-ostream.h - Support for printing using raw_ostream --*- C++ -*-===// |
2 | | // |
3 | | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | | // See https://llvm.org/LICENSE.txt for license information. |
5 | | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | | // |
7 | | //===----------------------------------------------------------------------===// |
8 | | // This file is not part of gtest, but extends it to support LLVM libraries. |
9 | | // This is not a public API for testing - it's a detail of LLVM's gtest. |
10 | | // |
11 | | // gtest allows providing printers for custom types by defining operator<<. |
12 | | // In LLVM, operator<< usually takes llvm:raw_ostream& instead of std::ostream&. |
13 | | // |
14 | | // This file defines a template printable(V), which returns a version of V that |
15 | | // can be streamed into a std::ostream. |
16 | | // |
17 | | // This interface is chosen so that in the default case (printable(V) is V), |
18 | | // the main gtest code calls operator<<(OS, V) itself. gtest-printers carefully |
19 | | // controls the lookup to enable fallback printing (see testing::internal2). |
20 | | //===----------------------------------------------------------------------===// |
21 | | |
22 | | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_RAW_OSTREAM_H_ |
23 | | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_RAW_OSTREAM_H_ |
24 | | |
25 | | namespace llvm_gtest { |
26 | | // StreamSwitch is a trait that tells us how to stream a T into a std::ostream. |
27 | | // By default, we just stream the T directly. We'll specialize this later. |
28 | | template <typename T, typename Enable = void> struct StreamSwitch { |
29 | 0 | static const T& printable(const T& V) { return V; } Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIN7testing14TestPartResultEvE9printableERKS2_ Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIN7testing7MessageEvE9printableERKS2_ |
30 | | }; |
31 | | |
32 | | // printable() returns a version of its argument that can be streamed into a |
33 | | // std::ostream. This may be the argument itself, or some other representation. |
34 | 690 | template <typename T> decltype(auto) printable(const T &V) { |
35 | 690 | // We delegate to the trait, to allow partial specialization. |
36 | 690 | return StreamSwitch<T>::printable(V); |
37 | 690 | } _ZN10llvm_gtest9printableIlEEDcRKT_ Line | Count | Source | 34 | 4 | template <typename T> decltype(auto) printable(const T &V) { | 35 | 4 | // We delegate to the trait, to allow partial specialization. | 36 | 4 | return StreamSwitch<T>::printable(V); | 37 | 4 | } |
_ZN10llvm_gtest9printableIiEEDcRKT_ Line | Count | Source | 34 | 16 | template <typename T> decltype(auto) printable(const T &V) { | 35 | 16 | // We delegate to the trait, to allow partial specialization. | 36 | 16 | return StreamSwitch<T>::printable(V); | 37 | 16 | } |
Unexecuted instantiation: _ZN10llvm_gtest9printableIA12_cEEDcRKT_ _ZN10llvm_gtest9printableIPKcEEDcRKT_ Line | Count | Source | 34 | 32 | template <typename T> decltype(auto) printable(const T &V) { | 35 | 32 | // We delegate to the trait, to allow partial specialization. | 36 | 32 | return StreamSwitch<T>::printable(V); | 37 | 32 | } |
Unexecuted instantiation: _ZN10llvm_gtest9printableIA3_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA5_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableImEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA9_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA256_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA53_cEEDcRKT_ _ZN10llvm_gtest9printableIxEEDcRKT_ Line | Count | Source | 34 | 16 | template <typename T> decltype(auto) printable(const T &V) { | 35 | 16 | // We delegate to the trait, to allow partial specialization. | 36 | 16 | return StreamSwitch<T>::printable(V); | 37 | 16 | } |
Unexecuted instantiation: _ZN10llvm_gtest9printableIA11_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA2_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA10_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIN7testing14TestPartResultEEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA14_cEEDcRKT_ _ZN10llvm_gtest9printableIcEEDcRKT_ Line | Count | Source | 34 | 588 | template <typename T> decltype(auto) printable(const T &V) { | 35 | 588 | // We delegate to the trait, to allow partial specialization. | 36 | 588 | return StreamSwitch<T>::printable(V); | 37 | 588 | } |
Unexecuted instantiation: _ZN10llvm_gtest9printableIA17_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA18_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA15_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA13_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIdEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA29_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA40_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA64_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA59_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA24_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA6_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA30_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA39_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA62_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA31_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA63_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA37_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA68_cEEDcRKT_ _ZN10llvm_gtest9printableIA7_cEEDcRKT_ Line | Count | Source | 34 | 32 | template <typename T> decltype(auto) printable(const T &V) { | 35 | 32 | // We delegate to the trait, to allow partial specialization. | 36 | 32 | return StreamSwitch<T>::printable(V); | 37 | 32 | } |
Unexecuted instantiation: _ZN10llvm_gtest9printableIA4_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA8_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA41_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA19_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA48_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA16_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA35_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA21_cEEDcRKT_ _ZN10llvm_gtest9printableIPcEEDcRKT_ Line | Count | Source | 34 | 2 | template <typename T> decltype(auto) printable(const T &V) { | 35 | 2 | // We delegate to the trait, to allow partial specialization. | 36 | 2 | return StreamSwitch<T>::printable(V); | 37 | 2 | } |
Unexecuted instantiation: _ZN10llvm_gtest9printableIA25_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA22_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA28_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA33_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA47_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA51_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA52_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIN7testing7MessageEEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA50_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA20_cEEDcRKT_ Unexecuted instantiation: _ZN10llvm_gtest9printableIA34_cEEDcRKT_ |
38 | | } // namespace llvm_gtest |
39 | | |
40 | | // If raw_ostream support is enabled, we specialize for types with operator<< |
41 | | // that takes a raw_ostream. |
42 | | #if !GTEST_NO_LLVM_SUPPORT |
43 | | #include "llvm/ADT/Optional.h" |
44 | | #include "llvm/Support/raw_os_ostream.h" |
45 | | #include "llvm/Support/raw_ostream.h" |
46 | | #include <ostream> |
47 | | namespace llvm_gtest { |
48 | | |
49 | | // The printable() of a raw_ostream-enabled type T is a RawStreamProxy<T>. |
50 | | // It uses raw_os_ostream to write the wrapped value to a std::ostream. |
51 | | template <typename T> |
52 | | struct RawStreamProxy { |
53 | | const T& V; |
54 | 690 | friend std::ostream &operator<<(std::ostream &S, const RawStreamProxy<T> &V) { |
55 | 690 | llvm::raw_os_ostream OS(S); |
56 | 690 | OS << V.V; |
57 | 690 | return S; |
58 | 690 | } _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIlEE Line | Count | Source | 54 | 4 | friend std::ostream &operator<<(std::ostream &S, const RawStreamProxy<T> &V) { | 55 | 4 | llvm::raw_os_ostream OS(S); | 56 | 4 | OS << V.V; | 57 | 4 | return S; | 58 | 4 | } |
_ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIiEE Line | Count | Source | 54 | 16 | friend std::ostream &operator<<(std::ostream &S, const RawStreamProxy<T> &V) { | 55 | 16 | llvm::raw_os_ostream OS(S); | 56 | 16 | OS << V.V; | 57 | 16 | return S; | 58 | 16 | } |
Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA12_cEE _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIPKcEE Line | Count | Source | 54 | 32 | friend std::ostream &operator<<(std::ostream &S, const RawStreamProxy<T> &V) { | 55 | 32 | llvm::raw_os_ostream OS(S); | 56 | 32 | OS << V.V; | 57 | 32 | return S; | 58 | 32 | } |
Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA3_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA5_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyImEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA9_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA256_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA53_cEE _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIxEE Line | Count | Source | 54 | 16 | friend std::ostream &operator<<(std::ostream &S, const RawStreamProxy<T> &V) { | 55 | 16 | llvm::raw_os_ostream OS(S); | 56 | 16 | OS << V.V; | 57 | 16 | return S; | 58 | 16 | } |
Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA11_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA2_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA10_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA14_cEE _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIcEE Line | Count | Source | 54 | 588 | friend std::ostream &operator<<(std::ostream &S, const RawStreamProxy<T> &V) { | 55 | 588 | llvm::raw_os_ostream OS(S); | 56 | 588 | OS << V.V; | 57 | 588 | return S; | 58 | 588 | } |
Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA17_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA18_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA15_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA13_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIdEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA29_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA40_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA64_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA59_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA24_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA6_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA30_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA39_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA62_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA31_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA63_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA37_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA68_cEE _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA7_cEE Line | Count | Source | 54 | 32 | friend std::ostream &operator<<(std::ostream &S, const RawStreamProxy<T> &V) { | 55 | 32 | llvm::raw_os_ostream OS(S); | 56 | 32 | OS << V.V; | 57 | 32 | return S; | 58 | 32 | } |
Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA4_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA8_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA41_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA19_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA48_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA16_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA35_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA21_cEE _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIPcEE Line | Count | Source | 54 | 2 | friend std::ostream &operator<<(std::ostream &S, const RawStreamProxy<T> &V) { | 55 | 2 | llvm::raw_os_ostream OS(S); | 56 | 2 | OS << V.V; | 57 | 2 | return S; | 58 | 2 | } |
Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA25_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA22_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA28_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA33_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA47_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA51_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA52_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA50_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA20_cEE Unexecuted instantiation: _ZN10llvm_gtestlsERSoRKNS_14RawStreamProxyIA34_cEE |
59 | | }; |
60 | | |
61 | | // We enable raw_ostream treatment if `(raw_ostream&) << (const T&)` is valid. |
62 | | // We don't want implicit conversions on the RHS (e.g. to bool!), so "consume" |
63 | | // the possible conversion by passing something convertible to const T& instead. |
64 | | template <typename T> struct ConvertibleTo { operator T(); }; |
65 | | template <typename T> |
66 | | struct StreamSwitch<T, decltype((void)(std::declval<llvm::raw_ostream &>() |
67 | | << ConvertibleTo<const T &>()))> { |
68 | 690 | static const RawStreamProxy<T> printable(const T &V) { return {V}; } _ZN10llvm_gtest12StreamSwitchIlvE9printableERKl Line | Count | Source | 68 | 4 | static const RawStreamProxy<T> printable(const T &V) { return {V}; } |
_ZN10llvm_gtest12StreamSwitchIivE9printableERKi Line | Count | Source | 68 | 16 | static const RawStreamProxy<T> printable(const T &V) { return {V}; } |
Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA12_cvE9printableERA12_Kc _ZN10llvm_gtest12StreamSwitchIPKcvE9printableERKS2_ Line | Count | Source | 68 | 32 | static const RawStreamProxy<T> printable(const T &V) { return {V}; } |
Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA3_cvE9printableERA3_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvE9printableERKS6_ Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA5_cvE9printableERA5_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchImvE9printableERKm Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA9_cvE9printableERA9_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA256_cvE9printableERA256_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA53_cvE9printableERA53_Kc _ZN10llvm_gtest12StreamSwitchIxvE9printableERKx Line | Count | Source | 68 | 16 | static const RawStreamProxy<T> printable(const T &V) { return {V}; } |
Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA11_cvE9printableERA11_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA2_cvE9printableERA2_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA10_cvE9printableERA10_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA14_cvE9printableERA14_Kc _ZN10llvm_gtest12StreamSwitchIcvE9printableERKc Line | Count | Source | 68 | 588 | static const RawStreamProxy<T> printable(const T &V) { return {V}; } |
Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA17_cvE9printableERA17_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA18_cvE9printableERA18_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA15_cvE9printableERA15_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA13_cvE9printableERA13_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIdvE9printableERKd Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA29_cvE9printableERA29_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA40_cvE9printableERA40_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA64_cvE9printableERA64_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA59_cvE9printableERA59_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA24_cvE9printableERA24_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA6_cvE9printableERA6_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA30_cvE9printableERA30_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA39_cvE9printableERA39_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA62_cvE9printableERA62_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA31_cvE9printableERA31_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA63_cvE9printableERA63_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA37_cvE9printableERA37_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA68_cvE9printableERA68_Kc _ZN10llvm_gtest12StreamSwitchIA7_cvE9printableERA7_Kc Line | Count | Source | 68 | 32 | static const RawStreamProxy<T> printable(const T &V) { return {V}; } |
Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA4_cvE9printableERA4_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA8_cvE9printableERA8_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA41_cvE9printableERA41_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA19_cvE9printableERA19_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA48_cvE9printableERA48_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA16_cvE9printableERA16_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA35_cvE9printableERA35_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA21_cvE9printableERA21_Kc _ZN10llvm_gtest12StreamSwitchIPcvE9printableERKS1_ Line | Count | Source | 68 | 2 | static const RawStreamProxy<T> printable(const T &V) { return {V}; } |
Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA25_cvE9printableERA25_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA22_cvE9printableERA22_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA28_cvE9printableERA28_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA33_cvE9printableERA33_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA47_cvE9printableERA47_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA51_cvE9printableERA51_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA52_cvE9printableERA52_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA50_cvE9printableERA50_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA20_cvE9printableERA20_Kc Unexecuted instantiation: _ZN10llvm_gtest12StreamSwitchIA34_cvE9printableERA34_Kc |
69 | | }; |
70 | | |
71 | | // llvm::Optional has a template operator<<, which means it will not accept any |
72 | | // implicit conversions, so we need to special-case it here. |
73 | | template <typename T> |
74 | | struct StreamSwitch<llvm::Optional<T>, |
75 | | decltype((void)(std::declval<llvm::raw_ostream &>() |
76 | | << std::declval<llvm::Optional<T>>()))> { |
77 | | static const RawStreamProxy<llvm::Optional<T>> |
78 | | printable(const llvm::Optional<T> &V) { |
79 | | return {V}; |
80 | | } |
81 | | }; |
82 | | } // namespace llvm_gtest |
83 | | #endif // !GTEST_NO_LLVM_SUPPORT |
84 | | |
85 | | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_RAW_OSTREAM_H_ |