diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:08:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:29 +0100 |
commit | ef44d45a4e23ee58b245563222d18bc18300c3d1 (patch) | |
tree | 495ebcdadb643aa92c043cc98f7246daab73529b /compilerplugins | |
parent | 51a705c439ef2074120f276cce641d8e21768e8f (diff) |
Clean up C-style casts from pointers to void
Change-Id: Idff46e5642034cf751d557de9a49c02a7abf27bb
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/cstylecast.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx index 048d2d59cd87..fcc1fc828862 100644 --- a/compilerplugins/clang/cstylecast.cxx +++ b/compilerplugins/clang/cstylecast.cxx @@ -114,14 +114,9 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) { std::string incompFrom; std::string incompTo; if( expr->getCastKind() == CK_BitCast ) { - 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 (t->isVoidType()) { - return true; - } - if (t->isIncompleteType()) { + if (resolvePointers(expr->getSubExprAsWritten()->getType()) + ->isIncompleteType()) + { incompFrom = "incomplete "; } if (resolvePointers(expr->getType())->isIncompleteType()) { |