summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-28 14:23:35 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-28 14:23:35 +0200
commita528392e71bc70136021be4e3d83732fccbb885e (patch)
treefa3f05d4aac3c670456982b336b70d39d29b8548 /solenv
parent29c09916760419ebfb87a954927bcd02b186a46b (diff)
Fixed/improved loplugin:cppunitassertequals
* 994e38e336beeacbd983faafac480afc94d3947e "loplugin: use TypeCheck instead of getQualifiedNameAsString" had effectively disabled this plugin (Asserter is a struct, not a namespace). Fixed that. * Also improved the checks, for one removing the---expensive---use of Plugin::parentStmt, for another making the plugin look into (...), !..., and ...&&... expressions. * However, as the plugin had effectively already been disabled (see above) when it was switched on generally with 839e53b933322b739a7f534af58c63a2c69af7bd "compilerplugins: enable loplugin:cppunitassertequals by default", it now hit way more places than I had initially anticipated. To keep the amount of work manageable, midway-through I disabled looking into ...&&... expressions for now. That will be enabled (and resulting warnings fixed) in follow-up commits. * Checks like CPPUNIT_ASSERT(a == b) that actually want to check a specific overloaded operator == implementation, rather than using such an operator == to actually check that a and b are equal, can be rewritten as CPPUNIT_ASSERT(operator ==(a, b)) to avoid false warnings from this plugin. Change-Id: If3501020e2d150ad0f2454a65a39081e31470c0f
Diffstat (limited to 'solenv')
-rw-r--r--solenv/CompilerTest_compilerplugins_clang.mk5
-rw-r--r--solenv/gbuild/CompilerTest.mk1
2 files changed, 6 insertions, 0 deletions
diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk
index 724a9ac07046..9f8810eb4057 100644
--- a/solenv/CompilerTest_compilerplugins_clang.mk
+++ b/solenv/CompilerTest_compilerplugins_clang.mk
@@ -10,6 +10,7 @@
$(eval $(call gb_CompilerTest_CompilerTest,compilerplugins_clang))
$(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
+ compilerplugins/clang/test/cppunitassertequals \
compilerplugins/clang/test/datamembershadow \
compilerplugins/clang/test/externvar \
compilerplugins/clang/test/finalprotected \
@@ -27,6 +28,10 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
compilerplugins/clang/test/vclwidgets \
))
+$(eval $(call gb_CompilerTest_use_externals,compilerplugins_clang, \
+ cppunit \
+))
+
$(eval $(call gb_CompilerTest_use_udk_api,compilerplugins_clang))
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/CompilerTest.mk b/solenv/gbuild/CompilerTest.mk
index a495cf368dda..e7f798ba0eae 100644
--- a/solenv/gbuild/CompilerTest.mk
+++ b/solenv/gbuild/CompilerTest.mk
@@ -42,6 +42,7 @@ $(eval $(foreach method, \
add_objcxxobjects \
add_cxxclrobject \
add_cxxclrobjects \
+ use_externals \
use_udk_api \
, \
$(call gb_CompilerTest__forward_to_Linktarget,$(method)) \