• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

facebookarchive/facebook-clang-plugins: Plugins to clang-analyzer and clang-fron ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

facebookarchive/facebook-clang-plugins

开源软件地址:

https://github.com/facebookarchive/facebook-clang-plugins

开源编程语言:

C++ 75.2%

开源软件介绍:

Deprecation Warning

This repo is deprecated. Development has moved to the Infer repo.

Facebook Clang Plugins

This repository aims to share some useful clang plugins developed at Facebook. They are mostly used by infer.

It contains frontend plugins to the clang compiler to process the syntax of source files directly to accomplish more general tasks; specifically, we have developed a clang-to-ocaml bridge to make code analyses easier.

Structure of the repository

  • libtooling : frontend plugins (currently a clang-to-json AST exporter),

  • clang-ocaml : OCaml libraries to process the JSON output of frontend plugins,

Quick start

The current version of the plugins requires recent version of the clang compiler, re-compiled from source. Clang source which is used by this project can be found in clang/src/

General instructions to compile clang can be found here: http://clang.llvm.org/get_started.html

To compile and use the required version of clang, please run ./clang/setup.sh. Using this script should make the variable CLANG_PREFIX unnecessary to compile the plugin.

Caveat:

  • Because of the nature of C++, clang and the plugins need to be compiled with the exact same C++ libraries.
  • Also, the default stripping command of clang in release mode breaks plugins.

Once the target compiler is installed, make test should run the unit tests.

OCaml users may also run:

make -C clang-ocaml test  #requires proper ocaml libraries, see included clang-ocaml/README

Additional configuration options are available in Makefile.config.

Licence

The plugins are MIT-licensed.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap