xref: /Universal-ctags/Units/parser-cxx.r/extern.d/input.cpp (revision edcfb1cf8fbb19ece468906b02687e612d002c3c)
1 // This was initially reported as bug 931@github reported by Corax26 on
2 // 12/05/2016: the extern "C" declarations were missing from the ctags output.
3 //
4 // Additionally this test checks the +{c.properties} field for the "extern"
5 // property being properly set.
6 
7 extern "C" void f(void);
g(void)8 extern "C" void g(void) {}
9 
10 extern "C"
11 {
12   // Please note that h() and i have internal linkage (but their name
13   // mangling is C-style). h() is just a prototype while i is both
14   // a declaration AND a definition of variable.
15   void h(void);
16   int i;
17 
18   // j has external linkage (declaration only).
19   extern int j;
20 }
21