Chromium Code Reviews| Index: tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc |
| diff --git a/tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc |
| index a739b7dcb73c217669711b10f9620b13f4e2dd10..75796d70916237f5207e54bfb41a672516e008d3 100644 |
| --- a/tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc |
| +++ b/tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc |
| @@ -93,6 +93,36 @@ class TypeTrait2<void> { |
| static const bool value = false; |
| }; |
| +template <typename T, typename U> |
|
dcheng
2016/09/01 21:04:22
Please add some comments to this test (e.g. what s
Łukasz Anforowicz
2016/09/01 21:39:45
Done.
|
| +struct IsSubclass { |
| + private: |
| + typedef char YesType; |
| + struct NoType { |
| + char padding[8]; |
| + }; |
| + |
| + static YesType SubclassCheck(U*); |
| + static NoType SubclassCheck(...); |
| + static T* t_; |
| + |
| + public: |
| + static const bool value = sizeof(SubclassCheck(t_)) == sizeof(YesType); |
| +}; |
| + |
| +template <typename U = void> |
| +struct IsTraceableInCollection { |
| + // Expanded from STATIC_ONLY(IsTraceableInCollection): |
| + private: |
| + IsTraceableInCollection() = delete; |
| + IsTraceableInCollection(const IsTraceableInCollection&) = delete; |
| + IsTraceableInCollection& operator=(const IsTraceableInCollection&) = delete; |
| + void* operator new(unsigned long) = delete; |
| + void* operator new(unsigned long, void*) = delete; |
| + |
| + public: |
| + static const bool value = true; |
| +}; |
| + |
| }; // namespace WTF |
| void F() { |