Decouple objc tests from xcode-select

Reviewed By: jvillard

Differential Revision: D9359621

fbshipit-source-id: e490dac4a
master
Martin Trojer 6 years ago committed by Facebook Github Bot
parent 1141c8c5a8
commit e2c08e4085

@ -62,16 +62,19 @@ endif
ifneq ($(PYTHON_lxml),no)
BUILD_SYSTEMS_TESTS += results_xml
endif
ifneq ($(XCODE_SELECT),no)
BUILD_SYSTEMS_TESTS += xcodebuild_no_xcpretty objc_getters_setters objc_missing_fld
ifeq ($(HAS_OBJC),yes)
BUILD_SYSTEMS_TESTS += objc_getters_setters objc_missing_fld objc_retain_cycles objc_retain_cycles_weak
DIRECT_TESTS += \
objc_frontend objc_errors objc_linters objc_ioslints objcpp_errors objcpp_nullable \
objcpp_frontend objcpp_linters objc_linters-for-test-only objcpp_linters-for-test-only \
objc_linters-def-folder objc_nullable objc_liveness objcpp_liveness objc_uninit
ifneq ($(XCODE_SELECT),no)
BUILD_SYSTEMS_TESTS += xcodebuild_no_xcpretty
endif
ifneq ($(XCPRETTY),no)
BUILD_SYSTEMS_TESTS += xcodebuild
endif
endif # XCODE_SELECT
endif # HAS_OBJC
endif # BUILD_C_ANALYZERS
ifeq ($(BUILD_JAVA_ANALYZERS),yes)

@ -71,6 +71,8 @@ SHASUM = @SHASUM@
USER_JAVA_HOME = @USER_JAVA_HOME@
UTOP = @UTOP@
XCODE_SELECT = @XCODE_SELECT@
XCODE_BASE = @XCODE_BASE@
HAS_OBJC = @HAS_OBJC@
XCPRETTY = @XCPRETTY@
ifneq (,$(findstring s,$(MAKEFLAGS)))

@ -118,7 +118,17 @@ AC_CHECK_TOOL([PYTHON27], [python2.7], [no])
AC_ASSERT_PROG([python2.7], [$PYTHON27])
AC_CHECK_TOOL([XCODE_SELECT], [xcode-select], [no])
AS_IF([test "x$XCODE_SELECT" != "xno"], [XCODE_SELECT_OUT=`xcode-select -p`])
AS_IF(
[test "x$XCODE_BASE" != "x"],
[AC_CHECK_FILE($XCODE_BASE,[HAS_OBJC=yes],[HAS_OBJC=no])],
[test "x$XCODE_SELECT" != "xno"],
[XCODE_BASE=$XCODE_SELECT_OUT HAS_OBJC=yes],
[HAS_OBJC=no])
AC_SUBST([XCODE_BASE])
AC_SUBST([HAS_OBJC])
# prefer clang over gcc because the plugins makes use of
# clang-specific #pragma's

