sinelaw / elfs-clang-plugins Goto Github PK
View Code? Open in Web Editor NEWA collection of clang plugins for safer C programming
License: MIT License
A collection of clang plugins for safer C programming
License: MIT License
Hello,
I've tried to build this - it looks like a useful tool - but I've had some trouble. On Ubuntu 16.04 despite a successful apt-get install llvm-3.7-dev clang-3.7 libclang-3.7-dev
I'm not able to make:-
mtandy@mtandy-desktop:~/Documents/elfs-clang-plugins$ make
g++ `llvm-config-64 --cxxflags` -O2 -g "enums_conversion/enums_conversion.cpp" -o "enums_conversion.o" -c -Wall -Wextra -Wno-unused -Wno-strict-aliasing -Werror
/bin/sh: 1: llvm-config-64: not found
enums_conversion/enums_conversion.cpp:3:51: fatal error: clang/Frontend/FrontendPluginRegistry.h: No such file or directory
compilation terminated.
Makefile:31: recipe for target 'enums_conversion.o' failed
make: *** [enums_conversion.o] Error 1
I can change the makefile to add -I /usr/lib/llvm-3.7/include/
to the g++ command - but that gives me hundreds of errors.
Presumably my environment is misconfigured. Do you think you could provide a travis buildfile or something similar, showing me how it's done?
Hi,
I have read your blog and your plugins, and It seems you don't use it. I cannot achieve what I want and maybe you know how to do it.
I am able to create a plugin FrontendPluginRegistry::Add
that uses ASTConsumer
and Visitor
pattern, and modify the source code with Rewriter
. The problem is that I cannot modify the source code that is compiled in that phase. I don't know how to affect the compilation itself. I tried with AddBeforeMainAction
with no luck.
I only saw an option to overwrite source files, but it will modify the user files and it will need another run to compile the modifications. I just want to modify the files at runtime, in one step. I suppose it will need some sort of "after my plugin is executed, reparse again and run the whole compilation phase again".
I am executing the plugin like this clang++ ${FLAGS} -Xclang -load -Xclang ${path_to_so} -Xclang -add-plugin -Xclang $plugin_name -o $BIN ${FILE}
.
The thing is that I need a plugin. I don't want to create an independent tool to do it (like libTooling
with a main
function).
Regards,
rNoz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.