Skip to content

Commit

Permalink
enable & switch to clang 6.0
Browse files Browse the repository at this point in the history
Change-Id: I61910614ddaa37db18a3d995fa94efb03238279a
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
  • Loading branch information
ArturHarasimiuk authored and Compute-Runtime-Automation committed May 25, 2018
1 parent ab507d7 commit 972c080
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 17 deletions.
2 changes: 1 addition & 1 deletion manifests/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ components:
branch: infra
clean_on_sync: true
dest_dir: infra
revision: 8b13573ecf55f1f1142a815fdc181d34c29c7574
revision: 5a57e424807a4fb6a2e4146211b8ae421baa3e30
type: git
internal:
branch: master
Expand Down
1 change: 1 addition & 0 deletions runtime/built_ins/built_ins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SchedulerKernel &BuiltIns::getSchedulerKernel(Context &context) {
};
std::call_once(schedulerBuiltIn.programIsInitialized, initializeSchedulerProgramAndKernel);

UNRECOVERABLE_IF(schedulerBuiltIn.pKernel == nullptr);
return *static_cast<SchedulerKernel *>(schedulerBuiltIn.pKernel);
}

Expand Down
2 changes: 2 additions & 0 deletions runtime/built_ins/built_ins.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class Storage {
: rootPath(rootPath) {
}

virtual ~Storage() = default;

BuiltinResourceT load(const std::string &resourceName);

protected:
Expand Down
1 change: 1 addition & 0 deletions runtime/built_ins/builtins_dispatch_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class BuiltinDispatchInfoBuilder {
};

BuiltinDispatchInfoBuilder(BuiltIns &kernelLib) : kernelsLib(kernelLib) {}
virtual ~BuiltinDispatchInfoBuilder() = default;

template <typename... KernelsDescArgsT>
void populate(Context &context, Device &device, EBuiltInOps operation, const char *options, KernelsDescArgsT &&... desc);
Expand Down
1 change: 1 addition & 0 deletions runtime/helpers/kmd_notify_properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class KmdNotifyHelper {
public:
KmdNotifyHelper() = delete;
KmdNotifyHelper(const KmdNotifyProperties *properties) : properties(properties){};
MOCKABLE_VIRTUAL ~KmdNotifyHelper() = default;

bool obtainTimeoutParams(int64_t &timeoutValueOutput,
bool quickKmdSleepRequest,
Expand Down
4 changes: 2 additions & 2 deletions runtime/os_interface/windows/d3d_sharing_functions.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -103,7 +103,7 @@ class D3DSharingFunctions : public SharingFunctions {
}

D3DSharingFunctions() = delete;
virtual ~D3DSharingFunctions(){};

static const uint32_t sharingId;

MOCKABLE_VIRTUAL void createQuery(D3DQuery **query);
Expand Down
1 change: 1 addition & 0 deletions runtime/sharings/sharing_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class SharingContextBuilder {

class SharingBuilderFactory {
public:
virtual ~SharingBuilderFactory() = default;
virtual std::unique_ptr<SharingContextBuilder> createContextBuilder() = 0;
virtual std::string getExtensions() = 0;
virtual void fillGlobalDispatchTable() = 0;
Expand Down
2 changes: 1 addition & 1 deletion runtime/sharings/va/va_sharing_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace OCLRT {
class VASharingFunctions : public SharingFunctions {
public:
VASharingFunctions(VADisplay vaDisplay);
~VASharingFunctions();
~VASharingFunctions() override;

uint32_t getId() const override {
return VASharingFunctions::sharingId;
Expand Down
18 changes: 11 additions & 7 deletions runtime/utilities/arrayref.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ class ArrayRef {
using const_iterator = const DataType *;

template <typename IteratorType>
ArrayRef(IteratorType b, IteratorType e)
: b(&*b), e(&*(e - 1) + 1) {
ArrayRef(IteratorType b, IteratorType e) {
if (b != nullptr) {
this->b = &*b;
this->e = &*(e - 1) + 1;
} else {
this->b = nullptr;
this->e = nullptr;
}
}

template <typename IteratorType>
Expand All @@ -52,9 +58,7 @@ class ArrayRef {
: b(&array[0]), e(&array[Size]) {
}

ArrayRef()
: b(0), e(0) {
}
ArrayRef() = default;

size_t size() const {
return e - b;
Expand Down Expand Up @@ -94,8 +98,8 @@ class ArrayRef {
}

private:
DataType *b;
DataType *e;
DataType *b = nullptr;
DataType *e = nullptr;
};

template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/.clang-tidy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-core.StackAddressEscape,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.uninitialized.Assign,-clang-analyzer-unix.MismatchedDeallocator,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference,-clang-analyzer-cplusplus.NewDelete'
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-core.StackAddressEscape,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.uninitialized.Assign,-clang-analyzer-unix.MismatchedDeallocator,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-optin.cplusplus.VirtualCall'
# WarningsAsErrors: '.*'
HeaderFilterRegex: 'runtime/'
AnalyzeTemporaryDtors: false
Expand Down
2 changes: 2 additions & 0 deletions unit_tests/command_queue/enqueue_debug_kernel_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,6 @@ HWTEST_F(EnqueueDebugKernelSimpleTest, givenKernelFromProgramWithoutDebugEnabled

size_t gws[] = {1, 1, 1};
mockCmdQ->enqueueKernel(kernel.get(), 1, nullptr, gws, nullptr, 0, nullptr, nullptr);

::testing::Mock::VerifyAndClearExpectations(mockCmdQ.get());
}
3 changes: 1 addition & 2 deletions unit_tests/os_interface/linux/.clang-tidy
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-optin.performance.Padding,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-cplusplus.NewDeleteLeaks'

Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-optin.performance.Padding,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-optin.cplusplus.VirtualCall'

# WarningsAsErrors: '.*'
HeaderFilterRegex: 'runtime/'
Expand Down
6 changes: 3 additions & 3 deletions unit_tests/sharings/va/va_sharing_linux_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -81,8 +81,8 @@ TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenFailsThenFunctionsAreNull)
EXPECT_TRUE(functions.wereFunctionsAssignedNull());
}

VAPrivFunc GetLibFunc(VADisplay vaDisplay, const char *func) {
return (VAPrivFunc)0xdeadbeef;
void *GetLibFunc(VADisplay vaDisplay, const char *func) {
return (void *)0xdeadbeef;
}

TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenSuccedsThenFunctionsAreNotNull) {
Expand Down

0 comments on commit 972c080

Please sign in to comment.