mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
In switch/case statements, one case can fallthrough to the next case. Sometimes this is intentional, but it is also a common source of bugs (i.e. a missing break/return statement). Clang-Tidy's clang-diagnostic-implicit-fallthrough flags locations where a case falls through to the next case without an explicit fallthrough declaration. This change enables clang-diagnostic-implicit-fallthrough and fixes failing locations. Since Impala uses C++17, this uses C++17's [[fallthrough]] to indicate an explicit fallthrough. This also adjusts clang-tidy's output to suggest [[fallthrough]] as the preferred way to indicate fallthrough. Testing: - Ran core job - Ran clang tidy Change-Id: I6d65c92b442fa0317c3af228997571e124a54092 Reviewed-on: http://gerrit.cloudera.org:8080/20847 Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Zihao Ye <eyizoha@163.com> Reviewed-by: Michael Smith <michael.smith@cloudera.com>
103 lines
3.3 KiB
YAML
103 lines
3.3 KiB
YAML
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. See the NOTICE file
|
|
# distributed with this work for additional information
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
# to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
---
|
|
Checks: "-*,clang*,\
|
|
-clang-analyzer-alpha*,\
|
|
-clang-analyzer-core.CallAndMessage,\
|
|
-clang-analyzer-core.NonNullParamChecker,\
|
|
-clang-analyzer-core.NullDereference,\
|
|
-clang-analyzer-core.UndefinedBinaryOperatorResult,\
|
|
-clang-analyzer-core.uninitialized.ArraySubscript,\
|
|
-clang-analyzer-core.uninitialized.Assign,\
|
|
-clang-analyzer-core.uninitialized.Branch,\
|
|
-clang-analyzer-cplusplus.NewDelete,\
|
|
-clang-analyzer-cplusplus.NewDeleteLeaks,\
|
|
-clang-analyzer-deadcode.DeadStores,\
|
|
-clang-analyzer-optin.performance.Padding,\
|
|
-clang-analyzer-unix.Malloc,\
|
|
-clang-analyzer-unix.MallocSizeof,\
|
|
-clang-diagnostic-c++1z-extensions,\
|
|
-clang-diagnostic-c++98*,\
|
|
-clang-diagnostic-cast-align,\
|
|
-clang-diagnostic-class-varargs,\
|
|
-clang-diagnostic-conversion,\
|
|
-clang-diagnostic-covered-switch-default,\
|
|
-clang-diagnostic-deprecated,\
|
|
-clang-diagnostic-disabled-macro-expansion,\
|
|
-clang-diagnostic-documentation-html,\
|
|
-clang-diagnostic-documentation-unknown-command,\
|
|
-clang-diagnostic-double-promotion,\
|
|
-clang-diagnostic-exit-time-destructors,\
|
|
-clang-diagnostic-float-conversion,\
|
|
-clang-diagnostic-float-equal,\
|
|
-clang-diagnostic-global-constructors,\
|
|
-clang-diagnostic-gnu-anonymous-struct,\
|
|
-clang-diagnostic-gnu-zero-variadic-macro-arguments,\
|
|
-clang-diagnostic-header-hygiene,\
|
|
-clang-diagnostic-missing-prototypes,\
|
|
-clang-diagnostic-missing-variable-declarations,\
|
|
-clang-diagnostic-nested-anon-types,\
|
|
-clang-diagnostic-old-style-cast,\
|
|
-clang-diagnostic-overlength-strings,\
|
|
-clang-diagnostic-packed,\
|
|
-clang-diagnostic-padded,\
|
|
-clang-diagnostic-return-type-c-linkage,\
|
|
-clang-diagnostic-shadow,\
|
|
-clang-diagnostic-shadow-field-in-constructor,\
|
|
-clang-diagnostic-shorten-64-to-32,\
|
|
-clang-diagnostic-sign-compare,\
|
|
-clang-diagnostic-sign-conversion,\
|
|
-clang-diagnostic-switch-enum,\
|
|
-clang-diagnostic-undefined-func-template,\
|
|
-clang-diagnostic-undefined-reinterpret-cast,\
|
|
-clang-diagnostic-unreachable-code,\
|
|
-clang-diagnostic-unreachable-code-return,\
|
|
-clang-diagnostic-unused-command-line-argument,\
|
|
-clang-diagnostic-unused-local-typedef,\
|
|
-clang-diagnostic-unused-parameter,\
|
|
-clang-diagnostic-used-but-marked-unused,\
|
|
-clang-diagnostic-vla-extension,\
|
|
-clang-diagnostic-weak-template-vtables,\
|
|
-clang-diagnostic-weak-vtables,\
|
|
performance-*,\
|
|
-performance-unnecessary-value-param"
|
|
|
|
# Ignore warnings in gutil
|
|
|
|
HeaderFilterRegex: "be/src/\
|
|
(benchmarks\
|
|
|catalog\
|
|
|codegen\
|
|
|common\
|
|
|exec\
|
|
|experiments\
|
|
|exprs\
|
|
|resourcebroker\
|
|
|rpc\
|
|
|runtime\
|
|
|scheduling\
|
|
|service\
|
|
|statestore\
|
|
|testutil\
|
|
|thirdparty\
|
|
|transport\
|
|
|udf\
|
|
|udf_samples\
|
|
|util)"
|
|
|
|
AnalyzeTemporaryDtors: true
|