Reviewed By: jberdine Differential Revision: D4329651 fbshipit-source-id: 8b67f9emaster
parent
25e35e8bec
commit
c40dfc950e
@ -1,17 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"bug_type": "NULL_DEREFERENCE",
|
|
||||||
"file": "hello.c",
|
|
||||||
"procedure": "test"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bug_type": "NULL_DEREFERENCE",
|
|
||||||
"file": "hello2.c",
|
|
||||||
"procedure": "test2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bug_type": "NULL_DEREFERENCE",
|
|
||||||
"file": "hello3.c",
|
|
||||||
"procedure": "test3"
|
|
||||||
}
|
|
||||||
]
|
|
@ -0,0 +1,35 @@
|
|||||||
|
# Copyright (c) 2016 - present Facebook, Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the BSD style license found in the
|
||||||
|
# LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
# of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
|
||||||
|
TESTS_DIR = ../..
|
||||||
|
|
||||||
|
ANALYZER = infer
|
||||||
|
|
||||||
|
CLANG_OPTIONS = -c
|
||||||
|
INFER_OPTIONS = --project-root ../codetoanalyze
|
||||||
|
INFERPRINT_OPTIONS = --issues-tests
|
||||||
|
|
||||||
|
SOURCES1 = ../codetoanalyze/hello.c
|
||||||
|
SOURCES2 = ../codetoanalyze/hello2.c
|
||||||
|
SOURCES3 = ../codetoanalyze/hello3.c
|
||||||
|
SOURCES = $(SOURCES1) $(SOURCES2) $(SOURCES3)
|
||||||
|
|
||||||
|
include $(TESTS_DIR)/clang.make
|
||||||
|
|
||||||
|
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS)
|
||||||
|
$(call silent_on_success,\
|
||||||
|
$(INFER_BIN) $(INFER_OPTIONS) -a capture --reactive --continue -- \
|
||||||
|
clang $(CLANG_OPTIONS) $(SOURCES1))
|
||||||
|
$(call silent_on_success,\
|
||||||
|
$(INFER_BIN) $(INFER_OPTIONS) -a capture --reactive --continue -- \
|
||||||
|
clang $(CLANG_OPTIONS) $(SOURCES2))
|
||||||
|
$(call silent_on_success,\
|
||||||
|
$(INFER_BIN) $(INFER_OPTIONS) -a capture --reactive --continue -- \
|
||||||
|
clang $(CLANG_OPTIONS) $(SOURCES3))
|
||||||
|
$(call silent_on_success,\
|
||||||
|
$(INFER_BIN) --check-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- analyze 2>duplicates.txt)
|
||||||
|
grep "DUPLICATE_SYMBOLS" duplicates.txt; test $$? -ne 0
|
@ -0,0 +1,3 @@
|
|||||||
|
hello.c, test, 2, NULL_DEREFERENCE, [start of procedure test()]
|
||||||
|
hello2.c, test2, 2, NULL_DEREFERENCE, [start of procedure test2()]
|
||||||
|
hello3.c, test3, 2, NULL_DEREFERENCE, [start of procedure test3()]
|
Loading…
Reference in new issue