forked from OSchip/llvm-project
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:
parent
ef0cb27180
commit
e8877d0439
|
@ -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…
Reference in New Issue