namespace
{ class ExpressionAlwaysZero : public loplugin::FilteringPlugin<ExpressionAlwaysZero>
{ public: explicit ExpressionAlwaysZero(loplugin::InstantiationData const& data)
: FilteringPlugin(data)
{
}
virtualvoid run() override
{ // don't use getMainFileID, it may return "<stdin>"
std::string fn(handler.getMainFileName());
loplugin::normalizeDotDotInFilePath(fn); // encoding of constant value for binary file format if (loplugin::hasPathnamePrefix(fn, SRCDIR "/package/source/zipapi/ZipFile.cxx")) return; // some auto-generated static data if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sal/textenc/tables.cxx")) return; // nested conditional defines that are not worth cleaning up if (loplugin::hasPathnamePrefix(fn, SRCDIR "/opencl/source/openclwrapper.cxx")) return; // some kind of matrix calculation, the compiler will optimise it out anyway if (loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/gdi/bitmap4.cxx")) return; // code follows a pattern if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/source/svdraw/svdhdl.cxx")) return; // looks like some kind of TODO marker if (loplugin::hasPathnamePrefix(fn, SRCDIR "/chart2/source/view/main/PropertyMapper.cxx")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/sc/source/core/data/formulacell.cxx")) return;
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.