summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/typeid.cpp
blob: f9ad7592187c0d8af21d8fc3ce0d0c69324c5cc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: clang-cc -fsyntax-only -verify %s

void f()
{
  (void)typeid(int); // expected-error {{error: you need to include <typeinfo> before using the 'typeid' operator}}
}

// FIXME: This should really include <typeinfo>, but we don't have that yet.
namespace std {
  class type_info;
}

void g()
{
  (void)typeid(int);
}
OpenPOWER on IntegriCloud