mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
enable & switch to clang 6.0
Change-Id: I61910614ddaa37db18a3d995fa94efb03238279a Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
ab507d73de
commit
972c080083
@ -17,7 +17,7 @@ components:
|
||||
branch: infra
|
||||
clean_on_sync: true
|
||||
dest_dir: infra
|
||||
revision: 8b13573ecf55f1f1142a815fdc181d34c29c7574
|
||||
revision: 5a57e424807a4fb6a2e4146211b8ae421baa3e30
|
||||
type: git
|
||||
internal:
|
||||
branch: master
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,8 @@ class Storage {
|
||||
: rootPath(rootPath) {
|
||||
}
|
||||
|
||||
virtual ~Storage() = default;
|
||||
|
||||
BuiltinResourceT load(const std::string &resourceName);
|
||||
|
||||
protected:
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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"),
|
||||
@ -103,7 +103,7 @@ class D3DSharingFunctions : public SharingFunctions {
|
||||
}
|
||||
|
||||
D3DSharingFunctions() = delete;
|
||||
virtual ~D3DSharingFunctions(){};
|
||||
|
||||
static const uint32_t sharingId;
|
||||
|
||||
MOCKABLE_VIRTUAL void createQuery(D3DQuery **query);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
@ -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;
|
||||
@ -94,8 +98,8 @@ class ArrayRef {
|
||||
}
|
||||
|
||||
private:
|
||||
DataType *b;
|
||||
DataType *e;
|
||||
DataType *b = nullptr;
|
||||
DataType *e = nullptr;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
@ -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
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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/'
|
||||
|
@ -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"),
|
||||
@ -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) {
|
||||
|
Reference in New Issue
Block a user