impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Apple (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3676: Use clang as a static analysis tool
Date Mon, 24 Oct 2016 21:24:08 GMT
Hello Tim Armstrong,

I'd like you to reexamine a change.  Please visit

to look at the new patch set (#7).

Change subject: IMPALA-3676: Use clang as a static analysis tool

IMPALA-3676: Use clang as a static analysis tool

This patch adds a script to run clang-tidy over the whole code
base. It is a first step towards running clang-tidy over patches as a
tool to help users spot bugs before code review.

Because of the number of clang-tidy checks, this patch only addresses
some of them. In particular, only checks starting with 'clang' are
considered. Many of them which are flaky or not part of our style are
excluded from the analysis. This patch also exlcudes some checks which
are part of our current style but which would be too laborious to fix
over the entire codebase, like using nullptr rather than NULL.

This patch also fixes a number of small bugs found by clang-tidy.

Finally, this patch adds the class AlignedNew, the purpose of which is
to provide correct alignment on heap-allocated data. The global new
operator only guarantees 16-byte alignment. A class that includes a
member variable that must be aligned on a k-byte boundary for k>16 can
inherit from AlignedNew<k> to ensure correct alignment on the heap,
quieting clang's -Wover-aligned warning. (Static and stack allocation
are required by the standard to respect the alignment of the type and
its member variables, so no extra code is needed for allocation in
those places.)

Change-Id: I4ed168488cb30ddeccd0087f3840541d858f9c06
A .clang-tidy
M CMakeLists.txt
M be/CMakeLists.txt
M be/src/benchmarks/
M be/src/benchmarks/
M be/src/benchmarks/
M be/src/catalog/
M be/src/catalog/catalog-server.h
M be/src/codegen/
M be/src/codegen/
M be/src/codegen/
M be/src/common/compiler-util.h
M be/src/common/
M be/src/common/logging.h
M be/src/common/status.h
M be/src/exec/
M be/src/exec/delimited-text-parser.h
M be/src/exec/exec-node.h
M be/src/exec/external-data-source-executor.h
M be/src/exec/
M be/src/exec/hbase-scan-node.h
M be/src/exec/
M be/src/exec/hdfs-parquet-scanner.h
M be/src/exec/
M be/src/exec/hdfs-scan-node.h
M be/src/exec/hdfs-table-writer.h
M be/src/exec/parquet-column-readers.h
M be/src/exec/
M be/src/exec/
M be/src/exec/scanner-context.inline.h
M be/src/exec/write-stream.h
M be/src/experiments/bit-stream-utils.8byte.inline.h
M be/src/experiments/
M be/src/exprs/
M be/src/exprs/aggregate-functions.h
M be/src/exprs/compound-predicates.h
M be/src/exprs/
M be/src/exprs/
M be/src/exprs/
M be/src/rpc/TAcceptQueueServer.h
M be/src/rpc/
M be/src/rpc/authentication.h
M be/src/rpc/thrift-server.h
M be/src/runtime/buffered-block-mgr.h
M be/src/runtime/
M be/src/runtime/buffered-tuple-stream.h
M be/src/runtime/
M be/src/runtime/coordinator.h
M be/src/runtime/
M be/src/runtime/data-stream-sender.h
M be/src/runtime/
M be/src/runtime/descriptors.h
M be/src/runtime/exec-env.h
M be/src/runtime/
M be/src/runtime/
M be/src/runtime/hdfs-fs-cache.h
M be/src/runtime/
M be/src/runtime/runtime-filter-bank.h
M be/src/runtime/runtime-filter.h
M be/src/runtime/scoped-buffer.h
M be/src/runtime/string-buffer.h
M be/src/runtime/
M be/src/runtime/
M be/src/runtime/
M be/src/runtime/tmp-file-mgr.h
M be/src/scheduling/
M be/src/scheduling/query-schedule.h
M be/src/scheduling/
M be/src/service/
M be/src/service/
M be/src/service/
M be/src/service/impala-server.h
M be/src/service/
M be/src/service/query-exec-state.h
M be/src/service/
M be/src/statestore/failure-detector.h
M be/src/statestore/statestore-subscriber.h
M be/src/statestore/
M be/src/statestore/statestore.h
M be/src/testutil/
M be/src/testutil/test-udas.h
M be/src/transport/TSasl.h
M be/src/transport/TSaslClientTransport.h
M be/src/transport/TSaslServerTransport.h
M be/src/transport/TSaslTransport.h
M be/src/udf/uda-test-harness.h
M be/src/udf/
M be/src/udf/
M be/src/udf/
M be/src/udf/udf.h
M be/src/udf_samples/
A be/src/util/aligned-new.h
M be/src/util/
M be/src/util/bit-stream-utils.inline.h
M be/src/util/
M be/src/util/
M be/src/util/blocking-queue.h
M be/src/util/
M be/src/util/buffer-builder.h
M be/src/util/
M be/src/util/
M be/src/util/metrics.h
M be/src/util/
M be/src/util/
M be/src/util/
M be/src/util/periodic-counter-updater.h
M be/src/util/
M be/src/util/
M be/src/util/
M be/src/util/runtime-profile.h
M be/src/util/thread-pool.h
M be/src/util/
M bin/
A bin/
R cmake_modules/clang_toolchain.cmake
M fe/src/main/java/org/apache/impala/catalog/
117 files changed, 568 insertions(+), 334 deletions(-)

  git pull ssh:// refs/changes/58/4758/7
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4ed168488cb30ddeccd0087f3840541d858f9c06
Gerrit-PatchSet: 7
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Tim Armstrong <>

View raw message