From c7bf89a46444c6d75ac89395f0663c99cd5e79d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20Techet?= Date: Thu, 7 Jan 2016 23:28:18 +0100 Subject: [PATCH] Treat the "h" extension as a C++ file The extension is used by both C and C++ and lexing/parsing C headers with the C++ parser causes less problems (identifiers named like C++ keywords get highlighted and tags aren't generated for them) than parsing C++ headers with the C parser (parsing and lexing completely broken). --- data/filetype_extensions.conf | 2 +- tests/ctags/bug639639.h.tags | 2 ++ tests/ctags/extern_variable.h.tags | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/filetype_extensions.conf b/data/filetype_extensions.conf index 31f661ae4..3ae14cccc 100644 --- a/data/filetype_extensions.conf +++ b/data/filetype_extensions.conf @@ -10,7 +10,7 @@ Asciidoc=*.asciidoc;*.adoc; ASM=*.asm;*.asm51;*.a51; Batch=*.bat;*.cmd;*.nt; CAML=*.ml;*.mli; -C=*.c;*.h;*.xpm; +C=*.c;*.xpm; C++=*.cpp;*.cxx;*.c++;*.cc;*.h;*.hpp;*.hxx;*.h++;*.hh;*.C;*.H; CUDA=*.cu;*.cuh;*.h; C#=*.cs; diff --git a/tests/ctags/bug639639.h.tags b/tests/ctags/bug639639.h.tags index 9329a4e19..1ddb73f26 100644 --- a/tests/ctags/bug639639.h.tags +++ b/tests/ctags/bug639639.h.tags @@ -1,3 +1,5 @@ # format=tagmanager +Namespace1Ì256Ö0 anon2Ì4Îanon_enum_0Ö0 anon_enum_0Ì2Ö0 +function2Ì1024Í(char* str)ÎNamespace1Ö0Ïint diff --git a/tests/ctags/extern_variable.h.tags b/tests/ctags/extern_variable.h.tags index 1cd027faf..1636b6427 100644 --- a/tests/ctags/extern_variable.h.tags +++ b/tests/ctags/extern_variable.h.tags @@ -1,5 +1,5 @@ # format=tagmanager -CÌ16384Ö0Ïclass +CÌ32768Ö0 SÌ32768Ö0 aÌ32768Ö0Ïint bÌ32768Ö0ÏB -- 2.11.4.GIT