Summary: When infer runs on preprocessed source, original files may not be around anymore. Don't crash infer when that happens. Reviewed By: jvillard, jberdine Differential Revision: D4258285 fbshipit-source-id: a19569cmaster
parent
ff3b6a10db
commit
bd0f0cc7fc
@ -0,0 +1,16 @@
|
||||
# 1 "/tmp/removed_src.c"
|
||||
# 1 "<built-in>" 1
|
||||
# 1 "<built-in>" 3
|
||||
# 330 "<built-in>" 3
|
||||
# 1 "<command line>" 1
|
||||
# 1 "<built-in>" 2
|
||||
# 1 "/tmp/removed_src.c" 2
|
||||
|
||||
# 1 "/tmp/removed_header.h" 1
|
||||
|
||||
void fun();
|
||||
# 3 "/tmp/removed_src.c" 2
|
||||
|
||||
int deref(int* a) { return *a; }
|
||||
|
||||
int test() { return deref(0); }
|
@ -0,0 +1,18 @@
|
||||
# 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 = --report-custom-error --developer-mode --headers --project-root ../codetoanalyze
|
||||
INFERPRINT_OPTIONS = --issues-tests
|
||||
|
||||
SOURCES = \
|
||||
../codetoanalyze/preprocessed.c
|
||||
|
||||
include $(TESTS_DIR)/clang.make
|
@ -0,0 +1 @@
|
||||
/tmp/removed_src.c, test, 0, NULL_DEREFERENCE, [start of procedure test(),start of procedure deref()]
|
Loading…
Reference in new issue