instantiate-case.cpp 415 B

123456789101112131415161718192021
  1. // RUN: %clang_cc1 -fsyntax-only -verify %s
  2. template<class T>
  3. static int alpha(T c)
  4. {
  5. return *c; // expected-error{{indirection requires pointer operand}}
  6. }
  7. template<class T>
  8. static void
  9. _shexp_match()
  10. {
  11. switch(1) {
  12. case 1:
  13. alpha(1); // expected-note{{instantiation of function template}}
  14. }
  15. }
  16. int main() {
  17. _shexp_match<char>(); // expected-note{{instantiation of function template}}
  18. return 0;
  19. }