impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Internal Jenkins (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3676: Use clang as a static analysis tool
Date Fri, 04 Nov 2016 00:13:13 GMT
Internal Jenkins has submitted this change and it was merged.

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
Reviewed-by: Jim Apple <>
Tested-by: Internal Jenkins
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/service/
M be/src/service/
M be/src/service/
M be/src/service/impala-server.h
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/
114 files changed, 565 insertions(+), 323 deletions(-)

  Jim Apple: Looks good to me, approved
  Internal Jenkins: Verified

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ed168488cb30ddeccd0087f3840541d858f9c06
Gerrit-PatchSet: 13
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Tim Armstrong <>

View raw message