|
From: | Shigio YAMAGUCHI |
Subject: | Re: global c++ parser misses C++11 type alias (using) |
Date: | Tue, 14 Jul 2015 15:34:50 +0900 |
Dear Shigio,Thanks for the patch! It works very well, and fixes the bug that was in my submitted patch. I’ll be using your patch from now on.Cheers,EvgheniiOn Jul 14, 2015, at 04:30, Shigio YAMAGUCHI <address@hidden> wrote:<using-fix.diff>Hi,Thank you for the patch.I corrected the bug by a little different method.When you can test, it's lucky.Regards,Shigio2015-07-08 20:16 GMT+09:00 Evghenii Gaburov <address@hidden>:OS: Linux Ubuntu 14.04LTS & Mac OS X 10.10.2GLOBAL: v6.5, built from source via configure && make && make installCOMMAND : gtags -vEXPECT: detect C++11 type alias (using A = B;)RESULT: C++11 type alias is not taggedHere is the reproducer:—————————————$ cat > cvt.cppusing my_type1 = double;typedef float my_type2;my_type2 cvt(my_type1 x){return static_cast<my_type2>(x);}^C$ gtags --versiongtags (GNU GLOBAL) 6.5Copyright (c) 2015 Tama Communications CorporationLicense GPLv3+: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>This is free software; you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.$ gtags -v[Wed Jul 08 13:11:29 CEST 2015] Gtags started.[Wed Jul 08 13:11:29 CEST 2015] Creating 'GTAGS' and 'GRTAGS'.[1] extracting tags of cvt.cpp[Wed Jul 08 13:11:29 CEST 2015] Done.$ global -x my_type1$ global -x my_type2my_type2 2 cvt.cpp typedef float my_type2;$Attached is a simple patch [by no means complete] that seems to fix the problem:—————————————————$ patch -p1 < global-6.5-using.patchpatching file libparser/Cpp.c$ make && make install$ rm -rf G*$ gtags -v[Wed Jul 08 13:14:09 CEST 2015] Gtags started.[Wed Jul 08 13:14:09 CEST 2015] Creating 'GTAGS' and 'GRTAGS'.[1] extracting tags of cvt.cpp[Wed Jul 08 13:14:09 CEST 2015] Done.$ global -x my_type1my_type1 1 cvt.cpp using my_type1 = double;$ global -x my_type2my_type2 2 cvt.cpp typedef float my_type2;Cheers,Evghenii
_______________________________________________
Bug-global mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-global--Shigio YAMAGUCHI <address@hidden>PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3
[Prev in Thread] | Current Thread | [Next in Thread] |