Skip to content

Commit 86e0f24

Browse files
authored
Merge pull request #2356 from hzeller/feature-20250216-ready-for-tidy20
Get ready for clang-tidy 20
2 parents 6779bea + 2b5d10b commit 86e0f24

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

shell.nix

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ verible_used_stdenv.mkDerivation {
3838
lcov # coverage html generation.
3939
bazel-buildtools # buildifier
4040

41-
clang-tools_18 # for clang-tidy
42-
clang-tools_17 # for clang-format
41+
llvmPackages_19.clang-tools # for clang-tidy
42+
llvmPackages_17.clang-tools # for clang-format
4343
];
4444
shellHook = ''
4545
# clang tidy: use latest.
46-
export CLANG_TIDY=${pkgs.clang-tools_18}/bin/clang-tidy
46+
export CLANG_TIDY=${pkgs.llvmPackages_19.clang-tools}/bin/clang-tidy
4747
4848
# There is too much volatility between even micro-versions of
49-
# clang-format 18. Let's use 17 for now.
50-
export CLANG_FORMAT=${pkgs.clang-tools_17}/bin/clang-format
49+
# later clang-format. Let's use stable 17 for now.
50+
export CLANG_FORMAT=${pkgs.llvmPackages_17.clang-tools}/bin/clang-format
5151
'';
5252
}

verible/common/util/container-util.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ template <class M>
7171
const typename M::mapped_type &FindWithDefault(
7272
M &map, const typename M::key_type &key, const typename M::mapped_type &d) {
7373
auto found = map.find(key);
74-
return (found == map.end()) ? d : found->second;
74+
return (found == map.end())
75+
? d // NOLINT(bugprone-return-const-ref-from-parameter)
76+
: found->second;
7577
}
7678

7779
template <class M>

verible/verilog/parser/verilog-lexical-context.cc

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include "verible/common/text/token-info.h"
2525
#include "verible/common/util/logging.h"
26+
#include "verible/common/util/with-reason.h"
2627
#include "verible/verilog/parser/verilog-token-enum.h"
2728

2829
namespace verilog {

verible/verilog/tools/ls/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ cc_library(
2626
"//verible/common/text:text-structure",
2727
"//verible/common/text:token-info",
2828
"//verible/common/text:tree-utils",
29+
"//verible/common/util:interval",
2930
"//verible/common/util:logging",
3031
"//verible/verilog/CST:declaration",
3132
"//verible/verilog/CST:dimensions",

verible/verilog/tools/ls/autoexpand.cc

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "verible/common/text/text-structure.h"
4646
#include "verible/common/text/token-info.h"
4747
#include "verible/common/text/tree-utils.h"
48+
#include "verible/common/util/interval.h"
4849
#include "verible/common/util/logging.h"
4950
#include "verible/verilog/CST/declaration.h"
5051
#include "verible/verilog/CST/dimensions.h"

0 commit comments

Comments
 (0)