Commit d1251fb0 authored by starlord's avatar starlord
Browse files

format code by clang-tidy


Former-commit-id: 437b1fff79da965b8aafce026c8be4f9d582c909
parent e8ae6127
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -18,8 +18,10 @@
Checks:          'clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,modernize-*,readability-*'
# produce HeaderFilterRegex from cpp/build-support/lint_exclusions.txt with:
# echo -n '^('; sed -e 's/*/\.*/g' cpp/build-support/lint_exclusions.txt | tr '\n' '|'; echo ')$'
HeaderFilterRegex: '^(.*cmake-build-debug.*|.*cmake-build-release.*|.*cmake_build.*|.*src/thirdparty.*|.*src/core/thirdparty.*|.*src/grpc.*|)$'
HeaderFilterRegex: '^(.*cmake-build-debug.*|.*cmake-build-release.*|.*cmake_build.*|.*src/core/thirdparty.*|.*thirdparty.*|.*easylogging++.*|.*SqliteMetaImpl.cpp|.*src/grpc.*|.*src/core.*|.*src/wrapper.*)$'
AnalyzeTemporaryDtors: true
ChainedConditionalReturn: 1
ChainedConditionalAssignment: 1
CheckOptions:
  - key:             google-readability-braces-around-statements.ShortStatementLines
    value:           '1'
+8 −8
Original line number Diff line number Diff line
@@ -111,14 +111,14 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
        exit 1
    fi
    echo "clang-format check passed!"
#
#    # clang-tidy check
#    make check-clang-tidy
#    if [ $? -ne 0 ]; then
#        echo "ERROR! clang-tidy check failed"
#        exit 1
#    fi
#    echo "clang-tidy check passed!"

    # clang-tidy check
    make check-clang-tidy
    if [ $? -ne 0 ]; then
        echo "ERROR! clang-tidy check failed"
        exit 1
    fi
    echo "clang-tidy check passed!"
else
    # compile and build
    make -j 4 || exit 1
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ class CpuCacheMgr : public CacheMgr<DataObjPtr> {
    CpuCacheMgr();

 public:
    // TODO: use smart pointer instead
    // TODO(myh): use smart pointer instead
    static CpuCacheMgr*
    GetInstance();

+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ DatasetPtr
generate_queries(int64_t n, int64_t d, int64_t k, int64_t base) {
    size_t size = sizeof(float) * n * d;
    auto v = (float *) malloc(size);
    // TODO: check malloc
    // TODO(lxj): check malloc
    for (auto i = 0; i < n; ++i) {
        for (auto j = 0; j < d; ++j) {
            v[i * d + j] = float(base + i);
+1 −1
Original line number Diff line number Diff line
@@ -694,4 +694,4 @@ TEST_F(GPURESTEST, TrainAndSearch) {



// TODO(linxj): Add exception test
// TODO(lxj): Add exception test
Loading