compilerplugins/clang/check.cxx | 12 ------------ include/sal/types.h | 2 -- 2 files changed, 14 deletions(-)
New commits: commit d3a6b6f1a8e9d8aa2fdc5575597ec8091a4b2d6e Author: Stephan Bergmann <[email protected]> Date: Wed Nov 8 10:58:04 2017 +0100 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 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<clang::AnnotateAttr>(), - e = rec->specific_attr_end<clang::AnnotateAttr>(); - 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() diff --git a/include/sal/types.h b/include/sal/types.h index 90ebae5560da..d1f5dbeec507 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -602,8 +602,6 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { #if HAVE_GCC_ATTRIBUTE_WARN_UNUSED #define SAL_WARN_UNUSED __attribute__((warn_unused)) -#elif defined __clang__ -#define SAL_WARN_UNUSED __attribute__((annotate("lo_warn_unused"))) #else #define SAL_WARN_UNUSED #endif _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
