mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Clean up static analyzer warnings.
Clang's static analyzer found several potential cases of undefined behavior, use of un-initialized values, and potentially null pointer dereferences in tablegen, Support, MC, and ADT. This cleans them up with specific assertions on the assumptions of the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224154 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -537,7 +537,7 @@ bool CodeGenInstAlias::tryAliasOpMatch(DagInit *Result, unsigned AliasOpNo,
|
||||
// If both are Operands with the same MVT, allow the conversion. It's
|
||||
// up to the user to make sure the values are appropriate, just like
|
||||
// for isel Pat's.
|
||||
if (InstOpRec->isSubClassOf("Operand") &&
|
||||
if (InstOpRec->isSubClassOf("Operand") && ADI &&
|
||||
ADI->getDef()->isSubClassOf("Operand")) {
|
||||
// FIXME: What other attributes should we check here? Identical
|
||||
// MIOperandInfo perhaps?
|
||||
|
||||
Reference in New Issue
Block a user