diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-12 13:06:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-12 13:07:00 +0300 |
commit | e9e895f8ae0fc51620c6e6da7f6b67ca0c9e1bde (patch) | |
tree | 85fabc67f42a84384d6fdf2da4a76f6a9e80b835 /test | |
parent | d1a23f1c7da3082e16cbca7625fdf501815564e1 (diff) | |
download | paranucker-e9e895f8ae0fc51620c6e6da7f6b67ca0c9e1bde.tar.gz paranucker-e9e895f8ae0fc51620c6e6da7f6b67ca0c9e1bde.tar.bz2 paranucker-e9e895f8ae0fc51620c6e6da7f6b67ca0c9e1bde.tar.xz paranucker-e9e895f8ae0fc51620c6e6da7f6b67ca0c9e1bde.zip |
Add crash test 4.
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile | 4 | ||||
-rw-r--r-- | test/crashtest4-01.txt | 48 | ||||
-rw-r--r-- | test/crashtest4.cpp | 22 |
3 files changed, 73 insertions, 1 deletions
diff --git a/test/Makefile b/test/Makefile index 938e35c..237acb5 100644 --- a/test/Makefile +++ b/test/Makefile @@ -8,7 +8,7 @@ PLUGIN = ../build/src/.libs/astdumper.so CMD = LANG=C ${CXX} -c -fplugin=${PLUGIN} -fplugin-arg-astdumper-command=${1} ${2} -o a.out 2>${3} all: test1 test2 test3 test4 test5 test6 clean -crashes: crashtest1 crashtest2 crashtest3 clean +crashes: crashtest1 crashtest2 crashtest3 crashtest4 clean clean: @rm a.out 2>/dev/null || true @@ -46,3 +46,5 @@ crashtest2: $(call CMD,dump,crashtest2.h,crashtest2-01.txt) crashtest3: $(call CMD,findargs,crashtest3.h,crashtest3-01.txt) +crashtest4: + $(call CMD,dump,crashtest4.cpp,crashtest4-01.txt) diff --git a/test/crashtest4-01.txt b/test/crashtest4-01.txt new file mode 100644 index 0000000..34fbee5 --- /dev/null +++ b/test/crashtest4-01.txt @@ -0,0 +1,48 @@ +function_decl func crashtest4.cpp 19:6 +- isPublic: 1 + function_type - function type + void_type - function return type + type_decl void <built-in> 0:0 - type name + - isAutogenerated: 1 + tree_list - arg types + void_type - value + type_decl void <built-in> 0:0 - type name + - isAutogenerated: 1 + result_decl crashtest4.cpp 19:11 - function result + - isAutogenerated: 1 + void_type - result type + type_decl void <built-in> 0:0 - type name + - isAutogenerated: 1 + bind_expr crashtest4.cpp 21:15 - code + var_decl var1 crashtest4.cpp 21:11 - operand + integer_cst 128 - decl size + record_type - var type + type_decl Test1 crashtest4.cpp 12:7 - type name + - isAutogenerated: 1 + Unsupported node type: field_decl - field - var type + Unsupported node type: field_decl - field - var type + Unsupported node type: field_decl - field - var type + type_decl Test1 crashtest4.cpp 13:1 - field + - isAutogenerated: 1 + decl_expr crashtest4.cpp 21:11 - operand + var_decl var1 crashtest4.cpp 21:11 - operand + integer_cst 128 - decl size + record_type - var type + type_decl Test1 crashtest4.cpp 12:7 - type name + - isAutogenerated: 1 + Unsupported node type: field_decl - field - var type + Unsupported node type: field_decl - field - var type + Unsupported node type: field_decl - field - var type + type_decl Test1 crashtest4.cpp 13:1 - field + - isAutogenerated: 1 + block - operand + var_decl var1 crashtest4.cpp 21:11 - block vars + integer_cst 128 - decl size + record_type - var type + type_decl Test1 crashtest4.cpp 12:7 - type name + - isAutogenerated: 1 + Unsupported node type: field_decl - field - var type + Unsupported node type: field_decl - field - var type + Unsupported node type: field_decl - field - var type + type_decl Test1 crashtest4.cpp 13:1 - field + - isAutogenerated: 1 diff --git a/test/crashtest4.cpp b/test/crashtest4.cpp new file mode 100644 index 0000000..acfc090 --- /dev/null +++ b/test/crashtest4.cpp @@ -0,0 +1,22 @@ + + +class Test1; +class Test2; + +class Test2 +{ + int a; + Test1 *ptr1; +}; + +class Test1 +{ + Test2 *ptr; + int a; + float b; +}; + +void func() +{ + Test1 var1; +} |