forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SubsequentDecls.h
25 lines (19 loc) · 927 Bytes
/
SubsequentDecls.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//------------------------------------------------------------------------------
// CLING - the C++ LLVM-based InterpreterG :)
//
// This file is dual-licensed: you can choose to license it under the University
// of Illinois Open Source License or the GNU Lesser General Public License. See
// LICENSE.TXT for details.
//------------------------------------------------------------------------------
// This file contains an error (redefinition of '__my_i') and it gets included
// so all the contents should be reverted from the AST transparently.
// Template specializations
template<> int TemplatedF(int t){return t + 10;}
template<> double TemplatedF(double t){return t + 3.14;}
// Aliases
typedef struct A AStruct;
// Overloads
int OverloadedF(int i){ return i + 10;};
// Redeclarations
int __my_i = 0; // expected-note {{previous definition is here}}
int __my_i = 0; // expected-error {{redefinition of '__my_i'}}