summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-12-12 12:13:27 +0200
committerTor Lillqvist <tml@collabora.com>2016-12-12 15:52:53 +0200
commit2da2cfcb19870181907cb46e08984a26485f6ffc (patch)
tree429bc7d5c4f3855ae54e1f7ffcfb0f0107737ea6 /compilerplugins
parent345800501c2af7c48460cc0437543822c09da1c0 (diff)
Whitelist aLogger, in FormulaLogger& FormulaLogger::get()
To avoid this: sc/source/core/tool/formulalogger.cxx:55:26: error: bad static variable causes crash on shutdown [loplugin:badstatics] static FormulaLogger aLogger; ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ sc/inc/formulalogger.hxx:42:31: note: ... due to this member of 'FormulaLogger' [loplugin:badstatics] const ScFormulaCellGroup* mpLastGroup = nullptr; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ sc/inc/formulacell.hxx:66:20: note: ... due to this member of 'ScFormulaCellGroup' [loplugin:badstatics] ScFormulaCell *mpTopCell; ~~~~~~~~~~~~~~~^~~~~~~~~ sc/inc/formulacell.hxx:114:21: note: ... due to this member of 'ScFormulaCell' [loplugin:badstatics] ScDocument* pDocument; ~~~~~~~~~~~~~~~~^~~~~~~~~ sc/inc/document.hxx:312:27: note: ... due to this member of 'ScDocument' [loplugin:badstatics] VclPtr<SfxPrinter> pPrinter; ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ Change-Id: I533e45f655ca928a801188aa48ee818d89a962ac
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/badstatics.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/compilerplugins/clang/badstatics.cxx b/compilerplugins/clang/badstatics.cxx
index 7ac7820d16e6..463a3a38a457 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -197,6 +197,7 @@ public:
// ScAddInAsync* keys if that set is not empty at exit
|| name == "g_aWindowList"
//vcl/unx/gtk/a11y/atkutil.cxx, asserted empty at exit
+ || name == "aLogger" // FormulaLogger& FormulaLogger::get() in sc/source/core/tool/formulalogger.cxx
|| (loplugin::DeclCheck(pVarDecl).Var("aAllListeners")
.Class("ScAddInListener").GlobalNamespace()) // not owning
) // these variables appear unproblematic