[bufferoverrun][tests] Move bufferoverrun cpp tests to their own directory

Summary: `bufferoverrun` is not part of `checkers` yet so bufferoverrun tests require their own Makefile

Reviewed By: jvillard

Differential Revision: D4937558

fbshipit-source-id: 20380f1
master
Mehdi Bouaziz 8 years ago committed by Facebook Github Bot
parent 20aff78b36
commit d20d71da50

@ -31,7 +31,9 @@ BUILD_SYSTEMS_TESTS += \
waf \
DIRECT_TESTS += \
c_errors c_frontend c_bufferoverrun cpp_checkers cpp_errors cpp_frontend cpp_quandary
c_bufferoverrun c_errors c_frontend \
cpp_bufferoverrun cpp_checkers cpp_errors cpp_frontend cpp_quandary \
ifneq ($(BUCK),no)
BUILD_SYSTEMS_TESTS += buck-clang-db
endif

@ -0,0 +1,24 @@
# 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 = bufferoverrun
# see explanations in cpp/errors/Makefile for the custom isystem
CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed
INFERPRINT_OPTIONS = --issues-tests
SOURCES = \
trivial.cpp \
vector.cpp \
HEADERS =
include $(TESTS_DIR)/clang.make
infer-out/report.json: $(MAKEFILE_LIST)

@ -0,0 +1 @@
codetoanalyze/cpp/bufferoverrun/trivial.cpp, trivial, 2, BUFFER_OVERRUN, [Offset : [10, 10] Size : [10, 10] @ codetoanalyze/cpp/bufferoverrun/trivial.cpp:15:3]

@ -0,0 +1,16 @@
/*
* Copyright (c) 2016 - present
*
* Programming Research Laboratory (ROPAS)
* Seoul National University, Korea
* 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.
*/
void trivial() {
int a[10];
a[10] = 0; /* BUG */
}

@ -23,7 +23,6 @@ SOURCES = \
siof/siof_templated.cpp \
siof/siof_different_tu.cpp \
siof/std_ios_base_init.cpp \
bufferoverrun/vector.cpp \
HEADERS = siof/siof_types.h

Loading…
Cancel
Save