aboutsummaryrefslogtreecommitdiffstats
path: root/ctags.c
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2007-08-06 20:37:25 -0700
committerJosh Triplett <josh@freedesktop.org>2007-08-06 20:37:25 -0700
commit3624a543e3884e2faa9980a2ecb0c10cda646671 (patch)
treef7e56fb83d8d984d7761a82c6dc05d2d392fe764 /ctags.c
parentfdd259520bdb9469d3010fff3b35a9c1f1cc4c7f (diff)
downloadsparse-3624a543e3884e2faa9980a2ecb0c10cda646671.tar.gz
sparse-3624a543e3884e2faa9980a2ecb0c10cda646671.tar.xz
sparse-3624a543e3884e2faa9980a2ecb0c10cda646671.zip
ctags: Handle some new namespaces and symbol types.
ctags didn't handle SYM_KEYWORD, SYM_PROCESSOR, or NS_KEYWORD, and didn't handle NS_PREPROCESSOR correctly. Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'ctags.c')
-rw-r--r--ctags.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ctags.c b/ctags.c
index f5b8fc7..7e129a6 100644
--- a/ctags.c
+++ b/ctags.c
@@ -111,6 +111,8 @@ static void examine_symbol(struct symbol *sym)
return;
if (sym->ident && sym->ident->reserved)
return;
+ if (sym->type == SYM_KEYWORD || sym->type == SYM_PREPROCESSOR)
+ return;
add_tag(sym);
base = sym->ctype.base_type;
@@ -158,11 +160,12 @@ static void examine_namespace(struct symbol *sym)
return;
switch(sym->namespace) {
+ case NS_KEYWORD:
+ case NS_PREPROCESSOR:
+ return;
case NS_LABEL:
sym->kind = 'l';
break;
- case NS_PREPROCESSOR:
- break;
case NS_MACRO:
case NS_UNDEF:
sym->kind = 'd';