ctags ignore lists for libc6, libstdc++ and boost

后端 未结 4 682
独厮守ぢ
独厮守ぢ 2020-12-29 22:05

I use ctags with vim and the OmniCppComplete plugin. Currently when generating my tags I do it individually for each library. For libc6 I use the following list of tokens

4条回答
  •  借酒劲吻你
    2020-12-29 22:50

    I had my own list and never thought about adding what you've already listed!

    Here's that updated ignore list for libc6 that I've come up with (Ubuntu 14.04 and GCC 4.8.4) to use as input to the -I option of ctags:

    __attribute__
    __attribute_deprecated__
    __attribute_format_arg__+
    __attribute_format_strfmon__+
    __attribute_malloc__
    __attribute_noinline__
    __attribute_pure__
    __attribute_used__
    __attribute_warn_unused_result__
    __attribute_alloc_size__+
    __attribute_const__
    __attribute_artificial__
    __wur
    __THROW
    __THROWNL
    __BEGIN_DECLS
    __END_DECLS
    __BEGIN_NAMESPACE_STD
    __END_NAMESPACE_STD
    __USING_NAMESPACE_STD+
    __BEGIN_NAMESPACE_C99
    __END_NAMESPACE_C99
    __USING_NAMESPACE_C99+
    __warndecl+
    __warnattr+
    __errordecl+
    __flexarr=[]
    __fortify_function
    __REDICRECT+
    __REDIRECT_NTH+
    __REDIRECT_NTHNL+
    __ASMNAME+
    __ASMNAME2+
    __nonnull+
    __always_inline
    __extern_inline=extern
    __extern_always_inline=extern
    __extension__
    __restrict
    __restrict_arr
    

    I also created the following ignore list for generating a tags file for libstdc++ (GCC 4.8.2 on Ubuntu 14.04) (again, this is input to the -I option):

    _GLIBCXX_BEGIN_NAMESPACE_VERSION
    _GLIBCXX_END_NAMESPACE_VERSION
    _GLIBCXX_BEGIN_NAMESPACE_ALGO
    _GLIBCXX_END_NAMESPACE_ALGO
    _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
    _GLIBCXX_END_NAMESPACE_CONTAINER
    _GLIBCXX_BEGIN_EXTERN_C
    _GLIBCXX_END_EXTERN_C
    _GLIBCXX_VISIBILITY+
    _GLIBCXX_PURE
    _GLIBCXX_CONST
    _GLIBCXX_NORETURN
    _GLIBCXX_CONSTEXPR=constexpr
    _GLIBCXX_USE_CONSTEXPR=constexpr
    _GLIBCXX_THROW_OR_ABORT+
    _GLIBCXX_NOEXCEPT
    _GLIBCXX_USE_NOEXCEPT
    _GLIBCXX_THROW+
    _GLIBCXX_NOTHROW
    

    I changed __attribute__ to be: __attribute__+ to indicate it looks like a function and should be ignored.

    Of course, I have created one for Boost as well, but I think I'll refrain from posting it until someone has a need.

提交回复
热议问题