/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef LO_CLANG_SHARED_PLUGINS #include #include #include "clang/AST/Attr.h" #include "clang/Sema/SemaInternal.h" // warn_unused_function #include "plugin.hxx" namespace { class InlineVisible: public loplugin::FilteringPlugin { public: explicit InlineVisible(loplugin::InstantiationData const & data): FilteringPlugin(data) {} void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } bool VisitFunctionDecl(FunctionDecl const * decl); }; bool InlineVisible::VisitFunctionDecl(FunctionDecl const * decl) { if (!ignoreLocation(decl) && decl->isInlineSpecified()) { VisibilityAttr * attr = decl->getAttr(); if (attr != nullptr && attr->getVisibility() == VisibilityAttr::Default) { report( DiagnosticsEngine::Warning, ("Function explicitly declared both inline and " " visibility=default"), decl->getLocation()) << decl->getSourceRange(); } } return true; } loplugin::Plugin::Registration inlinevisible("inlinevisible"); } #endif // LO_CLANG_SHARED_PLUGINS /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ collabora/co-24.04.9'>distro/collabora/co-24.04.9 LibreOffice 界面翻译代码仓库文档基金会
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2019-04-25 14:12:30 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2019-04-25 14:23:26 +0200
commit926f46dde833fdfeacd21a62dacd192b7ed1412c (patch)
treed0c78e83c4c72b24e610ff658c216f2af8c08050
parent46a65ed74391c4b44de7cc244d63bd603b6485a5 (diff)
update translations for master
and force-fix errors using pocheck Change-Id: I04522500fe14e0d09925b196ccf7b7f94f3bfe64