summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-26 01:12:33 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-26 01:27:56 +0300
commitb6a8b96b678eeda4f61ee8e20a19a47707537637 (patch)
treef504da586abd6620c1e9fae59bad9b543a72991a
parentef74c85974a85a5d342b8ffca82e0ff8ff266f2b (diff)
downloadparanucker-b6a8b96b678eeda4f61ee8e20a19a47707537637.tar.gz
paranucker-b6a8b96b678eeda4f61ee8e20a19a47707537637.tar.bz2
paranucker-b6a8b96b678eeda4f61ee8e20a19a47707537637.tar.xz
paranucker-b6a8b96b678eeda4f61ee8e20a19a47707537637.zip
Rename to Ast dumper to Paranoid null checker.
-rw-r--r--README.md10
-rw-r--r--README.ru.md10
l---------astdumper.so1
-rw-r--r--configure.ac2
l---------cppastdumper.so1
l---------cxxparanucker.so1
-rwxr-xr-xexamples/cexample.sh2
-rwxr-xr-xexamples/cppexample.sh3
-rw-r--r--examples/cxxexample.cpp (renamed from examples/cppexample.cpp)0
-rwxr-xr-xexamples/cxxexample.sh3
l---------paranucker.so1
-rw-r--r--src/Makefile.am16
-rw-r--r--src/includes.h2
-rw-r--r--src/parsers/block/try_block.cpp2
-rw-r--r--src/parsers/cst/ptrmem_cst.cpp2
-rw-r--r--src/parsers/decl/template_decl.cpp2
-rw-r--r--src/parsers/expr/aggrinit_expr.cpp2
-rw-r--r--src/parsers/expr/vecinit_expr.cpp2
-rw-r--r--src/parsers/templateparmindex.cpp2
-rw-r--r--src/parsers/templatetypeparm.cpp2
-rw-r--r--src/parsers/type/typename_type.cpp4
-rw-r--r--test/Makefile8
22 files changed, 39 insertions, 39 deletions
diff --git a/README.md b/README.md
index 647404b..14219a8 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Ast Dumper - static code analyser for C/C++
+# Paranoid null checker (paranucker) - static code analyser for C/C++
This is [gcc](https://gcc.gnu.org) plugin for dump [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) tree and search possible null pointers.
@@ -20,8 +20,8 @@ Version 1.0 Date: 2015-06-22
## Build
- Run build.sh
- - You will get astdumper.so for gcc binary
- and cppastdumper.so for g++ binary
+ - You will get paranucker.so for gcc binary
+ and cxxparanucker.so for g++ binary
## Usage examples
In directory [examples](examples) present two examples one for C++ and other for C.
@@ -31,10 +31,10 @@ In directory [examples](examples) present two examples one for C++ and other for
- [Hercules](http://herc.ws/)
## Advanced usage
-Ast Dumper support one plugin paramater named -fplugin-arg-astdumper-command or -fplugin-arg-cppastdumper-command depend what you using C or C++
+Paranoid null checker support one plugin paramater named -fplugin-arg-paranucker-command or -fplugin-arg-cxxparanucker-command depend what you using C or C++
Example:
- gcc-5 -fplugin=../astdumper.so -fplugin-arg-astdumper-command=detectnullpointers
+ gcc-5 -fplugin=../paranucker.so -fplugin-arg-paranucker-command=detectnullpointers
Known parameter values:
diff --git a/README.ru.md b/README.ru.md
index d13825e..1677a42 100644
--- a/README.ru.md
+++ b/README.ru.md
@@ -1,4 +1,4 @@
-# Ast Dumper - статический анализатор C/C++ кода.
+# Paranoid null checker (paranucker) - статический анализатор C/C++ кода.
Представляет собой плагин к компилятору [gcc](https://gcc.gnu.org).
Есть возможность вывода абстрактного синтаксического дерева [AST](https://ru.wikipedia.org/wiki/Абстрактное_синтаксическое_дерево) и поиска нулевых указателей.
@@ -21,8 +21,8 @@
## Компиляции
- Запустить build.sh
- - Вы получите два файла. astdumper.so для C/gcc.
- и cppastdumper.so для C++/g++
+ - Вы получите два файла. paranucker.so для C/gcc.
+ и cxxparanucker.so для C++/g++
## Примеры использования
В директории [examples](examples) находится два примера для C++ и C.
@@ -32,10 +32,10 @@
- [Hercules](http://herc.ws/)
## Расширенное использование
-Ast Dumper поддерживает один параметр с именем -fplugin-arg-astdumper-command или -fplugin-arg-cppastdumper-command в зависимости от того, что вы используется C или C++.
+Paranoid null checker поддерживает один параметр с именем -fplugin-arg-paranucker-command или -fplugin-arg-cxxparanucker-command в зависимости от того, что вы используется C или C++.
Пример:
- gcc-5 -fplugin=../astdumper.so -fplugin-arg-astdumper-command=detectnullpointers
+ gcc-5 -fplugin=../paranucker.so -fplugin-arg-paranucker-command=detectnullpointers
Возможные значения параметра:
diff --git a/astdumper.so b/astdumper.so
deleted file mode 120000
index ae8b7d1..0000000
--- a/astdumper.so
+++ /dev/null
@@ -1 +0,0 @@
-build/src/.libs/libastdumper.so \ No newline at end of file
diff --git a/configure.ac b/configure.ac
index 9d6792a..f958b6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(astdumper, 1.0, akaras@inbox.ru)
+AC_INIT(paranucker, 1.0, akaras@inbox.ru)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(src)
AC_CONFIG_MACRO_DIR([m4])
diff --git a/cppastdumper.so b/cppastdumper.so
deleted file mode 120000
index 47af69e..0000000
--- a/cppastdumper.so
+++ /dev/null
@@ -1 +0,0 @@
-build/src/.libs/libcppastdumper.so \ No newline at end of file
diff --git a/cxxparanucker.so b/cxxparanucker.so
new file mode 120000
index 0000000..255d53b
--- /dev/null
+++ b/cxxparanucker.so
@@ -0,0 +1 @@
+build/src/.libs/libcxxparanucker.so \ No newline at end of file
diff --git a/examples/cexample.sh b/examples/cexample.sh
index eff04e5..89861ab 100755
--- a/examples/cexample.sh
+++ b/examples/cexample.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-gcc-5 -fplugin=../astdumper.so -fplugin-arg-astdumper-command=detectnullpointers cexample.c
+gcc-5 -fplugin=../paranucker.so -fplugin-arg-paranucker-command=detectnullpointers cexample.c
diff --git a/examples/cppexample.sh b/examples/cppexample.sh
deleted file mode 100755
index d6ff401..0000000
--- a/examples/cppexample.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-g++-5 -fplugin=../cppastdumper.so -fplugin-arg-cppastdumper-command=detectnullpointers cppexample.cpp
diff --git a/examples/cppexample.cpp b/examples/cxxexample.cpp
index 46b3c01..46b3c01 100644
--- a/examples/cppexample.cpp
+++ b/examples/cxxexample.cpp
diff --git a/examples/cxxexample.sh b/examples/cxxexample.sh
new file mode 100755
index 0000000..4c1a5a5
--- /dev/null
+++ b/examples/cxxexample.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+g++-5 -fplugin=../cxxparanucker.so -fplugin-arg-cxxparanucker-command=detectnullpointers cxxexample.cpp
diff --git a/paranucker.so b/paranucker.so
new file mode 120000
index 0000000..35f1abd
--- /dev/null
+++ b/paranucker.so
@@ -0,0 +1 @@
+build/src/.libs/libparanucker.so \ No newline at end of file
diff --git a/src/Makefile.am b/src/Makefile.am
index 36200bf..ed51167 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,14 +35,14 @@ if ENABLE_GPROF
SHARED_CXXFLAGS += "-pg"
endif
-lib_LTLIBRARIES = libastdumper.la libcppastdumper.la
-libastdumper_la_SOURCES = ${SRC}
-libastdumper_la_LDFLAGS = ${SHARED_LDFLAGS}
-libastdumper_la_CXXFLAGS = ${SHARED_CXXFLAGS}
+lib_LTLIBRARIES = libparanucker.la libcxxparanucker.la
+libparanucker_la_SOURCES = ${SRC}
+libparanucker_la_LDFLAGS = ${SHARED_LDFLAGS}
+libparanucker_la_CXXFLAGS = ${SHARED_CXXFLAGS}
-libcppastdumper_la_SOURCES = ${SRC} custom/fixed-cp-tree.h
-libcppastdumper_la_LDFLAGS = ${SHARED_LDFLAGS}
-libcppastdumper_la_CXXFLAGS = ${SHARED_CXXFLAGS} -DENABLE_CPPLANG
+libcxxparanucker_la_SOURCES = ${SRC} custom/fixed-cp-tree.h
+libcxxparanucker_la_LDFLAGS = ${SHARED_LDFLAGS}
+libcxxparanucker_la_CXXFLAGS = ${SHARED_CXXFLAGS} -DENABLE_CXXLANG
-all-local: libastdumper.la libcppastdumper.la
+all-local: libparanucker.la libcxxparanucker.la
echo done
diff --git a/src/includes.h b/src/includes.h
index 51a6999..bd4cf04 100644
--- a/src/includes.h
+++ b/src/includes.h
@@ -41,7 +41,7 @@
#include "tree.h"
#include "print-tree.h"
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
#include "cp/cp-tree.h"
#else
#include "c-family/c-common.h"
diff --git a/src/parsers/block/try_block.cpp b/src/parsers/block/try_block.cpp
index bf320f2..8d6f8aa 100644
--- a/src/parsers/block/try_block.cpp
+++ b/src/parsers/block/try_block.cpp
@@ -34,7 +34,7 @@ void parseTryBlockNode(TryBlockNode *node)
fillExprLocation(node);
Log::dump(node);
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
setPrintField(node, CLEANUP_P, isClean);
node->body = createParseNode(
diff --git a/src/parsers/cst/ptrmem_cst.cpp b/src/parsers/cst/ptrmem_cst.cpp
index 7934769..e783cdb 100644
--- a/src/parsers/cst/ptrmem_cst.cpp
+++ b/src/parsers/cst/ptrmem_cst.cpp
@@ -33,7 +33,7 @@ void parsePtrMemCstNode(PtrMemCstNode *node)
fillType(node);
Log::dump(node);
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
node->record = createParseNode(
node,
PTRMEM_CST_CLASS(node->gccNode),
diff --git a/src/parsers/decl/template_decl.cpp b/src/parsers/decl/template_decl.cpp
index 394f427..21220b5 100644
--- a/src/parsers/decl/template_decl.cpp
+++ b/src/parsers/decl/template_decl.cpp
@@ -38,7 +38,7 @@ void parseTemplateDeclNode(TemplateDeclNode *node)
fillDeclAutoGenerated(node);
fillDeclAttributes(node);
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
node->specializations = static_cast<TreeListNode*>(createParseNode(
node,
DECL_TEMPLATE_SPECIALIZATIONS(node->gccNode),
diff --git a/src/parsers/expr/aggrinit_expr.cpp b/src/parsers/expr/aggrinit_expr.cpp
index b5c17ae..6642631 100644
--- a/src/parsers/expr/aggrinit_expr.cpp
+++ b/src/parsers/expr/aggrinit_expr.cpp
@@ -36,7 +36,7 @@ void parseAggrInitExprNode(AggrInitExprNode *node)
//fillExprOperands(node);
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
node->function = createParseNode(
node,
AGGR_INIT_EXPR_FN(node->gccNode),
diff --git a/src/parsers/expr/vecinit_expr.cpp b/src/parsers/expr/vecinit_expr.cpp
index 178b414..88817aa 100644
--- a/src/parsers/expr/vecinit_expr.cpp
+++ b/src/parsers/expr/vecinit_expr.cpp
@@ -34,7 +34,7 @@ void parseVecInitExprNode(VecInitExprNode *node)
fillExprLocation(node);
Log::dump(node);
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
setPrintField(node, VEC_INIT_EXPR_IS_CONSTEXPR, isConstExpr);
#endif
diff --git a/src/parsers/templateparmindex.cpp b/src/parsers/templateparmindex.cpp
index a5f6b62..211ccab 100644
--- a/src/parsers/templateparmindex.cpp
+++ b/src/parsers/templateparmindex.cpp
@@ -32,7 +32,7 @@ void parseTemplateParmIndexNode(TemplateParmIndexNode *node)
fillType(node);
Log::dump(node);
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
setPrintField(node, TEMPLATE_PARM_IDX, parmIdx);
setPrintField(node, TEMPLATE_PARM_LEVEL, parmLevel);
setPrintField(node, TEMPLATE_PARM_ORIG_LEVEL, parmOrigLevel);
diff --git a/src/parsers/templatetypeparm.cpp b/src/parsers/templatetypeparm.cpp
index 46dc18b..9f0978e 100644
--- a/src/parsers/templatetypeparm.cpp
+++ b/src/parsers/templatetypeparm.cpp
@@ -32,7 +32,7 @@ void parseTemplateTypeParmNode(TemplateTypeParmNode *node)
fillType(node);
Log::dump(node);
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
node->index = createParseNode(
node,
TEMPLATE_TYPE_PARM_INDEX(node->gccNode),
diff --git a/src/parsers/type/typename_type.cpp b/src/parsers/type/typename_type.cpp
index 2acb957..8439504 100644
--- a/src/parsers/type/typename_type.cpp
+++ b/src/parsers/type/typename_type.cpp
@@ -33,7 +33,7 @@ void parseTypeNameTypeNode(TypeNameTypeNode *node)
fillType(node);
Log::dump(node);
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
setPrintField(node, TYPENAME_IS_ENUM_P, isEnum);
setPrintField(node, TYPENAME_IS_CLASS_P, isClass);
setPrintField(node, TYPENAME_IS_RESOLVING_P, isResolving);
@@ -42,7 +42,7 @@ void parseTypeNameTypeNode(TypeNameTypeNode *node)
fillTypeName(node);
fillTypeAttributes(node);
-#ifdef ENABLE_CPPLANG
+#ifdef ENABLE_CXXLANG
node->fullName = createParseNode(
node,
TYPENAME_TYPE_FULLNAME(node->gccNode),
diff --git a/test/Makefile b/test/Makefile
index ded802e..885abe0 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -30,11 +30,11 @@ CC := gcc-5
CXX := g++-5
MAKEFLAGS += --jobs=9
-PLUGINXX = ../cppastdumper.so
-PLUGIN = ../astdumper.so
+PLUGINXX = ../cxxparanucker.so
+PLUGIN = ../paranucker.so
-CMDXX = LANG=C ${CXX} -c ${4} -fplugin=${PLUGINXX} -fplugin-arg-cppastdumper-command=${1} ${2} -o ../build/${3}.out 2>${3}
-CMD = LANG=C ${CC} -c ${4} -fplugin=${PLUGIN} -fplugin-arg-astdumper-command=${1} ${2} -o ../build/${3}.out 2>${3}
+CMDXX = LANG=C ${CXX} -c ${4} -fplugin=${PLUGINXX} -fplugin-arg-cxxparanucker-command=${1} ${2} -o ../build/${3}.out 2>${3}
+CMD = LANG=C ${CC} -c ${4} -fplugin=${PLUGIN} -fplugin-arg-paranucker-command=${1} ${2} -o ../build/${3}.out 2>${3}
all: ${ALLTESTS} ${CRASHES}
tests: ${ALLTESTS}