-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Units,C++: add a case for testing the change proposed in #1656
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
4 changed files
with
29 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
S::T::E::alpha and S::T::E::beta are not included intentionally | ||
Taken from the comments of cxx_tag.c:: | ||
|
||
// If the scope kind is enumeration then we need to remove the | ||
// last scope part. This is what old ctags did. | ||
|
2 changes: 2 additions & 0 deletions
2
Units/parser-cxx.r/enum-in-a-struct--with-q-extra.d/args.ctags
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--sort=no | ||
--extra=+q |
12 changes: 12 additions & 0 deletions
12
Units/parser-cxx.r/enum-in-a-struct--with-q-extra.d/expected.tags
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
S input.cc /^namespace S {$/;" n file: | ||
T input.cc /^ struct T {$/;" s namespace:S file: | ||
S::T input.cc /^ struct T {$/;" s namespace:S file: | ||
E input.cc /^ enum E {$/;" g struct:S::T file: | ||
S::T::E input.cc /^ enum E {$/;" g struct:S::T file: | ||
alpha input.cc /^ alpha, beta,$/;" e enum:S::T::E file: | ||
S::T::alpha input.cc /^ alpha, beta,$/;" e enum:S::T::E file: | ||
beta input.cc /^ alpha, beta,$/;" e enum:S::T::E file: | ||
S::T::beta input.cc /^ alpha, beta,$/;" e enum:S::T::E file: | ||
elt input.cc /^ } elt;$/;" m struct:S::T typeref:enum:S::T::E file: | ||
S::T::elt input.cc /^ } elt;$/;" m struct:S::T typeref:enum:S::T::E file: | ||
s input.cc /^struct S::T s = { .elt = S::T::E::alpha };$/;" v typeref:struct:S::T |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace S { | ||
struct T { | ||
enum E { | ||
alpha, beta, | ||
} elt; | ||
}; | ||
} | ||
|
||
struct S::T s = { .elt = S::T::E::alpha }; |