/external/poppler/

1'>distro/cib/libreoffice-6-1 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/pluginhandler.cxx
AgeCommit message (Collapse)Author
2024-01-21Adapt compilerplugins to Clang 18 trunk isPure -> isPureVirtual renameStephan Bergmann
...<https://github.com/llvm/llvm-project/commit/e90e43fb9cd1d305f7196cd526aa503374e0f616> "[Clang][NFC] Rename CXXMethodDecl::isPure -> is VirtualPure" Change-Id: I27b7cd40c84c71804bef396d0bff4ee2683cb3af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162345 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-18-Werror,-Wdeprecated-declarationsStephan Bergmann
> compilerplugins/clang/casttovoid.cxx:452:18: error: 'endswith' is deprecated: Use ends_with instead [-Werror,-Wdeprecated-declarations] > .endswith(".h")); > ^~~~~~~~ > ends_with > ~/llvm/inst/include/llvm/ADT/StringRef.h:276:19: note: 'endswith' has been explicitly marked deprecated here > [[nodiscard]] LLVM_DEPRECATED( > ^ etc. after <https://github.com/llvm/llvm-project/commit/5ac12951b4e9bbfcc5791282d0961ec2b65575e9> "[ADT] Deprecate StringRef::{starts,ends}with (#75491)" on Clang 18 trunk, where <https://github.com/llvm/llvm-project/commit/1b97645e56bf321b06d1353024339958b64fd242> "[ADT] Introduce StringRef::{starts,ends}_width{,_insensitive}" had been added towards Clang 16 Change-Id: Icb3e43b7d6be6f877815285913d846f766eddebf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160919 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-11-Werror,-Wdeprecated-declarationsStephan Bergmann
> compilerplugins/clang/pluginhandler.cxx:67:71: error: 'getName' is deprecated: Use FileEntryRef::getName() instead. [-Werror,-Wdeprecated-declarations] > 67 | compiler.getASTContext().getSourceManager().getMainFileID())->getName()); > | ^ > ~/llvm/inst/include/clang/Basic/FileEntry.h:331:3: note: 'getName' has been explicitly marked deprecated here > 331 | LLVM_DEPRECATED("Use FileEntryRef::getName() instead.", "") > | ^ > ~/llvm/inst/include/llvm/Support/Compiler.h:155:50: note: expanded from macro 'LLVM_DEPRECATED' > 155 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX))) > | ^ > compilerplugins/clang/pluginhandler.cxx:355:35: error: 'getName' is deprecated: Use FileEntryRef::getName() instead. [-Werror,-Wdeprecated-declarations] > 355 | StringRef const name = e->getName(); > | ^ > ~/llvm/inst/include/clang/Basic/FileEntry.h:331:3: note: 'getName' has been explicitly marked deprecated here > 331 | LLVM_DEPRECATED("Use FileEntryRef::getName() instead.", "") > | ^ > ~/llvm/inst/include/llvm/Support/Compiler.h:155:50: note: expanded from macro 'LLVM_DEPRECATED' > 155 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX))) > | ^ since <https://github.com/llvm/llvm-project/commit/d1f86c3d03b7549eb0153c62550ef0f513ff50e8> "[clang] NFC: Deprecate `FileEntry::getName()` (#68157)" on LLVM 18 trunk. (clang::SourceManager::getFileEntryRefForID exists since <https://github.com/llvm/llvm-project/commit/4dc5573acc0d2e7c59d8bac2543eb25cb4b32984> "Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations" towards Clang 10, even when it changed its return type from Optional<FileEntryRef> to OptionalFileEntryRef along the way.) Change-Id: Ie37ba20c18f5ec33bab9ca2a96a9bcf722558c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160561 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2022-11-06-Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): compilerpluginsStephan Bergmann
Change-Id: I9a4d20cd42d6c836aa74837688a272f849d9d373 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142322 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-16Fix typoAndrea Gelmini
Change-Id: I9b29e51e550ea9f13497e1f46cf4cdc11cf8faa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135925 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-14better solution for ignoreLocation for tree-wide pluginsNoel Grandin
Change-Id: I7336003e038781d4ef50380fa49f66b5ff19379f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-17Bump compiler plugins Clang baseline to 12.0.1Stephan Bergmann
...as discussed in the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2020-November/086234.html> "Bump --enable-compiler-plugins Clang baseline?" (and now picked up again at <https://lists.freedesktop.org/archives/libreoffice/2022-February/088459.html> "Re: Bump --enable-compiler-plugins Clang baseline?"), and clean up compilerplugins/clang/ accordingly Change-Id: I5e81c6fdcc363aeefd6227606225b526fdf7ac16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129989 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-22Adapt compilerplugins to llvm::sys::fs::OF_None renameStephan Bergmann
...from F_None, which happened with <https://github.com/llvm/llvm-project/commit/1f67a3cba9b09636c56e2109d8a35ae96dc15782> "[FileSystem] Split up the OpenFlags enumeration" towards LLVM 7, originally leaving the alternative F_None spelling in for compatibility, but which was finally removed now with <https://github.com/llvm/llvm-project/commit/3302af9d4c39642bebe64dd60a3aa162fefc44b2> "Support: Remove F_{None,Text,Append} compatibility synonyms, NFC". Change-Id: Iea1192b5ee351c13ea5d6701887f3aba62133c20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117609 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-09do not #error in clangplugins with --disable-pchLuboš Luňák
I missed that -building-pch-with-obj is checked by configure (and used) only if PCHs are used. So remove the error checking and hope that it gets checked whenever somebody does changes related to the flag. Change-Id: Ibdf991169f023dae48dad0dd2929215fb048d57d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113841 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-09make clang plugin check code in headers only once if in PCHLuboš Luňák
When using Clang PCHs, we know for certain that the content of a PCH will be used once by the PCH's dedicated source file. So it is not necessary to let clang plugin check locations coming from a PCH every time, but just once when compiling that dedicated source. For starmath's parse.cxx this reduces compilation time 0.94s->0.4s (0.1s when not using plugins at all), for sc's document.cxx it is 5.9s->5.0s (4.0s without plugins). For reference, without PCHs the numbers are (with/without plugins) 2.1s/1.9s for parse.cxx and 11.2s/10.3s for document.cxx. Change-Id: Ie39787e65d7951187941dcff4899d053da63cbdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113817 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-02-03significantly reduce build time of sharedvisitor.cxxLuboš Luňák
In the sharedvisitor.cxx mode all plugins need just one shared RecursiveASTVisitor template instance, but as long as they use another instance each as the base class, Clang still instantiates those templates and then spends a lot of time optimizing each of them, even though they should never get used. So when compiling using sharedvisitor.cxx simply use dummy base classes that do not do anything. As an additional check they abort() if any of the functions get called, this needed removing vclwidgets and unusedmember from shared plugins, because they call TraverseStmt(), maybe this can get handled somehow later. Change-Id: Ic5a350da2c3ba31521f71077b1776b1ee8f06dea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87561 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-29make our clang plugin visible in -ftime-trace outputLuboš Luňák
Change-Id: Id9363d8db729883d0f72eb9fcbf6d8bf5b396414 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87662 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-29Adapt to "[ADT] Make StringRef's std::string conversion operator explicit"Stephan Bergmann
...<https://github.com/llvm/llvm-project/commit/ 777180a32b61070a10dd330b4f038bf24e916af1>. This is just a quick fix to get copmilerplugins buiding again with latest LLVM/Clang trunk. Ideally, we should get rid of as many of those (potentially expensive) conversions from llvm::StringRef to std::string as possible. Change-Id: I18e185e0022a06fd8e3b983a3c4f80e1f3b96746 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87682 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-05New loplugin:unusedmemberStephan Bergmann
* See comment at head of compilerplugins/clang/unusedmember.cxx for description. * Moved isAllRelevantCodeDefined from loplugin:fakebool to PluginHandler for reuse. (Made it a member function so that it can reuse its two RecordCompleteMap instances across different loplugins. Probably safer lifecycle-wise to have them as PluginHandler members than to have them as static local variables in function isAllRelevantCodeDefined.) * Need Plugin::ignoreLocation overload for TypeLoc now, thanks to UnusedMember::VisitElaboratedTypeLoc. * UETT_PreferredAlignOf was split off UETT_AlignOf with <https://github.com/ llvm/llvm-project/commit/6822bd79ac43f267613f1615bf60407103e24dba> "PR26547: alignof should return ABI alignment, not preferred alignment". * RecursiveASTVisitor::TraverseAlignedAttr traverses into the attribute's argument only since <https://github.com/llvm/llvm-project/commit/ f26d551387f032e05e5e6551605b150f38c3f5b2> "Do not look through pack expansions when looking for unexpanded parameter packs". Change-Id: Ic2702b03d4567fa2533333766de7920f3c524a69 Reviewed-on: https://gerrit.libreoffice.org/84416 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>