Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Eli Friedman | 264c1f8 | 2009-11-19 03:14:00 +0000 | [diff] [blame] | 2 | |
| 3 | template<class T> |
| 4 | static int alpha(T c) |
| 5 | { |
| 6 | return *c; // expected-error{{indirection requires pointer operand}} |
| 7 | } |
| 8 | |
| 9 | template<class T> |
| 10 | static void |
| 11 | _shexp_match() |
| 12 | { |
| 13 | switch(1) { |
| 14 | case 1: |
| 15 | alpha(1); // expected-note{{instantiation of function template}} |
| 16 | } |
| 17 | } |
| 18 | int main() { |
| 19 | _shexp_match<char>(); // expected-note{{instantiation of function template}} |
| 20 | return 0; |
| 21 | } |