Clean away temporarily added using declarations
Change-Id: I26734c13515394162d88351a1cbe2b20abdac865
This commit is contained in:
parent
07b8711526
commit
b35bb38f18
@ -26,7 +26,7 @@ class AutoMem:
|
||||
public RecursiveASTVisitor<AutoMem>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit AutoMem(InstantiationData const & data): Plugin(data), mbInsideDestructor(false) {}
|
||||
explicit AutoMem(loplugin::InstantiationData const & data): Plugin(data), mbInsideDestructor(false) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -20,7 +20,8 @@ class BadStatics
|
||||
{
|
||||
|
||||
public:
|
||||
explicit BadStatics(InstantiationData const& rData) : Plugin(rData) {}
|
||||
explicit BadStatics(loplugin::InstantiationData const& rData):
|
||||
Plugin(rData) {}
|
||||
|
||||
void run() override {
|
||||
if (compiler.getLangOpts().CPlusPlus) { // no non-trivial dtors in C
|
||||
|
@ -23,7 +23,8 @@ class BlockBlock:
|
||||
public RecursiveASTVisitor<BlockBlock>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit BlockBlock(InstantiationData const & data): RewritePlugin(data) {}
|
||||
explicit BlockBlock(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -47,7 +47,8 @@ class CastToVoid final:
|
||||
public RecursiveASTVisitor<CastToVoid>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit CastToVoid(InstantiationData const & data): Plugin(data) {}
|
||||
explicit CastToVoid(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
bool TraverseCStyleCastExpr(CStyleCastExpr * expr) {
|
||||
auto const dre = checkCast(expr);
|
||||
|
@ -16,7 +16,8 @@ class CharRightShift:
|
||||
public RecursiveASTVisitor<CharRightShift>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit CharRightShift(InstantiationData const & data): Plugin(data) {}
|
||||
explicit CharRightShift(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
void run() override
|
||||
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
@ -26,7 +26,8 @@ namespace {
|
||||
|
||||
class CheckUnusedParams: public RecursiveASTVisitor<CheckUnusedParams>, public loplugin::Plugin {
|
||||
public:
|
||||
explicit CheckUnusedParams(InstantiationData const & data): Plugin(data) {}
|
||||
explicit CheckUnusedParams(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
void run() override;
|
||||
bool VisitFunctionDecl(FunctionDecl const *);
|
||||
bool VisitUnaryAddrOf(UnaryOperator const *);
|
||||
|
@ -31,7 +31,8 @@ class CommaOperator:
|
||||
public RecursiveASTVisitor<CommaOperator>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit CommaOperator(InstantiationData const & data): Plugin(data) {}
|
||||
explicit CommaOperator(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ class ComparisonWithConstant :
|
||||
public RecursiveASTVisitor<ComparisonWithConstant>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit ComparisonWithConstant(InstantiationData const & data): RewritePlugin(data) {}
|
||||
explicit ComparisonWithConstant(loplugin::InstantiationData const & data): RewritePlugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -57,14 +57,14 @@ class ConstantParam:
|
||||
public loplugin::FunctionAddress<ConstantParam>
|
||||
{
|
||||
public:
|
||||
explicit ConstantParam(InstantiationData const & data): loplugin::FunctionAddress<ConstantParam>(data) {}
|
||||
explicit ConstantParam(loplugin::InstantiationData const & data): loplugin::FunctionAddress<ConstantParam>(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
// ignore some files that make clang crash inside EvaluateAsInt
|
||||
std::string fn( compiler.getSourceManager().getFileEntryForID(
|
||||
compiler.getSourceManager().getMainFileID())->getName() );
|
||||
normalizeDotDotInFilePath(fn);
|
||||
loplugin::normalizeDotDotInFilePath(fn);
|
||||
if (loplugin::isSamePathname(fn, SRCDIR "/basegfx/source/matrix/b2dhommatrix.cxx")
|
||||
|| loplugin::isSamePathname(fn, SRCDIR "/basegfx/source/matrix/b3dhommatrix.cxx"))
|
||||
return;
|
||||
@ -158,7 +158,7 @@ void ConstantParam::addToCallSet(const FunctionDecl* functionDecl, int paramInde
|
||||
aInfo.callValue = callValue;
|
||||
|
||||
aInfo.sourceLocation = filename.str() + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
|
||||
normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
loplugin::normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
|
||||
callSet.insert(aInfo);
|
||||
}
|
||||
|
@ -35,12 +35,12 @@ class ConstParams:
|
||||
public loplugin::FunctionAddress<ConstParams>
|
||||
{
|
||||
public:
|
||||
explicit ConstParams(InstantiationData const & data): loplugin::FunctionAddress<ConstParams>(data) {}
|
||||
explicit ConstParams(loplugin::InstantiationData const & data): loplugin::FunctionAddress<ConstParams>(data) {}
|
||||
|
||||
virtual void run() override {
|
||||
std::string fn( compiler.getSourceManager().getFileEntryForID(
|
||||
compiler.getSourceManager().getMainFileID())->getName() );
|
||||
normalizeDotDotInFilePath(fn);
|
||||
loplugin::normalizeDotDotInFilePath(fn);
|
||||
if (startswith(fn, SRCDIR "/sal/")
|
||||
|| fn == SRCDIR "/jurt/source/pipe/staticsalhack.cxx"
|
||||
|| startswith(fn, SRCDIR "/bridges/")
|
||||
|
@ -48,7 +48,8 @@ class ConstStringVar:
|
||||
public RecursiveASTVisitor<ConstStringVar>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit ConstStringVar(InstantiationData const & data): Plugin(data) {}
|
||||
explicit ConstStringVar(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
void run() override {
|
||||
if (compiler.getLangOpts().CPlusPlus) {
|
||||
|
@ -25,13 +25,14 @@ class ConvertUIntPtr:
|
||||
public RecursiveASTVisitor<ConvertUIntPtr>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit ConvertUIntPtr(InstantiationData const & data): Plugin(data) {}
|
||||
explicit ConvertUIntPtr(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
std::string fn( compiler.getSourceManager().getFileEntryForID(
|
||||
compiler.getSourceManager().getMainFileID())->getName() );
|
||||
normalizeDotDotInFilePath(fn);
|
||||
loplugin::normalizeDotDotInFilePath(fn);
|
||||
// using sal_uIntPtr as in-between type when converting void* to rtl_TextEncoding
|
||||
if (fn == SRCDIR "/sal/osl/unx/thread.cxx")
|
||||
return;
|
||||
|
@ -59,7 +59,7 @@ class CountUsersOfDefaultParams:
|
||||
public RecursiveASTVisitor<CountUsersOfDefaultParams>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit CountUsersOfDefaultParams(InstantiationData const & data): Plugin(data) {}
|
||||
explicit CountUsersOfDefaultParams(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
@ -130,7 +130,7 @@ void CountUsersOfDefaultParams::niceName(const FunctionDecl* functionDecl, MyFun
|
||||
}
|
||||
|
||||
aInfo.sourceLocation = locationToString(functionDecl->getLocation());
|
||||
normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
loplugin::normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
}
|
||||
|
||||
bool CountUsersOfDefaultParams::VisitCallExpr(const CallExpr * callExpr) {
|
||||
|
@ -20,7 +20,8 @@ class CppunitAssertEquals:
|
||||
public RecursiveASTVisitor<CppunitAssertEquals>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit CppunitAssertEquals(InstantiationData const & data): Plugin(data) {}
|
||||
explicit CppunitAssertEquals(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -86,7 +86,8 @@ class CStyleCast:
|
||||
public RecursiveASTVisitor<CStyleCast>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit CStyleCast(InstantiationData const & data): Plugin(data) {}
|
||||
explicit CStyleCast(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
virtual void run() override {
|
||||
if (compiler.getLangOpts().CPlusPlus) {
|
||||
|
@ -28,7 +28,8 @@ class DataMemberShadow:
|
||||
public RecursiveASTVisitor<DataMemberShadow>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit DataMemberShadow(InstantiationData const & data): Plugin(data) {}
|
||||
explicit DataMemberShadow(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override {
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
|
@ -15,7 +15,8 @@ class DerefNullPtr:
|
||||
public RecursiveASTVisitor<DerefNullPtr>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit DerefNullPtr(InstantiationData const & data): Plugin(data) {}
|
||||
explicit DerefNullPtr(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
void run() override
|
||||
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
@ -15,7 +15,8 @@ class DllPrivate final:
|
||||
public RecursiveASTVisitor<DllPrivate>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit DllPrivate(InstantiationData const & data): Plugin(data) {}
|
||||
explicit DllPrivate(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
bool VisitNamedDecl(NamedDecl const * decl) {
|
||||
if (!decl->getLocation().isInvalid()&&ignoreLocation(decl)) {
|
||||
|
@ -20,7 +20,8 @@ class DodgySwitch:
|
||||
public RecursiveASTVisitor<DodgySwitch>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit DodgySwitch(InstantiationData const & data): Plugin(data) {}
|
||||
explicit DodgySwitch(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -31,13 +31,13 @@ class DropLong:
|
||||
public RecursiveASTVisitor<DropLong>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit DropLong(InstantiationData const & data): Plugin(data) {}
|
||||
explicit DropLong(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
std::string fn( compiler.getSourceManager().getFileEntryForID(
|
||||
compiler.getSourceManager().getMainFileID())->getName() );
|
||||
normalizeDotDotInFilePath(fn);
|
||||
loplugin::normalizeDotDotInFilePath(fn);
|
||||
if (startswith(fn, SRCDIR "/sal/"))
|
||||
return;
|
||||
if (startswith(fn, SRCDIR "/desktop/unx/"))
|
||||
|
@ -79,7 +79,8 @@ class DynCastVisibility final:
|
||||
public RecursiveASTVisitor<DynCastVisibility>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit DynCastVisibility(InstantiationData const & data): Plugin(data) {}
|
||||
explicit DynCastVisibility(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
bool shouldVisitTemplateInstantiations() const { return true; }
|
||||
|
||||
|
@ -46,7 +46,8 @@ class DynExcSpec:
|
||||
public RecursiveASTVisitor<DynExcSpec>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit DynExcSpec(InstantiationData const & data): RewritePlugin(data) {}
|
||||
explicit DynExcSpec(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data) {}
|
||||
|
||||
void run() override {
|
||||
if (compiler.getLangOpts().CPlusPlus) {
|
||||
|
@ -59,7 +59,8 @@ class ExpandableMethods:
|
||||
public RecursiveASTVisitor<ExpandableMethods>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit ExpandableMethods(InstantiationData const & data): Plugin(data) {}
|
||||
explicit ExpandableMethods(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
@ -164,7 +165,7 @@ std::string ExpandableMethods::toString(SourceLocation loc)
|
||||
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( loc );
|
||||
StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
|
||||
std::string sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
|
||||
normalizeDotDotInFilePath(sourceLocation);
|
||||
loplugin::normalizeDotDotInFilePath(sourceLocation);
|
||||
return sourceLocation;
|
||||
}
|
||||
|
||||
|
@ -31,13 +31,13 @@ class ExpressionAlwaysZero:
|
||||
public RecursiveASTVisitor<ExpressionAlwaysZero>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit ExpressionAlwaysZero(InstantiationData const & data): Plugin(data) {}
|
||||
explicit ExpressionAlwaysZero(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
std::string fn( compiler.getSourceManager().getFileEntryForID(
|
||||
compiler.getSourceManager().getMainFileID())->getName() );
|
||||
normalizeDotDotInFilePath(fn);
|
||||
loplugin::normalizeDotDotInFilePath(fn);
|
||||
// encoding of constant value for binary file format
|
||||
if (startswith(fn, SRCDIR "/package/source/zipapi/ZipFile.cxx"))
|
||||
return;
|
||||
|
@ -20,7 +20,7 @@ class ExternAndNotDefined:
|
||||
public RecursiveASTVisitor<ExternAndNotDefined>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit ExternAndNotDefined(InstantiationData const & data): Plugin(data) {}
|
||||
explicit ExternAndNotDefined(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
|
@ -44,7 +44,8 @@ bool hasExternalLinkage(VarDecl const * decl) {
|
||||
class ExternVar: public RecursiveASTVisitor<ExternVar>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit ExternVar(InstantiationData const & data): Plugin(data) {}
|
||||
explicit ExternVar(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
void run() override
|
||||
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
@ -93,7 +93,8 @@ class FailedDynCast:
|
||||
public RecursiveASTVisitor<FailedDynCast>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit FailedDynCast(InstantiationData const & data): Plugin(data) {}
|
||||
explicit FailedDynCast(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
bool shouldVisitTemplateInstantiations() const { return true; }
|
||||
|
||||
|
@ -36,7 +36,8 @@ class FinalClasses:
|
||||
public RecursiveASTVisitor<FinalClasses>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit FinalClasses(InstantiationData const & data): Plugin(data) {}
|
||||
explicit FinalClasses(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -24,7 +24,8 @@ class FinalProtected:
|
||||
public RecursiveASTVisitor<FinalProtected>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit FinalProtected(InstantiationData const & data): Plugin(data) {}
|
||||
explicit FinalProtected(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override {
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
|
@ -24,7 +24,8 @@ class Flatten:
|
||||
public RecursiveASTVisitor<Flatten>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit Flatten(InstantiationData const & data): RewritePlugin(data) {}
|
||||
explicit Flatten(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -26,7 +26,8 @@ class FpComparison:
|
||||
public RecursiveASTVisitor<FpComparison>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit FpComparison(InstantiationData const & data): Plugin(data) {}
|
||||
explicit FpComparison(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -25,7 +25,8 @@ class FragileDestructor:
|
||||
public RecursiveASTVisitor<FragileDestructor>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit FragileDestructor(InstantiationData const & data): Plugin(data) {}
|
||||
explicit FragileDestructor(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
|
@ -79,7 +79,7 @@ class GetImplementationName:
|
||||
public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit GetImplementationName(InstantiationData const & data)
|
||||
explicit GetImplementationName(loplugin::InstantiationData const & data)
|
||||
: Plugin(data)
|
||||
, m_Outdir(initOutdir())
|
||||
, m_OutdirCreated(false)
|
||||
|
@ -234,7 +234,7 @@ class ImplicitBoolConversion:
|
||||
public RecursiveASTVisitor<ImplicitBoolConversion>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit ImplicitBoolConversion(InstantiationData const & data):
|
||||
explicit ImplicitBoolConversion(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
|
@ -14,7 +14,8 @@ namespace {
|
||||
|
||||
class IncludeForm final: public PPCallbacks, public loplugin::RewritePlugin {
|
||||
public:
|
||||
explicit IncludeForm(InstantiationData const & data): RewritePlugin(data)
|
||||
explicit IncludeForm(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data)
|
||||
{ compat::addPPCallbacks(compiler.getPreprocessor(), this); }
|
||||
|
||||
private:
|
||||
|
@ -65,7 +65,8 @@ class InlineFields:
|
||||
public RecursiveASTVisitor<InlineFields>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit InlineFields(InstantiationData const & data): Plugin(data) {}
|
||||
explicit InlineFields(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
@ -120,7 +121,7 @@ MyFieldInfo InlineFields::niceName(const FieldDecl* fieldDecl)
|
||||
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( fieldDecl->getLocation() );
|
||||
StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
|
||||
aInfo.sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
|
||||
normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
loplugin::normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
|
||||
return aInfo;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class InlineSimpleMemberFunctions:
|
||||
public RecursiveASTVisitor<InlineSimpleMemberFunctions>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit InlineSimpleMemberFunctions(InstantiationData const & data): RewritePlugin(data) {}
|
||||
explicit InlineSimpleMemberFunctions(loplugin::InstantiationData const & data): RewritePlugin(data) {}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
|
@ -21,7 +21,8 @@ class InlineVisible:
|
||||
public RecursiveASTVisitor<InlineVisible>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit InlineVisible(InstantiationData const & data): Plugin(data) {}
|
||||
explicit InlineVisible(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
void run() override
|
||||
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
@ -21,7 +21,7 @@ class LiteralToBoolConversion:
|
||||
public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit LiteralToBoolConversion(InstantiationData const & data):
|
||||
explicit LiteralToBoolConversion(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
|
@ -26,7 +26,8 @@ class LoopVarTooSmall:
|
||||
public RecursiveASTVisitor<LoopVarTooSmall>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit LoopVarTooSmall(InstantiationData const & data): Plugin(data) {}
|
||||
explicit LoopVarTooSmall(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override {
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
|
@ -25,7 +25,7 @@ class MemoryVar:
|
||||
public RecursiveASTVisitor<MemoryVar>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit MemoryVar(InstantiationData const & data): Plugin(data), mbChecking(false) {}
|
||||
explicit MemoryVar(loplugin::InstantiationData const & data): Plugin(data), mbChecking(false) {}
|
||||
|
||||
virtual void run() override {
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
|
@ -50,7 +50,8 @@ class MergeClasses:
|
||||
public RecursiveASTVisitor<MergeClasses>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit MergeClasses(InstantiationData const & data): Plugin(data) {}
|
||||
explicit MergeClasses(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -54,7 +54,8 @@ class Nullptr:
|
||||
public RecursiveASTVisitor<Nullptr>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit Nullptr(InstantiationData const & data): RewritePlugin(data) {}
|
||||
explicit Nullptr(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data) {}
|
||||
|
||||
void run() override
|
||||
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
@ -79,13 +79,13 @@ class OnceVar:
|
||||
public RecursiveASTVisitor<OnceVar>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit OnceVar(InstantiationData const & data): Plugin(data) {}
|
||||
explicit OnceVar(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override {
|
||||
// ignore some files with problematic macros
|
||||
std::string fn( compiler.getSourceManager().getFileEntryForID(
|
||||
compiler.getSourceManager().getMainFileID())->getName() );
|
||||
normalizeDotDotInFilePath(fn);
|
||||
loplugin::normalizeDotDotInFilePath(fn);
|
||||
// platform-specific stuff
|
||||
if (fn == SRCDIR "/sal/osl/unx/thread.cxx"
|
||||
|| fn == SRCDIR "/sot/source/base/formats.cxx"
|
||||
|
@ -16,7 +16,7 @@ namespace {
|
||||
|
||||
class OslEndian: public loplugin::Plugin, public PPCallbacks {
|
||||
public:
|
||||
explicit OslEndian(InstantiationData const & data): Plugin(data) {
|
||||
explicit OslEndian(loplugin::InstantiationData const & data): Plugin(data) {
|
||||
compat::addPPCallbacks(compiler.getPreprocessor(), this);
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,8 @@ class Override:
|
||||
public RecursiveASTVisitor<Override>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit Override(InstantiationData const & data): RewritePlugin(data) {}
|
||||
explicit Override(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data) {}
|
||||
|
||||
virtual void run() override;
|
||||
|
||||
|
@ -29,7 +29,8 @@ class OverrideParam:
|
||||
public RecursiveASTVisitor<OverrideParam>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit OverrideParam(InstantiationData const & data): Plugin(data) {}
|
||||
explicit OverrideParam(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override;
|
||||
|
||||
|
@ -31,7 +31,7 @@ class PassParamsByRef:
|
||||
public RecursiveASTVisitor<PassParamsByRef>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit PassParamsByRef(InstantiationData const & data): Plugin(data), mbInsideFunctionDecl(false) {}
|
||||
explicit PassParamsByRef(loplugin::InstantiationData const & data): Plugin(data), mbInsideFunctionDecl(false) {}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
|
@ -31,7 +31,7 @@ class PassStuffByRef:
|
||||
public RecursiveASTVisitor<PassStuffByRef>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit PassStuffByRef(InstantiationData const & data): Plugin(data), mbInsideFunctionDecl(false), mbFoundReturnValueDisqualifier(false) {}
|
||||
explicit PassStuffByRef(loplugin::InstantiationData const & data): Plugin(data), mbInsideFunctionDecl(false), mbFoundReturnValueDisqualifier(false) {}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
|
@ -226,9 +226,6 @@ bool isSamePathname(StringRef pathname, StringRef other);
|
||||
|
||||
} // namespace
|
||||
|
||||
using loplugin::InstantiationData; //TODO
|
||||
using loplugin::normalizeDotDotInFilePath; //TODO
|
||||
|
||||
#endif // COMPILEPLUGIN_H
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -15,7 +15,8 @@ class PrivateBase:
|
||||
public RecursiveASTVisitor<PrivateBase>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit PrivateBase(InstantiationData const & data): Plugin(data) {}
|
||||
explicit PrivateBase(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
void run() override;
|
||||
|
||||
|
@ -26,7 +26,8 @@ class PtrVector:
|
||||
public RecursiveASTVisitor<PtrVector>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit PtrVector(InstantiationData const & data): Plugin(data) {}
|
||||
explicit PtrVector(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -25,7 +25,8 @@ class RangedForCopy:
|
||||
public RecursiveASTVisitor<RangedForCopy>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit RangedForCopy(InstantiationData const & data): Plugin(data) {}
|
||||
explicit RangedForCopy(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override {
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
|
@ -93,7 +93,8 @@ class RedundantCast:
|
||||
public RecursiveASTVisitor<RedundantCast>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit RedundantCast(InstantiationData const & data): RewritePlugin(data)
|
||||
explicit RedundantCast(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data)
|
||||
{}
|
||||
|
||||
virtual void run() override {
|
||||
|
@ -17,7 +17,8 @@ class RedundantCopy final:
|
||||
public RecursiveASTVisitor<RedundantCopy>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit RedundantCopy(InstantiationData const & data): Plugin(data) {}
|
||||
explicit RedundantCopy(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * expr) {
|
||||
if (ignoreLocation(expr)) {
|
||||
|
@ -17,7 +17,7 @@ class RedundantInline:
|
||||
public RecursiveASTVisitor<RedundantInline>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit RedundantInline(InstantiationData const & data):
|
||||
explicit RedundantInline(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data) {}
|
||||
|
||||
void run() override {
|
||||
|
@ -39,7 +39,7 @@ class RedundantPointerOps:
|
||||
public RecursiveASTVisitor<RedundantPointerOps>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit RedundantPointerOps(InstantiationData const & data): Plugin(data) {}
|
||||
explicit RedundantPointerOps(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -44,7 +44,8 @@ class RefCounting:
|
||||
public RecursiveASTVisitor<RefCounting>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit RefCounting(InstantiationData const & data): Plugin(data) {}
|
||||
explicit RefCounting(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
|
@ -23,7 +23,8 @@ class RenderContext:
|
||||
public RecursiveASTVisitor<RenderContext>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit RenderContext(InstantiationData const & data): Plugin(data) {}
|
||||
explicit RenderContext(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override {
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
|
@ -36,7 +36,8 @@ class ReservedId:
|
||||
public RecursiveASTVisitor<ReservedId>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit ReservedId(InstantiationData const & data): Plugin(data) {}
|
||||
explicit ReservedId(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
void run() override;
|
||||
|
||||
|
@ -146,7 +146,8 @@ class SalBool:
|
||||
public RecursiveASTVisitor<SalBool>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit SalBool(InstantiationData const & data): RewritePlugin(data) {}
|
||||
explicit SalBool(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data) {}
|
||||
|
||||
virtual void run() override;
|
||||
|
||||
|
@ -23,7 +23,8 @@ class SalUnicodeLiteral final:
|
||||
public RecursiveASTVisitor<SalUnicodeLiteral>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit SalUnicodeLiteral(InstantiationData const & data): Plugin(data) {}
|
||||
explicit SalUnicodeLiteral(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
bool VisitCXXStaticCastExpr(CXXStaticCastExpr const * expr) {
|
||||
check(expr);
|
||||
|
@ -26,7 +26,8 @@ class SfxPoolItem:
|
||||
public RecursiveASTVisitor<SfxPoolItem>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit SfxPoolItem(InstantiationData const & data): Plugin(data) {}
|
||||
explicit SfxPoolItem(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
|
@ -54,7 +54,8 @@ class SimplifyBool:
|
||||
public RecursiveASTVisitor<SimplifyBool>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit SimplifyBool(InstantiationData const & data): Plugin(data) {}
|
||||
explicit SimplifyBool(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
void run() override;
|
||||
|
||||
|
@ -71,7 +71,8 @@ class SingleValFields:
|
||||
public RecursiveASTVisitor<SingleValFields>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit SingleValFields(InstantiationData const & data): Plugin(data) {}
|
||||
explicit SingleValFields(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
@ -116,7 +117,7 @@ void SingleValFields::niceName(const FieldDecl* fieldDecl, MyFieldInfo& aInfo)
|
||||
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( fieldDecl->getLocation() );
|
||||
StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
|
||||
aInfo.sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
|
||||
normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
loplugin::normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
}
|
||||
|
||||
bool SingleValFields::VisitFieldDecl( const FieldDecl* fieldDecl )
|
||||
|
@ -46,7 +46,8 @@ class StaticAccess:
|
||||
public RecursiveASTVisitor<StaticAccess>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit StaticAccess(InstantiationData const & data): Plugin(data) {}
|
||||
explicit StaticAccess(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
void run() override
|
||||
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
@ -24,7 +24,7 @@ class StaticMethods:
|
||||
private:
|
||||
bool bVisitedThis;
|
||||
public:
|
||||
explicit StaticMethods(InstantiationData const & data): Plugin(data), bVisitedThis(false) {}
|
||||
explicit StaticMethods(loplugin::InstantiationData const & data): Plugin(data), bVisitedThis(false) {}
|
||||
|
||||
void run() override
|
||||
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
@ -45,7 +45,8 @@ class StringConcat:
|
||||
public RecursiveASTVisitor<StringConcat>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit StringConcat(InstantiationData const & data): Plugin(data) {}
|
||||
explicit StringConcat(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
void run() override
|
||||
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
@ -105,8 +105,8 @@ class StringConstant:
|
||||
public RecursiveASTVisitor<StringConstant>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit StringConstant(InstantiationData const & data): RewritePlugin(data)
|
||||
{}
|
||||
explicit StringConstant(loplugin::InstantiationData const & data):
|
||||
RewritePlugin(data) {}
|
||||
|
||||
void run() override;
|
||||
|
||||
|
@ -27,7 +27,8 @@ class StringStatic
|
||||
{
|
||||
|
||||
public:
|
||||
explicit StringStatic(InstantiationData const& rData) : Plugin(rData) {}
|
||||
explicit StringStatic(loplugin::InstantiationData const& rData):
|
||||
Plugin(rData) {}
|
||||
|
||||
void run() override;
|
||||
bool VisitVarDecl(VarDecl const*);
|
||||
|
@ -21,7 +21,8 @@ class SubtleZeroInit final:
|
||||
public RecursiveASTVisitor<SubtleZeroInit>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit SubtleZeroInit(InstantiationData const & data): Plugin(data) {}
|
||||
explicit SubtleZeroInit(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
bool VisitCXXNewExpr(CXXNewExpr const * expr) {
|
||||
if (ignoreLocation(expr)) {
|
||||
|
@ -21,7 +21,8 @@ class UnicodeToChar final:
|
||||
public RecursiveASTVisitor<UnicodeToChar>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UnicodeToChar(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnicodeToChar(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
bool TraverseCStyleCastExpr(CStyleCastExpr * expr) {
|
||||
subExprs_.push(expr->getSubExpr());
|
||||
|
@ -32,7 +32,7 @@ class UnnecessaryCatchThrow:
|
||||
public RecursiveASTVisitor<UnnecessaryCatchThrow>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UnnecessaryCatchThrow(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnnecessaryCatchThrow(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ class UnnecessaryOverride:
|
||||
public RecursiveASTVisitor<UnnecessaryOverride>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UnnecessaryOverride(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnnecessaryOverride(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -47,7 +47,8 @@ class UnnecessaryParen:
|
||||
public RecursiveASTVisitor<UnnecessaryParen>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UnnecessaryParen(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnnecessaryParen(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -53,7 +53,8 @@ class UnnecessaryVirtual:
|
||||
public RecursiveASTVisitor<UnnecessaryVirtual>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UnnecessaryVirtual(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnnecessaryVirtual(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
@ -158,7 +159,7 @@ std::string UnnecessaryVirtual::toString(SourceLocation loc)
|
||||
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( loc );
|
||||
StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
|
||||
std::string sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
|
||||
normalizeDotDotInFilePath(sourceLocation);
|
||||
loplugin::normalizeDotDotInFilePath(sourceLocation);
|
||||
return sourceLocation;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ class UnoAny:
|
||||
public RecursiveASTVisitor<UnoAny>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UnoAny(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnoAny(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
void run() override {
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
|
@ -53,7 +53,7 @@ Decl const * getPreviousNonFriendDecl(Decl const * decl) {
|
||||
|
||||
class UnrefFun: public RecursiveASTVisitor<UnrefFun>, public loplugin::Plugin {
|
||||
public:
|
||||
explicit UnrefFun(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnrefFun(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
void run() override
|
||||
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
@ -62,7 +62,7 @@ class UnusedEnumConstants:
|
||||
public RecursiveASTVisitor<UnusedEnumConstants>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UnusedEnumConstants(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnusedEnumConstants(loplugin::InstantiationData const & data): Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
@ -107,7 +107,7 @@ MyFieldInfo UnusedEnumConstants::niceName(const EnumConstantDecl* enumConstantDe
|
||||
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( enumConstantDecl->getLocation() );
|
||||
StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
|
||||
aInfo.sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
|
||||
normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
loplugin::normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
|
||||
return aInfo;
|
||||
}
|
||||
|
@ -132,7 +132,8 @@ class UnusedFields:
|
||||
public RecursiveASTVisitor<UnusedFields>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UnusedFields(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnusedFields(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override;
|
||||
|
||||
@ -237,7 +238,7 @@ MyFieldInfo UnusedFields::niceName(const FieldDecl* fieldDecl)
|
||||
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( fieldDecl->getLocation() );
|
||||
StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
|
||||
aInfo.sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
|
||||
normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
loplugin::normalizeDotDotInFilePath(aInfo.sourceLocation);
|
||||
|
||||
switch (fieldDecl->getAccess())
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ class UnusedFieldsRemove:
|
||||
public RecursiveASTVisitor<UnusedFieldsRemove>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit UnusedFieldsRemove(InstantiationData const & data);
|
||||
explicit UnusedFieldsRemove(loplugin::InstantiationData const & data);
|
||||
~UnusedFieldsRemove();
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
@ -52,7 +52,7 @@ size_t getFilesize(const char* filename)
|
||||
return st.st_size;
|
||||
}
|
||||
|
||||
UnusedFieldsRemove::UnusedFieldsRemove(InstantiationData const & data): RewritePlugin(data)
|
||||
UnusedFieldsRemove::UnusedFieldsRemove(loplugin::InstantiationData const & data): RewritePlugin(data)
|
||||
{
|
||||
static const char sInputFile[] = SRCDIR "/result.txt";
|
||||
mmapFilesize = getFilesize(sInputFile);
|
||||
|
@ -78,7 +78,8 @@ class UnusedMethods:
|
||||
public RecursiveASTVisitor<UnusedMethods>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UnusedMethods(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UnusedMethods(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
@ -177,7 +178,7 @@ std::string UnusedMethods::toString(SourceLocation loc)
|
||||
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( loc );
|
||||
StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
|
||||
std::string sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
|
||||
normalizeDotDotInFilePath(sourceLocation);
|
||||
loplugin::normalizeDotDotInFilePath(sourceLocation);
|
||||
return sourceLocation;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class UnusedMethodsRemove:
|
||||
public RecursiveASTVisitor<UnusedMethodsRemove>, public loplugin::RewritePlugin
|
||||
{
|
||||
public:
|
||||
explicit UnusedMethodsRemove(InstantiationData const & data);
|
||||
explicit UnusedMethodsRemove(loplugin::InstantiationData const & data);
|
||||
~UnusedMethodsRemove();
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
@ -53,7 +53,7 @@ size_t getFilesize(const char* filename)
|
||||
return st.st_size;
|
||||
}
|
||||
|
||||
UnusedMethodsRemove::UnusedMethodsRemove(InstantiationData const & data): RewritePlugin(data)
|
||||
UnusedMethodsRemove::UnusedMethodsRemove(loplugin::InstantiationData const & data): RewritePlugin(data)
|
||||
{
|
||||
static const char sInputFile[] = SRCDIR "/result.txt";
|
||||
mmapFilesize = getFilesize(sInputFile);
|
||||
|
@ -27,7 +27,8 @@ class UseUniquePtr:
|
||||
public RecursiveASTVisitor<UseUniquePtr>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit UseUniquePtr(InstantiationData const & data): Plugin(data) {}
|
||||
explicit UseUniquePtr(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
|
@ -30,7 +30,8 @@ class VCLWidgets:
|
||||
public RecursiveASTVisitor<VCLWidgets>, public loplugin::Plugin
|
||||
{
|
||||
public:
|
||||
explicit VCLWidgets(InstantiationData const & data): Plugin(data) {}
|
||||
explicit VCLWidgets(loplugin::InstantiationData const & data): Plugin(data)
|
||||
{}
|
||||
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
|
@ -24,7 +24,8 @@ class WeakObject
|
||||
{
|
||||
|
||||
public:
|
||||
explicit WeakObject(InstantiationData const& rData) : Plugin(rData) {}
|
||||
explicit WeakObject(loplugin::InstantiationData const& rData): Plugin(rData)
|
||||
{}
|
||||
|
||||
void run() override {
|
||||
if (compiler.getLangOpts().CPlusPlus) { // no OWeakObject in C
|
||||
|
Loading…
x
Reference in New Issue
Block a user