summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2019-02-05 17:08:30 -0800
committer Chih-Hung Hsieh <chh@google.com> 2019-02-05 17:11:05 -0800
commit2b61bddc1ab48908a6efb0581c4e0884bf11863e (patch)
tree47f03d92fff6ab2fa1f6fe3bc0e2716e50c9fc3f
parentd6471064e90bdbbd65321f3158255844ed8c4353 (diff)
Work around clang-tidy bug in dex_builder.cc.
Bug: 123880763 Test: build with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*, -google-readability-*,-google-runtime-references,-cppcoreguidelines-*, -modernize-*,-llvm-*,-bugprone-narrowing-conversions, -misc-non-private-member-variables-in-classes, -misc-unused-parameters,-hicpp-*,-fuchsia-* Change-Id: Ibf80f951ae2369a55570770febe8a1c4422181e1
-rw-r--r--startop/view_compiler/Android.bp2
-rw-r--r--startop/view_compiler/dex_builder.cc2
2 files changed, 1 insertions, 3 deletions
diff --git a/startop/view_compiler/Android.bp b/startop/view_compiler/Android.bp
index 37caeb2044ff..f5b4308a1b50 100644
--- a/startop/view_compiler/Android.bp
+++ b/startop/view_compiler/Android.bp
@@ -58,8 +58,6 @@ cc_library_static {
"util.cc",
"layout_validation.cc",
],
- // b/123880763, clang-tidy analyzer has segmentation fault with dex_builder.cc
- tidy_checks: ["-clang-analyzer-*"],
host_supported: true,
}
diff --git a/startop/view_compiler/dex_builder.cc b/startop/view_compiler/dex_builder.cc
index 4c1a0dc7f749..6047e8c74e38 100644
--- a/startop/view_compiler/dex_builder.cc
+++ b/startop/view_compiler/dex_builder.cc
@@ -426,7 +426,7 @@ void MethodBuilder::EncodeInvoke(const Instruction& instruction, ::art::Instruct
// Some of the registers don't fit in the four bit short form of the invoke
// instruction, so we need to do an invoke/range. To do this, we need to
// first move all the arguments into contiguous temporary registers.
- std::array<Value, kMaxArgs> scratch{GetScratchRegisters<kMaxArgs>()};
+ std::array<Value, kMaxArgs> scratch = GetScratchRegisters<kMaxArgs>();
const auto& prototype = dex_->GetPrototypeByMethodId(instruction.method_id());
CHECK(prototype.has_value());