summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/store/tutorial/tutorial2_example.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-02-02 22:59:17 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-02-02 22:59:46 +0100
commit4fd910a096532fed2552c67bceabe237a9e3c7d6 (patch)
tree6ea0e4eee6813cf5e7b735afda358499e7289d76 /compilerplugins/clang/store/tutorial/tutorial2_example.cxx
parent18e615189df93cb704c32553a41505a1bdc984f1 (diff)
tutorial examples for writing new Clang plugin actions
http://wiki.documentfoundation.org/Clang_plugins Change-Id: Ieb4fc186490e81ab961c094ca0a7fcdabc0f348f
Diffstat (limited to 'compilerplugins/clang/store/tutorial/tutorial2_example.cxx')
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial2_example.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/compilerplugins/clang/store/tutorial/tutorial2_example.cxx b/compilerplugins/clang/store/tutorial/tutorial2_example.cxx
new file mode 100644
index 000000000000..d3c14ab7c13c
--- /dev/null
+++ b/compilerplugins/clang/store/tutorial/tutorial2_example.cxx
@@ -0,0 +1,15 @@
+// This is just an example file to see what AST looks like for return statements.
+// To the the AST, run :
+// clang++ -fsyntax-only -Xclang -ast-dump tutorial1_example.cxx
+
+bool g()
+ {
+ if( 1 == 2 )
+ return false;
+ if( 1 == 2 )
+ {
+ return false;
+ }
+ if( true )
+ return false;
+ }