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.

llvm-svn: 374789
This commit is contained in:
Simon Pilgrim 2019-10-14 16:46:21 +00:00
parent ef0cb27180
commit e8877d0439
1 changed files with 1 additions and 1 deletions

View File

@ -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.