path: root/.clang-format
diff options
authorStephan Bergmann <>2017-11-07 16:15:03 +0100
committerStephan Bergmann <>2017-11-08 07:53:29 +0100
commita6309a3c4db0f5b409d47b3af094952fd95d4be7 (patch)
tree4f66e45340bae54d1fa40b31fafc5e36449fd9c0 /.clang-format
parentb273aa535cdddd1f10d13551d5330149d3404c3a (diff)
Suppress loplugin:unnecessaryoverride...
...when a class derives from multiple (non-virtual) instances of one base class, and the override disambiguates which of those instances' member to call. That was the case with SwXTextDocument::queryAdapter (sw/source/uibase/uno/unotxdoc.cxx), where SwXTextDocument derives from cppu::OWeakObject through both SwXTextDocumentBaseClass and SfxBaseModel, but calling queryAdapter through a pointer to SwXTextDocumentBaseClass apparently needs to call OWeakObject::queryAdapter on the second, SfxBaseModel-inherited OWeakObject base instance, or else CppunitTest_sw_macros_test fails. Who knows what other instances of similar non-unnecessary overrides have been removed with the help of broken loplugin:unnecessaryoverride, for which there were no tests that started to fail... Turns out .clang-format lacked "ReflowComments: false" to not break the special "// expected-error {{...}}" etc. comments in compilerplugins/clang/test/. Also, use a better location to report loplugin:unnecessaryoverride, to keep clang-format and loplugin:unnecessaryoverride from fighting over how to split lines and where to put the comment in compilerplugins/clang/test/unnecessaryoverride.cxx. Change-Id: I3b24df24369db12f8ec1080d6c9f7b70ff561a16 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Stephan Bergmann <>
Diffstat (limited to '.clang-format')
1 files changed, 1 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
index 10c6fd8482cd..338e8d627121 100644
--- a/.clang-format
+++ b/.clang-format
@@ -26,6 +26,7 @@ PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: true
+ReflowComments: false
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: false
Standard: Cpp11