Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: tools/clang/plugins/README.chromium

Issue 6368055: Commit my clang plugin and fix up documentation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved to clang/plugins/ Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 Clang plugins: How to use and how to write
Nico 2011/02/02 23:13:06 I'd prefer this to be on the wiki page, and this R
2 ------------------------------------------
3
4 I) Compiling
5 ------------
6
7 TODO(thakis): Explain how to compile these, since I'm not copying the clang
8 build system here.
9
10 II) Using these plugins as part of your build process
11 -----------------------------------------------------
12
13 Nico has awesomely added support to clang to run plugins, and gyp support to
14 run them as part of the normal build process. There are now two gyp variables
15 you can set to run a plugin:
16
17 clang_load: loads a specific shared object plugin
18 clang_add_plugin: tells clang to run a specific PluginASTAction
19
20 So for example, you could use the plugin in this directory with:
21
22 GYP_DEFINES='clang=1 clang_load=/path/to/libFindBadConstructs.so clang_add_plu gin=find-bad-constructs'
23
24 III) Writing plugins
25 --------------------
26
27 As a utility to other plugin authors, I've written the ChromeClassTester class
28 that you can derive from, which will call CheckChromeClass() on every
29 class/struct encountered in a chrome header while filtering out blacklisted
30 classes, namespaces and directories.
Nico 2011/02/02 23:13:06 This should have a paragraph on "You usually don't
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698