Some more loplugin:cstylecast clean-up
Change-Id: I132d22e2af3cf673c17d8964f690d48990834884
This commit is contained in:
@@ -96,18 +96,17 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) {
|
||||
std::string incompFrom;
|
||||
std::string incompTo;
|
||||
if( expr->getCastKind() == CK_BitCast ) {
|
||||
QualType t1 = resolvePointers(expr->getSubExprAsWritten()->getType());
|
||||
QualType t2 = resolvePointers(expr->getType());
|
||||
// Ignore "safe" casts for now that involve casting from or to void*
|
||||
// (and can thus not be interpreted as either a static_cast or a
|
||||
QualType t = resolvePointers(expr->getSubExprAsWritten()->getType());
|
||||
// Ignore "safe" casts for now that involve casting from void* (and can
|
||||
// thus not be interpreted as either a static_cast or a
|
||||
// reinterpret_cast, with potentially different results):
|
||||
if (t1->isVoidType() || t2->isVoidType()) {
|
||||
if (t->isVoidType()) {
|
||||
return true;
|
||||
}
|
||||
if (t1->isIncompleteType()) {
|
||||
if (t->isIncompleteType()) {
|
||||
incompFrom = "incomplete ";
|
||||
}
|
||||
if (t2->isIncompleteType()) {
|
||||
if (resolvePointers(expr->getType())->isIncompleteType()) {
|
||||
incompTo = "incomplete ";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user