diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-06 14:50:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-07 12:07:39 +0100 |
commit | 9610bab09361f506fd7b1a5f81d796a1f2c8afe4 (patch) | |
tree | a548ba147b488ea60230e27b62a57121836e113d /compilerplugins | |
parent | b35bb38f18fd94aa67af944f76b820d59380b78b (diff) |
loplugin:constparams in sd
Change-Id: Id4b68ca0509111396ed354f4cda43d663083cad0
Reviewed-on: https://gerrit.libreoffice.org/44388
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/constparams.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx index ef97d671f801..f075d0c06edc 100644 --- a/compilerplugins/clang/constparams.cxx +++ b/compilerplugins/clang/constparams.cxx @@ -55,6 +55,15 @@ public: || startswith(fn, SRCDIR "/sfx2/source/doc/syspath.cxx") // ignore this for now || startswith(fn, SRCDIR "/libreofficekit") + // I end up with a + // CXXMemberCallExpr + // to a + // BuiltinType '<bound member function type>' + // and the AST gives me no further useful information. + || startswith(fn, SRCDIR "/sw/source/core/doc/docfly.cxx") + || startswith(fn, SRCDIR "/sw/source/core/doc/DocumentContentOperationsManager.cxx") + || startswith(fn, SRCDIR "/sw/source/core/fields/cellfml.cxx") + || startswith(fn, SRCDIR "/sw/source/filter/ww8/ww8par6.cxx") ) return; @@ -194,6 +203,12 @@ bool ConstParams::CheckTraverseFunctionDecl(FunctionDecl * functionDecl) || name == "egiGraphicExport" || name == "etiGraphicExport" || name == "epsGraphicExport" + // callback for some external code? + || name == "ScAddInAsyncCallBack" + // used as function pointers + || name == "Read_Footnote" + || name == "Read_Field" + || name == "Read_And" ) return false; } @@ -215,6 +230,9 @@ bool ConstParams::CheckTraverseFunctionDecl(FunctionDecl * functionDecl) // since we normally can't change typedefs, just ignore them if (isa<TypedefType>(pParmVarDecl->getType())) continue; + // some typedefs turn into these + if (isa<DecayedType>(pParmVarDecl->getType())) + continue; // TODO ignore these for now, has some effects I don't understand if (type.Pointer().Pointer()) continue; @@ -224,6 +242,8 @@ bool ConstParams::CheckTraverseFunctionDecl(FunctionDecl * functionDecl) // ignore things with template params if (pParmVarDecl->getType()->isInstantiationDependentType()) continue; + if (functionDecl->getIdentifier() && functionDecl->getName() == "WW8TransCol") + pParmVarDecl->getType()->dump(); interestingParamSet.insert(pParmVarDecl); parmToFunction[pParmVarDecl] = functionDecl; foundInterestingParam = true; |