@ -32,7 +32,7 @@ $(MODELS_RESULTS_FILE): $(MAKEFILE_LIST) $(CLANG_DEPS_NO_MODELS)
ifeq ($(BUILD_C_ANALYZERS),yes)
$(QUIET)$(MAKE) -C $(C_MODELS_DIR) clean
$(QUIET)$(MAKE) -C $(CPP_MODELS_DIR) clean
ifneq (no, $(XCODE_SELECT))
ifeq (yes, $(HAS_OBJC))
$(QUIET)$(MAKE) -C $(OBJC_MODELS_DIR) clean
$(QUIET)$(MAKE) -C $(OBJCPP_MODELS_DIR) clean
endif
@ -40,7 +40,7 @@ endif
$(INFER_BIN) capture $(MODELS_INFER_OPTIONS) --continue -- $(MAKE) -C $(C_MODELS_DIR) all)
$(QUIET)$(call silent_on_success,Capturing C++ models,\
$(INFER_BIN) capture $(MODELS_INFER_OPTIONS) --continue -- $(MAKE) -C $(CPP_MODELS_DIR) all)
ifneq (no, $(XCODE_SELECT))
ifeq (yes, $(HAS_OBJC))
$(QUIET)$(call silent_on_success,Capturing ObjCPP models,\
$(INFER_BIN) capture $(MODELS_INFER_OPTIONS) --continue -- $(MAKE) -C $(OBJCPP_MODELS_DIR) all)
$(QUIET)$(call silent_on_success,Capturing ObjC models,\
@ -68,7 +68,7 @@ clean: clean_specs
$(QUIET)$(MAKE) -C $(JAVA_MODELS_DIR) clean
$(QUIET)$(MAKE) -C $(C_MODELS_DIR) clean
$(QUIET)$(MAKE) -C $(CPP_MODELS_DIR) clean
ifneq (no, $(XCODE_SELECT))
ifeq (yes, $(HAS_OBJC))
$(QUIET)$(MAKE) -C $(OBJC_MODELS_DIR) clean
$(QUIET)$(MAKE) -C $(OBJCPP_MODELS_DIR) clean
endif

@ -11,9 +11,11 @@ C_SOURCES=$(shell find . -name "*.c")
OBJECTS=$(M_SOURCES:.m=.o) $(C_SOURCES:.c=.o)
# let infer override CC by letting the shell resolve its location according to PATH
CC=clang
XCODE_PATH=$(shell $(XCODE_SELECT) -p)
IPHONE_SIMULATOR_PATH=$(XCODE_PATH)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
CFLAGS += -Wno-deprecated-objc-isa-usage --target=x86_64-apple-darwin14 -x objective-c -c -mios-simulator-version-min=8.2 -isysroot $(IPHONE_SIMULATOR_PATH)
IPHONESIMULATOR_ISYSROOT = $(XCODE_BASE)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
OBJC_TARGET = x86_64-apple-darwin14
CFLAGS += -Wno-deprecated-objc-isa-usage --target=$(OBJC_TARGET) -x objective-c -c -mios-simulator-version-min=8.2 -isysroot $(IPHONESIMULATOR_ISYSROOT)
all: $(OBJECTS)

@ -12,9 +12,11 @@ C_SOURCES=$(shell find -L . -name "*.c")
OBJECTS=$(patsubst %.m,%_cxx.o, $(M_SOURCES)) $(patsubst %.c,%_cxx.o, $(C_SOURCES)) $(patsubst %.mm,%.o, $(MM_SOURCES))
# let infer override CC by letting the shell resolve its location according to PATH
CXX=clang++
XCODE_PATH=$(shell $(XCODE_SELECT) -p)
IPHONE_SIMULATOR_PATH=$(XCODE_PATH)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
CXXFLAGS += -Wno-deprecated-objc-isa-usage --target=x86_64-apple-darwin14 -x objective-c++ -c -mios-simulator-version-min=8.2 -isysroot $(IPHONE_SIMULATOR_PATH)
IPHONESIMULATOR_ISYSROOT = $(XCODE_BASE)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
OBJC_TARGET = x86_64-apple-darwin14
CXXFLAGS += -Wno-deprecated-objc-isa-usage --target=$(OBJC_TARGET) -x objective-c++ -c -mios-simulator-version-min=8.2 -isysroot $(IPHONESIMULATOR_ISYSROOT)
all: $(OBJECTS)

@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
#import "ViewController.h"
#import "View.h"
@implementation ViewController {
View* _hostingView;

@ -10,12 +10,14 @@ CODETOANALYZE_DIR = ../codetoanalyze/objc_getters_setters
ANALYZER = checkers
SOURCES = $(CODETOANALYZE_DIR)/A.m $(CODETOANALYZE_DIR)/B.m
OBJECTS = $(CODETOANALYZE_DIR)/A.o $(CODETOANALYZE_DIR)/B.o
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --biabduction-only --report-custom-error --developer-mode --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests
include $(TESTS_DIR)/infer.make
include $(TESTS_DIR)/objc.make
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(MAKEFILE_LIST)
$(QUIET)$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing analysis with Objective-C getters and setters,\
$(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- clang -c $(SOURCES))
$(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- clang $(CLANG_OPTIONS) $(SOURCES))

@ -10,12 +10,14 @@ CODETOANALYZE_DIR = ../codetoanalyze/objc_missing_fld
ANALYZER = checkers
SOURCES = $(CODETOANALYZE_DIR)/A.m $(CODETOANALYZE_DIR)/B.m
OBJECTS = $(CODETOANALYZE_DIR)/A.o $(CODETOANALYZE_DIR)/B.o
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --biabduction-only --report-custom-error --developer-mode --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests
include $(TESTS_DIR)/infer.make
include $(TESTS_DIR)/objc.make
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(MAKEFILE_LIST)
$(QUIET)$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing analysis with Objective-C getters and setters,\
$(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- clang -c $(SOURCES))
$(call silent_on_success,Testing analysis with Objective-C Missing_fld,\
$(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- clang $(CLANG_OPTIONS) $(SOURCES))

@ -10,12 +10,14 @@ CODETOANALYZE_DIR = ../codetoanalyze/objc_retain_cycles
ANALYZER = checkers
SOURCES = $(CODETOANALYZE_DIR)/View.m $(CODETOANALYZE_DIR)/ViewController.m $(CODETOANALYZE_DIR)/Caller.m
OBJECTS = $(CODETOANALYZE_DIR)/View.o $(CODETOANALYZE_DIR)/ViewController.o $(CODETOANALYZE_DIR)/Caller.o
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --biabduction-only --report-custom-error --developer-mode --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests
include $(TESTS_DIR)/infer.make
include $(TESTS_DIR)/objc.make
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(MAKEFILE_LIST)
$(QUIET)$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing analysis with Objective-C getters and setters,\
$(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- clang -c -fobjc-arc $(SOURCES))
$(call silent_on_success,Testing analysis with Objective-C Retain cycles,\
$(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- clang $(CLANG_OPTIONS) -fobjc-arc $(SOURCES))

@ -10,12 +10,14 @@ CODETOANALYZE_DIR = ../codetoanalyze/objc_retain_cycles_weak
ANALYZER = checkers
SOURCES = $(CODETOANALYZE_DIR)/TimeSpent.m $(CODETOANALYZE_DIR)/AnalyticsTimeSpent.m $(CODETOANALYZE_DIR)/ListAdapter.m
OBJECTS = $(CODETOANALYZE_DIR)/TimeSpent.o $(CODETOANALYZE_DIR)/AnalyticsTimeSpent.o $(CODETOANALYZE_DIR)/ListAdapter.o
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc
INFER_OPTIONS = --biabduction-only --report-custom-error --developer-mode --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests
include $(TESTS_DIR)/infer.make
include $(TESTS_DIR)/objc.make
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(MAKEFILE_LIST)
$(QUIET)$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing analysis with Objective-C retain cycles on weak properties,\
$(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- clang -c -fobjc-arc $(SOURCES))
$(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- clang $(CLANG_OPTIONS) $(SOURCES))

@ -1,2 +1,2 @@
build_systems/codetoanalyze/objc_retain_cycles_weak/TimeSpent.m, TimeSpent_init_bad, 2, RETAIN_CYCLE, ERROR, [start of procedure init_bad,Condition is true]
build_systems/codetoanalyze/objc_retain_cycles_weak/TimeSpent.m, retain_cycle_weak_bad, 4, RETAIN_CYCLE, ERROR, [start of procedure retain_cycle_weak_bad(),start of procedure init,start of procedure initWithDelegate:,return from a call to AnalyticsTimeSpent_initWithDelegate:,return from a call to TimeSpent_init,start of procedure initWithStrongDelegate:,return from a call to AnalyticsTimeSpent_initWithStrongDelegate:]
build_systems/codetoanalyze/objc_retain_cycles_weak/TimeSpent.m, TimeSpent_init_bad, 2, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure init_bad,Taking true branch,start of procedure setDataSourceStrong:,return from a call to ListAdapter_setDataSourceStrong:]
build_systems/codetoanalyze/objc_retain_cycles_weak/TimeSpent.m, retain_cycle_weak_bad, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure retain_cycle_weak_bad(),start of procedure init,start of procedure initWithDelegate:,Executing synthesized setter setDelegate:,return from a call to AnalyticsTimeSpent_initWithDelegate:,return from a call to TimeSpent_init,start of procedure initWithStrongDelegate:,return from a call to AnalyticsTimeSpent_initWithStrongDelegate:,start of procedure setAnalyticsTimeSpent:,return from a call to TimeSpent_setAnalyticsTimeSpent:]

@ -5,14 +5,8 @@
TESTS_DIR = ../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell $(XCODE_SELECT) -p)
ANALYZER = checkers
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \
-mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
CLEAN_EXTRA = infer-out-arc infer-out-all infer-out-all infer-out-arc \
issues.exp.test.all issues.exp.test.arc issues.exp.test.default
@ -116,6 +110,7 @@ SOURCES_ARC = \
variadic_methods/premature_nil_termination.m \
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make
OBJECTS_ARC = $(foreach source,$(SOURCES_ARC),$(basename $(source)).o)
OBJECTS_BUCKET_ALL = $(foreach source,$(SOURCES_BUCKET_ALL),$(basename $(source)).o)

@ -5,15 +5,7 @@
TESTS_DIR = ../../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = \
/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \
-mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \
-fobjc-arc
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc
SOURCES = \
../predefined_expr/PredefinedExprExample.m \
@ -28,3 +20,4 @@ SOURCES = \
../shared/npe/Nonnull_attribute_example.m \
include $(TESTS_DIR)/clang-frontend.make
include $(TESTS_DIR)/objc.make

@ -5,14 +5,7 @@
TESTS_DIR = ../../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = \
/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \
-mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
SOURCES = \
../block/retain_cycle.m \
@ -68,3 +61,4 @@ SOURCES = \
../shared/annotations/nonnull_annotations.m \
include $(TESTS_DIR)/clang-frontend.make
include $(TESTS_DIR)/objc.make

@ -5,13 +5,7 @@
TESTS_DIR = ../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \
-mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -fobjc-arc -c \
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc
ANALYZER = linters
INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \
@ -26,3 +20,4 @@ SOURCES = \
$(wildcard */*.m) \
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make

@ -6,10 +6,11 @@
TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -c -fobjc-arc
CLANG_OPTIONS = -c -fobjc-arc $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --linters-def-folder checks --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = file.m
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make

@ -6,7 +6,7 @@
TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -fobjc-arc -c
CLANG_OPTIONS = -fobjc-arc -c $(IOS_CLANG_OPTIONS)
INFER_OPTIONS = --cxx --linters-def-file al_definitions/linters_example.al --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
@ -17,3 +17,4 @@ SOURCES = \
$(wildcard *.c) \
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make

@ -6,7 +6,7 @@
TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -x objective-c -fobjc-arc -c
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc
INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \
--linters-doc-url "ASSIGN_POINTER_WARNING:www.example.com"
INFERPRINT_OPTIONS = --issues-tests
@ -16,3 +16,4 @@ SOURCES = \
$(wildcard */*.m) \
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make

@ -5,8 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
#import <Cocoa/Cocoa.h>
@interface ViewController : NSViewController
#import <Foundation/Foundation.h>
@interface ViewController : NSObject
@end
@implementation ViewController

@ -5,8 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
#import <Cocoa/Cocoa.h>
@interface ViewController : NSViewController
#import <Foundation/Foundation.h>
@interface ViewController : NSObject
@end
@implementation ViewController

@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
@interface ViewControllerError : NSViewController
@interface ViewControllerError : NSObject
@end
@implementation ViewControllerError

@ -6,12 +6,13 @@
TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -x objective-c++ -std=c++11 -fobjc-arc -c
CLANG_OPTIONS = -fobjc-arc -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --liveness-only --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.m)
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make
infer-out/report.json: $(MAKEFILE_LIST)

