Cross Reference: cxx-typeid.cpp
xref: /external/clang/test/Parser/cxx-typeid.cpp
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Download
  • only in cxx-typeid.cpp
1a5728872c7702ddd09537c95bc3cbd20e1f2fb09Daniel Dunbar// RUN: %clang_cc1 -fsyntax-only -verify %s
2c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redl
3c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redl// FIXME: This should really include <typeinfo>, but we don't have that yet.
4c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redlnamespace std {
5c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redl  class type_info;
6c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redl}
7c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redl
8c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redlvoid f()
9c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redl{
10c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redl  (void)typeid(int);
11c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redl  (void)typeid(0);
122fe9b7fb07dff15dd15dd8755a9a9e6de0fe46fcRichard Trieu  (void)typeid 1; // expected-error {{expected '(' after 'typeid'}}
13c42e1183846228a7fa5143ad76507d6d60f5c6f3Sebastian Redl}
14

Indexes created Fri Mar 13 02:32:08 CET 2015