From d3a6b6f1a8e9d8aa2fdc5575597ec8091a4b2d6e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 8 Nov 2017 10:58:04 +0100 Subject: Remove obsolete "lo_warn_unused" workaround Per README.md, Clang 3.4 is the baseline for --enable-compiler-plugins, which is the sole consumer of the "lo_warn_unused" attribute, but Clang 3.4 already supports HAVE_GCC_ATTRIBUTE_WARN_UNUSED. Change-Id: I9654028e24852335e463c73bcb5ece5e5b54d53c --- compilerplugins/clang/check.cxx | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/check.cxx b/compilerplugins/clang/check.cxx index 8a468e48eba4..03d9683a4903 100644 --- a/compilerplugins/clang/check.cxx +++ b/compilerplugins/clang/check.cxx @@ -214,18 +214,6 @@ bool isExtraWarnUnusedType(clang::QualType type) { if (rec == nullptr) { return false; } - if (rec->hasAttrs()) { - // Clang currently has no support for custom attributes, but the - // annotate attribute comes close, so check for - // __attribute__((annotate("lo_warn_unused"))): - for (auto i = rec->specific_attr_begin(), - e = rec->specific_attr_end(); - i != e; ++i) { - if ((*i)->getAnnotation() == "lo_warn_unused") { - return true; - } - } - } auto const tc = TypeCheck(rec); // Check some common non-LO types: if (tc.Class("string").Namespace("std").GlobalNamespace() -- cgit