@ -6,12 +6,13 @@
TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --check-nullable --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.m)
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make
infer-out/report.json: $(MAKEFILE_LIST)

@ -5,13 +5,7 @@
TESTS_DIR = ../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \
-mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
ANALYZER = quandary
INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --iphoneos-target-sdk-version 8.0
@ -21,3 +15,4 @@ SOURCES = \
$(wildcard *.m) \
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make

@ -7,12 +7,13 @@ TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem
CLANG_OPTIONS = -x objective-c -c
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --uninit-only --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.m)
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make
infer-out/report.json: $(MAKEFILE_LIST)

@ -4,7 +4,9 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import <CoreGraphics/CGGeometry.h>
#import <CoreGraphics/CGColor.h>
@interface A : NSObject

@ -6,10 +6,11 @@
TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -x objective-c++ -std=c++11 -fobjc-arc -c
CLANG_OPTIONS = -c $(OBJCPP_CLANG_OPTIONS) -fobjc-arc
INFER_OPTIONS = --biabduction-only --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.mm) $(wildcard */*.mm)
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make

@ -5,13 +5,7 @@
TESTS_DIR=../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c++ -std=c++11 \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \
-mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \
CLANG_OPTIONS = -c $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS =
@ -19,3 +13,4 @@ SOURCES = \
$(wildcard */*.mm) \
include $(TESTS_DIR)/clang-frontend.make
include $(TESTS_DIR)/objc.make

