All Projects → VernonVan → SameTypeClangPlugin

VernonVan / SameTypeClangPlugin

Licence: MIT License
自定义检查规范的 Clang 插件

Programming Languages

C++
36643 projects - #6 most used programming language
objective c
16641 projects - #2 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to SameTypeClangPlugin

systemc-compiler
This tool translates synthesizable SystemC code to synthesizable SystemVerilog.
Stars: ✭ 128 (+172.34%)
Mutual labels:  llvm, clang
proton-clang-build
A set of scripts to build optimized LLVM and binutils toolchains. See https://github.com/kdrag0n/proton-clang for prebuilts.
Stars: ✭ 30 (-36.17%)
Mutual labels:  llvm, clang
open-ops
Open Optimizing Parallelizing System
Stars: ✭ 21 (-55.32%)
Mutual labels:  llvm, clang
Chromium Clang
Chromium browser compiled with the Clang/LLVM compiler.
Stars: ✭ 77 (+63.83%)
Mutual labels:  llvm, clang
lsif-clang
Language Server Indexing Format (LSIF) generator for C, C++ and Objective C
Stars: ✭ 28 (-40.43%)
Mutual labels:  llvm, clang
CMLFS
Clang-Built Musl Linux From Scratch
Stars: ✭ 51 (+8.51%)
Mutual labels:  llvm, clang
CastXMLSuperbuild
Build CastXML and its dependencies (LLVM/Clang)
Stars: ✭ 32 (-31.91%)
Mutual labels:  llvm, clang
sycl
SYCL for Vitis: Experimental fusion of triSYCL with Intel SYCL oneAPI DPC++ up-streaming effort into Clang/LLVM
Stars: ✭ 80 (+70.21%)
Mutual labels:  llvm, clang
stack-guard
A toy implementation of 'Stack Guard' on top of the LLVM compiler toolchain
Stars: ✭ 21 (-55.32%)
Mutual labels:  llvm, clang
lldbg
A lightweight native GUI for LLDB.
Stars: ✭ 83 (+76.6%)
Mutual labels:  llvm, clang
los
Los是一个c/c++语言编译型的虚拟机。它使用llvm/clang作为其前端,losld做后端对源代码进行编译,生成los指令文件。Los is a c/c++-compiled virtual machine. It uses llvm/clang as its front end, losld does the backend to compile the source code, and generates the los directive file.
Stars: ✭ 46 (-2.13%)
Mutual labels:  llvm, clang
arch-packages
Arch Linux performance important packages
Stars: ✭ 27 (-42.55%)
Mutual labels:  llvm, clang
adorad
Fast, Expressive, & High-Performance Programming Language for those who dare
Stars: ✭ 54 (+14.89%)
Mutual labels:  llvm, clang
OS-CFI
Origin-sensitive Control Flow Integrity (OS-CFI) - USENIX Security 2019
Stars: ✭ 27 (-42.55%)
Mutual labels:  llvm, clang
FPChecker
A dynamic analysis tool to detect floating-point errors in HPC applications.
Stars: ✭ 26 (-44.68%)
Mutual labels:  llvm, clang
CFI-LB
Adaptive Callsite-sensitive Control Flow Integrity - EuroS&P'19
Stars: ✭ 13 (-72.34%)
Mutual labels:  llvm, clang
dumb-obfuscator
Tutorial on how to write the dumbest obfuscator I could think of.
Stars: ✭ 147 (+212.77%)
Mutual labels:  llvm, clang
flextool
C++ compile-time programming (serialization, reflection, code modification, enum to string, better enum, enum to json, extend or parse language, etc.)
Stars: ✭ 32 (-31.91%)
Mutual labels:  llvm, clang
opencilk-project
Monorepo for the OpenCilk compiler, forked from llvm/llvm-project. See the OpenCilk/infrastructure repository for build and installation instructions.
Stars: ✭ 42 (-10.64%)
Mutual labels:  llvm, clang
wasm-toolchain
WebAssembly toolchain
Stars: ✭ 34 (-27.66%)
Mutual labels:  llvm, clang

SameTypeClangPlugin — 自定义检查规范的 Clang 插件

这是一个实现了自定义检查规范的 Clang 插件,插件的实现方法请查看:Clang 之旅--实现一个自定义检查规范的 Clang 插件

效果演示

演示效果

最终实现了:在编译阶段检查某个方法的参数与返回值的类型相同,如果类型不一致的话能抛出编译错误的提示,同时还给出了对应的修改方法(FixIt),点击修改就能改成正确的参数类型 🎉🎉🎉

插件使用方法

  1. 这里下载我已经编译好的 Clang 插件 — SameTypeClangPlugin.dylib
  2. 按照这个教程编译一份 Clang 工程,同时按照教程所示方法将 SameTypeClangPlugin.dylib 插件挂载到 Xcode 中,本 Demo 工程可以用来编译查看该插件的使用效果

生成插件所用到的文件在工程目录 SameTypeClangPlugin -> ClangPlugin 中:CMakeLists.txt 和 SameTypePlugin.cpp。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].