1. 12 Mar, 2019 1 kayıt (commit)
    • Luboš Luňák's avatar
      make (some) clang plugins share the same RecursiveASTVisitor · adb08e89
      Luboš Luňák yazdı
      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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
      Reviewed-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
      adb08e89
  2. 11 Mar, 2019 1 kayıt (commit)
  3. 06 Tem, 2018 1 kayıt (commit)
    • Michael Stahl's avatar
      compilerplugins: try to make these work with icecream · ff002524
      Michael Stahl yazdı
      There are some problems here, this should fix one of them: the
      getFilename function returns "<stdin>" for spelling locations, because
      the input to clang is sort of preprocessed via -frewrite-includes if
      icecream is used and the file is built on a remote host (whereas it's
      apparently not preprocessed if the file is compiled locally by icecream).
      
      Using getPresumedLoc() uses the #line directives in the preprocessed
      input, which avoids the problem but is more expensive, so try to use it
      only when necessary.
      
      The getFileEntry(getMainFileID())->getName() pattern will also result
      in "<stdin>", but fortunately icecream passes -main-file-name,
      which oddly enough isn't used by the SourceManager's spelling locations,
      but is available separately via CodeGenOptions.
      
      This builds everything successfully with clang version 6.0.0:
      ICECC_PREFERRED_HOST=myremote make check gb_SUPPRESS_TESTS=t
      
      Change-Id: Ic121511683e5302d7b9d85186c8b9c4a5443fa1b
      Reviewed-on: https://gerrit.libreoffice.org/54993
      Tested-by: Jenkins
      Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
      ff002524
  4. 25 Şub, 2018 1 kayıt (commit)
  5. 07 Kas, 2017 1 kayıt (commit)
  6. 11 Eki, 2017 1 kayıt (commit)
  7. 11 Eyl, 2017 1 kayıt (commit)
  8. 05 Eyl, 2017 1 kayıt (commit)
  9. 04 Eyl, 2017 1 kayıt (commit)
    • Stephan Bergmann's avatar
      New loplugin:dyncastvisibility · 595371e5
      Stephan Bergmann yazdı
      ...to find uses of dynamic_cast where the static (base) type has hidden
      visibility while the dynamic (derived) one has default visibility, and which may
      thus fail at least on macOS like happened in
      d5ed3cd6 "Make WinMtfFontStyle's base class
      EMFIO_DLLPUBLIC, too".
      
      libcxxabi's __dynamic_cast takes static_type and dst_type arguments.  Now, if
      dst_type (the derived type, with default visibility) is taken from .so A (and
      thus references the version of the base type info hidden in .so A) but the
      __dynamic_cast call is made from .so B, it passes for static_type the base type
      information hidden in .so B, and __dynamic_cast will consider the cast to fail.
      I'm not sure whether hidden intermediary types (in the hierarchy between the
      dynamic_cast's base and derived types) acutally cause a problem too, but lets
      flag them with the plugin anyway.
      
      The fixes use SAL_DLLPUBLIC_RTTI.  For one, there appear to be no other reasons
      than type visibility to make those classes SAL_DLLPUBLIC.  For another, this
      nicely avoids any actual changes on Windows (where SAL_DLLPUBLIC expands to
      nothing, and many of the affected classes were explicityl introduced into class
      hierarchies as "MSVC hacks").
      
      Change-Id: Ia85a9635cebffb1009a9efc1484b8bd4025585d4
      Reviewed-on: https://gerrit.libreoffice.org/41802Tested-by: 's avatarJenkins <ci@libreoffice.org>
      Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
      595371e5