@ -6,7 +6,7 @@
TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -x objective-c++ -std=c++11 -fobjc-arc -c
CLANG_OPTIONS = -fobjc-arc -c $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
@ -17,3 +17,4 @@ SOURCES = \
$(wildcard *.c) \
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make

@ -6,7 +6,7 @@
TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -x objective-c++ -std=c++11 -fobjc-arc -c
CLANG_OPTIONS = -c -fobjc-arc $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \
--enable-issue-type GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL
INFERPRINT_OPTIONS = --issues-tests
@ -16,3 +16,4 @@ SOURCES = \
$(wildcard */*.mm) \
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make

@ -6,12 +6,13 @@
TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -x objective-c++ -std=c++11 -fobjc-arc -c
CLANG_OPTIONS = -fobjc-arc -c $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS = --liveness-only --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.mm)
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make
infer-out/report.json: $(MAKEFILE_LIST)

@ -6,12 +6,13 @@
TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c
CLANG_OPTIONS = -c $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --check-nullable --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.mm)
include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make
infer-out/report.json: $(MAKEFILE_LIST)

@ -0,0 +1,17 @@
# Copyright (c) 2018-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
IPHONESIMULATOR_ISYSROOT = $(XCODE_BASE)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
OBJC_TARGET = x86_64-apple-darwin14
IOS_SIMULATOR_VERSION = 8.2
IOS_CLANG_OPTIONS = -isysroot $(IPHONESIMULATOR_ISYSROOT) \
-target $(OBJC_TARGET) -mios-simulator-version-min=$(IOS_SIMULATOR_VERSION)
OBJC_CLANG_OPTIONS = $(IOS_CLANG_OPTIONS) -x objective-c
OBJCPP_CLANG_OPTIONS = $(IOS_CLANG_OPTIONS) -x objective-c++ -std=c++11
Loading…
Cancel
Save