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.
main,CPreProcessor: don't include extra tags to macro signature field
Close universal-ctags#2275. During gathering macro parameters for making the signature field of macro, ctags can emit tags for subword extra. These subword extra tags make the signature field broken. Only non-extra tags should be gathered for making the signature field. isTagExtra helper function is introduced to filter non-extra tags from the cork queue. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
6 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
Units/parser-cpreprocessor.r/macro-signature-with-subword-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,3 @@ | ||
--sort=no | ||
--extras=*-{inputFile}{pseudo} | ||
--fields=+{signature}{extras} |
2 changes: 2 additions & 0 deletions
2
Units/parser-cpreprocessor.r/macro-signature-with-subword-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,2 @@ | ||
m input.h /^#define m(/;" d signature:(_argument_) | ||
m input.h /^#define m(/;" d signature:(_argument_) extras:subword |
1 change: 1 addition & 0 deletions
1
Units/parser-cpreprocessor.r/macro-signature-with-subword-extra.d/input.h
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 @@ | ||
#define m(_argument_) 50 |
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