/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/** * Check for multiple copies of WeakBase in base classes
*/ namespace
{ class WeakBase : public loplugin::FilteringPlugin<WeakBase>
{ public: explicit WeakBase(loplugin::InstantiationData const& data)
: FilteringPlugin(data)
{
}
if (foundVirtualWeakBase && noWeakBases > 0)
report(DiagnosticsEngine::Warning, "found one virtual base and one or more normal bases of tools::WeakBase, through " "inheritance paths %0",
recordDecl->getBeginLoc())
<< basePaths1; elseif (!foundVirtualWeakBase && noWeakBases > 1)
report(DiagnosticsEngine::Warning, "found multiple copies of tools::WeakBase, through inheritance paths %0",
recordDecl->getBeginLoc())
<< basePaths1;
if (foundVirtualOWeakObject && noWeakObjects > 0)
report(DiagnosticsEngine::Warning, "found one virtual base and one or more normal bases of cppu::OWeakObject, through " "inheritance paths %0",
recordDecl->getBeginLoc())
<< basePaths2; elseif (!foundVirtualOWeakObject && noWeakObjects > 1)
report(DiagnosticsEngine::Warning, "found multiple copies of cppu::OWeakObject, through inheritance paths %0",
recordDecl->getBeginLoc())
<< basePaths2;
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.