Kaydet (Commit) 9eff2ebf authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Make some loplugin:implicitboolconversion code use TypeCheck

Change-Id: If675d629784894573085122beadc6abc3e67f457
Reviewed-on: https://gerrit.libreoffice.org/64335
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 37688ce6
......@@ -654,12 +654,9 @@ bool ImplicitBoolConversion::TraverseBinAssign(BinaryOperator * expr) {
if (fd != nullptr && fd->isBitField()
&& fd->getBitWidthValue(compiler.getASTContext()) == 1)
{
TypedefType const * t = fd->getType()->getAs<TypedefType>();
if (t != nullptr)
{
std::string sTypeName = t->getDecl()->getNameAsString();
bExt = (sTypeName == "guint" || sTypeName == "quint64");
}
auto const check = loplugin::TypeCheck(fd->getType());
bExt = check.Typedef("guint").GlobalNamespace()
|| check.Typedef("quint64").GlobalNamespace();
}
}
assert(!nested.empty());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment