Commit f2072991 authored by George Burgess IV's avatar George Burgess IV
Browse files

optimizing: Fix a potential nullptr dereference

Operator precedence in C++ means the DCHECK was parsed as
DCHECK((allocation != nullptr && allocation->IsNewInstance()) ||
       allocation->IsNewArray())

Caught by the static analyzer:
art/compiler/optimizing/instruction_builder.cc:1004:14: warning: Called
C++ object pointer is null [clang-analyzer-core.CallAndMessage]

Bug: None
Test: Reran the static analyzer. No more nullptr complaints. m builds
the file fine, as well.
Change-Id: Iad94719fc013f1883746128e066452994740f171
parent 14538fb5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment