summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-08 15:15:54 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-08 15:15:54 +0100
commite62b087fce09b8ce4bc33f2c7820130e4d72937b (patch)
treebe4ce47bd4db9f6e883c8a62268b2b762194e0b1 /compilerplugins
parent74564900e73e7d9ffc7acabe047ae151c3e02abf (diff)
Drop HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL
For one, loplugin:unusedvariablecheck does not merely check for unused variables with types from the standard library since fe2164949b38a7f73883dbdcb3271b94e5c81744 "teach unusedvariablecheck plugin about SfxPoolItem subclasses", so disabling loplugin:unusedvariablecheck based on HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL is wrong. For another, I have seen no standard library implementation that decorates its types with such "warn-if-unused" attributes, and <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0600r0.pdf> "[[nodiscard]] in the Library" (which proposes to add the corresponding C++17 attribute to just a few select functions and no types at all) makes it appear unlikely that will happen. Change-Id: I0a7759e1caf3e3137057c9689080948a4d6747e0
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/unusedvariablecheck.cxx7
1 files changed, 0 insertions, 7 deletions
diff --git a/compilerplugins/clang/unusedvariablecheck.cxx b/compilerplugins/clang/unusedvariablecheck.cxx
index 57b78cca5a69..32b7cd966940 100644
--- a/compilerplugins/clang/unusedvariablecheck.cxx
+++ b/compilerplugins/clang/unusedvariablecheck.cxx
@@ -11,11 +11,6 @@
#include <config_global.h>
-// If there is support for warn_unused attribute even in STL classes, then there's
-// no point in having this check enabled, otherwise keep it at least for STL
-// (LO classes won't get duplicated warnings, as the attribute is different).
-#if !HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL
-
#include "compat.hxx"
#include "check.hxx"
#include "unusedvariablecheck.hxx"
@@ -81,6 +76,4 @@ static Plugin::Registration< UnusedVariableCheck > X( "unusedvariablecheck" );
} // namespace
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */