Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Eli Friedman | 852871a | 2009-04-29 16:35:53 +0000 | [diff] [blame] | 2 | // PR4103 : Make sure we don't get a bogus unused expression warning |
| 3 | class APInt { |
| 4 | char foo; |
| 5 | }; |
| 6 | class APSInt : public APInt { |
| 7 | char bar; |
| 8 | public: |
| 9 | APSInt &operator=(const APSInt &RHS); |
| 10 | }; |
| 11 | |
| 12 | APSInt& APSInt::operator=(const APSInt &RHS) { |
| 13 | APInt::operator=(RHS); |
| 14 | return *this; |
| 15 | } |
Douglas Gregor | 6a0166e | 2010-01-16 18:17:21 +0000 | [diff] [blame] | 16 | |
| 17 | template<typename T> |
| 18 | struct X { |
| 19 | X(); |
| 20 | }; |
| 21 | |
| 22 | void test() { |
| 23 | X<int>(); |
| 24 | } |