summaryrefslogtreecommitdiff
path: root/kythe/cxx/indexer/cxx/testdata/tvar_template/template_exclude.cc
blob: c72f4c41b451d2270869f0ada56d9c364d109ee7 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "exclude_this_file.h"
#include "include_this_file.h"

//- @inc defines/binding VarInc
Included<int> inc;
//- @exc defines/binding VarExc
Excluded<int> exc;

//- VarInc typed TAppIncInt
//- TAppIncInt.node/kind tapp
//- TAppIncInt param.0 _TemplateIncluded
//- _ImpInc instantiates TAppIncInt

//- VarExc typed TAppExcInt
//- TAppExcInt.node/kind tapp
//- TAppExcInt param.0 _TemplateExcluded
//- !{_ImpExc instantiates TAppExcInt}

INC_MACRO
EXC_MACRO

//- @inc_macro defines/binding VarIncMacro
IncludedMacro<int> inc_macro;
//- @exc_macro defines/binding VarExcMacro
ExcludedMacro<int> exc_macro;

//- VarIncMacro typed TAppIncMacroInt
//- TAppIncMacroInt.node/kind tapp
//- TAppIncMacroInt param.0 _TemplateIncludedMacro
//- _ImpMacroInc instantiates TAppIncMacroInt

//- VarExcMacro typed TAppExcMacroInt
//- TAppExcMacroInt.node/kind tapp
//- TAppExcMacroInt param.0 _TemplateExcludedMacro
//- !{_ExcMacroInc instantiates TAppExcMacroInt}

void f() {
  //- @IF ref IncFun
  IF(1);
  //- @EF ref ExcFun
  EF(1);
}

//- _ImpIncFun instantiates IncFun
//- !{_ImpExcFun instantiates ExcFun}

//- @inc_var ref _IncVar
int x = inc_var<int>;
//- @exc_var ref _ExcVar
int y = exc_var<int>;