Skip to content

Commit 972c080

Browse files
enable & switch to clang 6.0
Change-Id: I61910614ddaa37db18a3d995fa94efb03238279a Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
1 parent ab507d7 commit 972c080

File tree

13 files changed

+28
-17
lines changed

13 files changed

+28
-17
lines changed

manifests/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ components:
1717
branch: infra
1818
clean_on_sync: true
1919
dest_dir: infra
20-
revision: 8b13573ecf55f1f1142a815fdc181d34c29c7574
20+
revision: 5a57e424807a4fb6a2e4146211b8ae421baa3e30
2121
type: git
2222
internal:
2323
branch: master

runtime/built_ins/built_ins.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ SchedulerKernel &BuiltIns::getSchedulerKernel(Context &context) {
107107
};
108108
std::call_once(schedulerBuiltIn.programIsInitialized, initializeSchedulerProgramAndKernel);
109109

110+
UNRECOVERABLE_IF(schedulerBuiltIn.pKernel == nullptr);
110111
return *static_cast<SchedulerKernel *>(schedulerBuiltIn.pKernel);
111112
}
112113

runtime/built_ins/built_ins.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ class Storage {
8080
: rootPath(rootPath) {
8181
}
8282

83+
virtual ~Storage() = default;
84+
8385
BuiltinResourceT load(const std::string &resourceName);
8486

8587
protected:

runtime/built_ins/builtins_dispatch_builder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class BuiltinDispatchInfoBuilder {
6565
};
6666

6767
BuiltinDispatchInfoBuilder(BuiltIns &kernelLib) : kernelsLib(kernelLib) {}
68+
virtual ~BuiltinDispatchInfoBuilder() = default;
6869

6970
template <typename... KernelsDescArgsT>
7071
void populate(Context &context, Device &device, EBuiltInOps operation, const char *options, KernelsDescArgsT &&... desc);

runtime/helpers/kmd_notify_properties.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class KmdNotifyHelper {
4848
public:
4949
KmdNotifyHelper() = delete;
5050
KmdNotifyHelper(const KmdNotifyProperties *properties) : properties(properties){};
51+
MOCKABLE_VIRTUAL ~KmdNotifyHelper() = default;
5152

5253
bool obtainTimeoutParams(int64_t &timeoutValueOutput,
5354
bool quickKmdSleepRequest,

runtime/os_interface/windows/d3d_sharing_functions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, Intel Corporation
2+
* Copyright (c) 2017 - 2018, Intel Corporation
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
@@ -103,7 +103,7 @@ class D3DSharingFunctions : public SharingFunctions {
103103
}
104104

105105
D3DSharingFunctions() = delete;
106-
virtual ~D3DSharingFunctions(){};
106+
107107
static const uint32_t sharingId;
108108

109109
MOCKABLE_VIRTUAL void createQuery(D3DQuery **query);

runtime/sharings/sharing_factory.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class SharingContextBuilder {
4848

4949
class SharingBuilderFactory {
5050
public:
51+
virtual ~SharingBuilderFactory() = default;
5152
virtual std::unique_ptr<SharingContextBuilder> createContextBuilder() = 0;
5253
virtual std::string getExtensions() = 0;
5354
virtual void fillGlobalDispatchTable() = 0;

runtime/sharings/va/va_sharing_functions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace OCLRT {
2929
class VASharingFunctions : public SharingFunctions {
3030
public:
3131
VASharingFunctions(VADisplay vaDisplay);
32-
~VASharingFunctions();
32+
~VASharingFunctions() override;
3333

3434
uint32_t getId() const override {
3535
return VASharingFunctions::sharingId;

runtime/utilities/arrayref.h

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ class ArrayRef {
3333
using const_iterator = const DataType *;
3434

3535
template <typename IteratorType>
36-
ArrayRef(IteratorType b, IteratorType e)
37-
: b(&*b), e(&*(e - 1) + 1) {
36+
ArrayRef(IteratorType b, IteratorType e) {
37+
if (b != nullptr) {
38+
this->b = &*b;
39+
this->e = &*(e - 1) + 1;
40+
} else {
41+
this->b = nullptr;
42+
this->e = nullptr;
43+
}
3844
}
3945

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

55-
ArrayRef()
56-
: b(0), e(0) {
57-
}
61+
ArrayRef() = default;
5862

5963
size_t size() const {
6064
return e - b;
@@ -94,8 +98,8 @@ class ArrayRef {
9498
}
9599

96100
private:
97-
DataType *b;
98-
DataType *e;
101+
DataType *b = nullptr;
102+
DataType *e = nullptr;
99103
};
100104

101105
template <typename T>

unit_tests/.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
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'
2+
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'
33
# WarningsAsErrors: '.*'
44
HeaderFilterRegex: 'runtime/'
55
AnalyzeTemporaryDtors: false

unit_tests/command_queue/enqueue_debug_kernel_tests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,6 @@ HWTEST_F(EnqueueDebugKernelSimpleTest, givenKernelFromProgramWithoutDebugEnabled
157157

158158
size_t gws[] = {1, 1, 1};
159159
mockCmdQ->enqueueKernel(kernel.get(), 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
160+
161+
::testing::Mock::VerifyAndClearExpectations(mockCmdQ.get());
160162
}

unit_tests/os_interface/linux/.clang-tidy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
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'
3-
2+
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'
43

54
# WarningsAsErrors: '.*'
65
HeaderFilterRegex: 'runtime/'

unit_tests/sharings/va/va_sharing_linux_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, Intel Corporation
2+
* Copyright (c) 2017 - 2018, Intel Corporation
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
@@ -81,8 +81,8 @@ TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenFailsThenFunctionsAreNull)
8181
EXPECT_TRUE(functions.wereFunctionsAssignedNull());
8282
}
8383

84-
VAPrivFunc GetLibFunc(VADisplay vaDisplay, const char *func) {
85-
return (VAPrivFunc)0xdeadbeef;
84+
void *GetLibFunc(VADisplay vaDisplay, const char *func) {
85+
return (void *)0xdeadbeef;
8686
}
8787

8888
TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenSuccedsThenFunctionsAreNotNull) {

0 commit comments

Comments
 (0)