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

Unified 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, 11 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 side-by-side diff with in-line comments
Download patch
Index: tools/clang/plugins/README.chromium
diff --git a/tools/clang/plugins/README.chromium b/tools/clang/plugins/README.chromium
new file mode 100644
index 0000000000000000000000000000000000000000..cac90f1199c43ec4dcd9df88c7e3f36a97e07d18
--- /dev/null
+++ b/tools/clang/plugins/README.chromium
@@ -0,0 +1,30 @@
+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
+------------------------------------------
+
+I) Compiling
+------------
+
+TODO(thakis): Explain how to compile these, since I'm not copying the clang
+build system here.
+
+II) Using these plugins as part of your build process
+-----------------------------------------------------
+
+Nico has awesomely added support to clang to run plugins, and gyp support to
+run them as part of the normal build process. There are now two gyp variables
+you can set to run a plugin:
+
+ clang_load: loads a specific shared object plugin
+ clang_add_plugin: tells clang to run a specific PluginASTAction
+
+So for example, you could use the plugin in this directory with:
+
+ GYP_DEFINES='clang=1 clang_load=/path/to/libFindBadConstructs.so clang_add_plugin=find-bad-constructs'
+
+III) Writing plugins
+--------------------
+
+As a utility to other plugin authors, I've written the ChromeClassTester class
+that you can derive from, which will call CheckChromeClass() on every
+class/struct encountered in a chrome header while filtering out blacklisted
+classes, namespaces and directories.
Nico 2011/02/02 23:13:06 This should have a paragraph on "You usually don't

Powered by Google App Engine
This is Rietveld 408576698