...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>
<https://github.com/llvm/llvm-project/commit/ 36036aa70ec1df7b51b5d30b2dd8090ad2b6e783> "Reapply 'Rename/refactor isIntegerConstantExpression to getIntegerConstantExpression'" Change-Id: I99277601fe7ffa3e0e5d22a4b3aaca4f51551ab3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99570 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
<https://github.com/llvm/llvm-project/commit/ 5689b38c6a4220cc5f6ba68a56486229b10071bf> "Removed a RecursiveASTVisitor feature to visit operator kinds with different methods". That change is incompatible in that before the change individual TraverseUnary* and TraverseBin* functions were called, while now TraverseUnaryOperator and TraverseBinaryOperator/TraverseCompoundAssignOperator are called for all the different operators. Fixed that with a few #if for the non-shared plugins, but that doesn't work for the shared plugin. So made the two affected plugins non- shared for now and left a better fix as a TODO. Change-Id: I5b87d329ae2c4c93bf605bb1ecc9641039f014a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99000 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
These are triggered when using llvm-config --cxxflags for building, and sometimes there's -Werror. The warnings were mostly unused variables because of being used only in assert(), or default case in switch that covers all enums (it's better to not handle default to get warning if a case is not handled). Change-Id: I0ecdd1f27390aadf033852b0d1ee0ca424ae3c37 Reviewed-on: https://gerrit.libreoffice.org/80317 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(See the discussion in the comments to <https://gerrit.libreoffice.org/#/c/80317/> "fix various warnings in compilerplugins".) Change-Id: Ia6ba32206ddf44bba9bb5acdd929c0750c48cca9 Reviewed-on: https://gerrit.libreoffice.org/80372 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
...which causes asserts to fire since <https://github.com/llvm/llvm-project/ commit/04323c24a1ac9464471331d9f6499d3cb95d1ccd> "Added an assertion to constant evaluation enty points that prohibits …" Change-Id: Iafbf1cea85d15a38a71275d4cea8303bab500f6a Reviewed-on: https://gerrit.libreoffice.org/72723 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Each plugin currently uses its own recursive AST run, which adds up. This patch adds another shared plugin which internally contains all (suitable) plugins and dispatches to them from the same one recursive run. This patch converts ~25 plugins and for starmath's accessibility.cxx reduces clang build time from 5.43s to 5.14s (and it's 4.39s without any plugins). As there are almost 50 more plugins to go, this can theoretically result in 4.56s final time, although probably not all plugins can be that easily converted, if at all. This mostly requires very little change in many plugins (see e.g. BadStatics), some even work without any functionality change (e.g. CharRightShift). Traverse* calls require some changes but are often not that difficult. WalkUp* probably can't be supported, although some plugins can(?) possibly be adjusted to not rely on them. And of course some plugins can be left as they are, using their own recursive run. See description at the top of generator.cxx for description of how to convert a plugin. The sharedvisitor.cxx source is generated based on scanning relevant plugin sources using a clang-based scanner/generator. The generated source is intentionally included instead of getting always generated, as the generating currently takes some time, so it should get updated in git whenever a change in a plugin triggers a source change in it. Change-Id: Ia0d2e3a5a464659503dbb4ed6c20b6cc89b4de01 Reviewed-on: https://gerrit.libreoffice.org/68026 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Change-Id: I8729db064573ac21dfe6b203c5ae244d79ecc4fe Reviewed-on: https://gerrit.libreoffice.org/66430 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>