mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-04 08:37:45 +00:00
BitsInit::resolveReferences - silence static analyzer null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, assert to check that the loop has set the cached pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374789 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dd72464f64
commit
644ccfc9c7
@ -438,7 +438,7 @@ Init *BitsInit::resolveReferences(Resolver &R) const {
|
||||
CachedBitVarRef = CurBitVar->getBitVar();
|
||||
CachedBitVarResolved = CachedBitVarRef->resolveReferences(R);
|
||||
}
|
||||
|
||||
assert(CachedBitVarResolved && "Unresolved bitvar reference");
|
||||
NewBit = CachedBitVarResolved->getBit(CurBitVar->getBitNum());
|
||||
} else {
|
||||
// getBit(0) implicitly converts int and bits<1> values to bit.
|
||||
|
Loading…
x
Reference in New Issue
Block a user