loplugin:redundantcast: Don't warn about certain casts in macros
...that might depend on macro arguments and not really be redundant Change-Id: If19de3835a4972add58965ea7c0936fad7ef6957
This commit is contained in:
parent
7937984a6a
commit
13e45d6fde
@ -25,6 +25,7 @@
|
||||
|
||||
#include "clang/Sema/Sema.h"
|
||||
|
||||
#include "compat.hxx"
|
||||
#include "plugin.hxx"
|
||||
|
||||
namespace {
|
||||
@ -143,7 +144,9 @@ if(!cc->getSubExpr()->getType()->isPointerType()){
|
||||
} else if (isa<CXXStaticCastExpr>(e)
|
||||
&& isVoidPointer(
|
||||
dyn_cast<CXXStaticCastExpr>(e)->getSubExpr()
|
||||
->IgnoreParenImpCasts()->getType()))
|
||||
->IgnoreParenImpCasts()->getType())
|
||||
&& !compat::isMacroBodyExpansion(
|
||||
compiler, e->getLocStart()))
|
||||
{
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
|
Loading…
x
Reference in New Issue
Block a user