diff options
author | Michael Ilseman <milseman@apple.com> | 2014-12-12 21:48:03 +0000 |
---|---|---|
committer | Michael Ilseman <milseman@apple.com> | 2014-12-12 21:48:03 +0000 |
commit | 5be22a12c2fdb4e13ead4b2e8a8a68f07fb1f270 (patch) | |
tree | d32cd1ee5853b7b127f7bc8acbb58e753c5feccd /llvm/utils/TableGen/CodeGenInstruction.cpp | |
parent | 90482a77b114ba612951233d90f0173d7b7d04a6 (diff) | |
download | bcm5719-llvm-5be22a12c2fdb4e13ead4b2e8a8a68f07fb1f270.tar.gz bcm5719-llvm-5be22a12c2fdb4e13ead4b2e8a8a68f07fb1f270.zip |
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.
llvm-svn: 224154
Diffstat (limited to 'llvm/utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenInstruction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp index 7c5e6fcc9b9..4bea96927c7 100644 --- a/llvm/utils/TableGen/CodeGenInstruction.cpp +++ b/llvm/utils/TableGen/CodeGenInstruction.cpp @@ -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? |