loplugin:oncevar various
Change-Id: I8b82d46d4688b1a59d6fe1b05da7d5c8dfc13ca6 Reviewed-on: https://gerrit.libreoffice.org/38766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -63,6 +63,10 @@ public:
|
||||
// TODO taking local reference to variable
|
||||
if (fn == SRCDIR "/sc/source/filter/excel/xechart.cxx")
|
||||
return;
|
||||
// macros managing to generate to a valid warning
|
||||
if (fn == SRCDIR "/solenv/bin/concat-deps.c")
|
||||
return;
|
||||
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
|
||||
for (auto const & varDecl : maVarDeclSet)
|
||||
@@ -272,7 +276,7 @@ bool OnceVar::VisitDeclRefExpr( const DeclRefExpr* declRefExpr )
|
||||
return true;
|
||||
}
|
||||
|
||||
loplugin::Plugin::Registration< OnceVar > X("oncevar", false);
|
||||
loplugin::Plugin::Registration< OnceVar > X("oncevar", true);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -11,12 +11,12 @@
|
||||
|
||||
/*int foo() { return 1; }*/
|
||||
|
||||
void call_value(int); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}}
|
||||
void call_const_ref(int const &); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}}
|
||||
void call_ref(int &); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}}
|
||||
void call_value(OUString); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}}
|
||||
void call_const_ref(OUString const &); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}}
|
||||
void call_ref(OUString &); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}}
|
||||
void call_value(int);
|
||||
void call_const_ref(int const &);
|
||||
void call_ref(int &);
|
||||
void call_value(OUString);
|
||||
void call_const_ref(OUString const &);
|
||||
void call_ref(OUString &);
|
||||
|
||||
int main() {
|
||||
/* TODO
|
||||
|
Reference in New Issue
Block a user