forked from universal-ctags/ctags
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
C++: fix "export" declaration wrongly marked as file-local (file: and…
… extras:fileScope) Close universal-ctags#4003. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
11 changed files
with
77 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
A input.cpp /^export module A; \/\/ declares the primary module interface unit for named module 'A'$/;" M properties:export | ||
hello input.cpp /^export char const* hello() { return "hello"; }$/;" f typeref:typename:char const * properties:export | ||
world input.cpp /^char const* world() { return "world"; }$/;" f typeref:typename:char const * | ||
hi input.cpp /^export namespace hi$/;" n file: properties:export | ||
hi input.cpp /^export namespace hi$/;" n properties:export | ||
english input.cpp /^ char const* english() { return "Hi!"; }$/;" f namespace:hi typeref:typename:char const * | ||
french input.cpp /^ char const* french() { return "Salut!"; }$/;" f namespace:hi typeref:typename:char const * | ||
x input.cpp /^export enum x { a = 1 };$/;" g file: properties:export | ||
a input.cpp /^export enum x { a = 1 };$/;" e enum:x file: | ||
td input.cpp /^export typedef int td;$/;" t typeref:typename:int file: properties:export | ||
x input.cpp /^export enum x { a = 1 };$/;" g properties:export | ||
a input.cpp /^export enum x { a = 1 };$/;" e enum:x | ||
td input.cpp /^export typedef int td;$/;" t typeref:typename:int properties:export | ||
s_ input.cpp /^struct s_ {$/;" s file: | ||
mbr input.cpp /^ int mbr;$/;" m struct:s_ typeref:typename:int file: | ||
s input.cpp /^export struct s {$/;" s file: properties:export | ||
mbr input.cpp /^ int mbr;$/;" m struct:s typeref:typename:int file: | ||
s input.cpp /^export struct s {$/;" s properties:export | ||
mbr input.cpp /^ int mbr;$/;" m struct:s typeref:typename:int | ||
s__ input.cpp /^struct s__ {$/;" s file: | ||
mbr input.cpp /^ int mbr;$/;" m struct:s__ typeref:typename:int file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
Y input.cpp /^export module Y;$/;" M properties:export | ||
Z0 input.cpp /^ namespace Z0 {$/;" n file: properties:export | ||
Z0 input.cpp /^ namespace Z0 {$/;" n properties:export | ||
z0 input.cpp /^ int z0;$/;" v namespace:Z0 typeref:typename:int | ||
X input.cpp /^namespace X {$/;" n file: | ||
a input.cpp /^ int a;$/;" v namespace:X typeref:typename:int | ||
x input.cpp /^ int x;$/;" v namespace:X typeref:typename:int properties:export | ||
f input.cpp /^ int f(int i);$/;" p namespace:X typeref:typename:int file: properties:export | ||
u input.cpp /^ union u {$/;" u namespace:X file: properties:export | ||
mbr input.cpp /^ int mbr;$/;" m union:X::u typeref:typename:int file: | ||
f input.cpp /^ int f(int i);$/;" p namespace:X typeref:typename:int properties:export | ||
u input.cpp /^ union u {$/;" u namespace:X properties:export | ||
mbr input.cpp /^ int mbr;$/;" m union:X::u typeref:typename:int | ||
b input.cpp /^ int b;$/;" v namespace:X typeref:typename:int | ||
m input.cpp /^int m;$/;" v typeref:typename:int | ||
z input.cpp /^ int z;$/;" v typeref:typename:int properties:export | ||
E input.cpp /^ enum E { a = 1 };$/;" g file: properties:export | ||
a input.cpp /^ enum E { a = 1 };$/;" e enum:E file: | ||
td input.cpp /^ typedef int td;$/;" t typeref:typename:int file: properties:export | ||
c input.cpp /^ class c {$/;" c file: properties:export | ||
mbr input.cpp /^ int mbr;$/;" m class:c typeref:typename:int file: | ||
E input.cpp /^ enum E { a = 1 };$/;" g properties:export | ||
a input.cpp /^ enum E { a = 1 };$/;" e enum:E | ||
td input.cpp /^ typedef int td;$/;" t typeref:typename:int properties:export | ||
c input.cpp /^ class c {$/;" c properties:export | ||
mbr input.cpp /^ int mbr;$/;" m class:c typeref:typename:int | ||
n input.cpp /^int n;$/;" v typeref:typename:int | ||
o input.cpp /^static int o;$/;" v typeref:typename:int file: properties:static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,4 @@ export { | |
}; | ||
} | ||
int n; | ||
static int o; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
mylib input.cpp /^export module mylib;$/;" module properties:export | ||
X input.cpp /^export namespace X {$/;" namespace file: properties:export | ||
X input.cpp /^export namespace X {$/;" namespace properties:export | ||
i input.cpp /^ int i;$/;" variable namespace:X typeref:typename:int | ||
Z input.cpp /^export namespace Z = X;$/;" alias file: properties:export name:X | ||
Z input.cpp /^export namespace Z = X;$/;" alias properties:export name:X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Delta input.cpp /^export module Delta;$/;" module roles:def properties:export | ||
Param input.cpp /^export using Param = int;$/;" typedef typeref:typename:int file: roles:def properties:export | ||
Param input.cpp /^export using ::Param;$/;" name file: roles:def properties:export | ||
Param input.cpp /^export using ::Param; \/\/ We can declare an object more than twice.$/;" name file: roles:def properties:export | ||
fn input.cpp /^export void fn();$/;" prototype typeref:typename:void file: roles:def properties:export | ||
Param input.cpp /^export using Param = int;$/;" typedef typeref:typename:int roles:def properties:export | ||
Param input.cpp /^export using ::Param;$/;" name roles:def properties:export | ||
Param input.cpp /^export using ::Param; \/\/ We can declare an object more than twice.$/;" name roles:def properties:export | ||
fn input.cpp /^export void fn();$/;" prototype typeref:typename:void roles:def properties:export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters