1. 20 Jul, 2019 1 commit
    • Ben Wagner's avatar
      Add working directory to clang parser. · ad7ea392
      Ben Wagner authored
      This sets the working directory of the clang parser similarly to the way
      the build directory is passed to the builder. This allows the parser to
      correctly resolve any relative paths in the extra build arguments. This
      means relative paths are resolved relative to the build directory (as
      they would be resolved by a builder).
      Test Plan: In the current test setup it doesn't seem the TestProject allows a TestBuildSystemManager, so it seems like quite a bit of work to create a test for this. (As a result I assume IBuildSystemManager integration isn't well tested in general right now.) If this needs a test, let me know if adding a TestBuildSystemManager is the right way to go.
      Reviewers: #kdevelop, aaronpuchert
      Reviewed By: aaronpuchert
      Subscribers: aaronpuchert, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D22197
  2. 04 Jul, 2019 2 commits
  3. 03 Jul, 2019 1 commit
  4. 17 Jun, 2019 1 commit
  5. 16 Jun, 2019 1 commit
  6. 01 May, 2019 1 commit
  7. 14 Apr, 2019 2 commits
    • Milian Wolff's avatar
      Also find clang include path based on runtime libclang library path · bc13f955
      Milian Wolff authored
      My KDevelop was compiled against my system libclang v7.0.1, thus
      KDEV_CLANG_BUILTIN_DIR points to /usr/lib/clang/7.0.1/include. Now
      I compiled clang 8 from sources and put it in a different folder
      in my home path and adapted LD_LIBRARY_PATH to make KDevelop pick it
      up. This then fails to find the builtin include path, since it tries
      to find `/usr/lib/clang/8.0.1/include` which doesn't exit.
      This patch adds another fallback to fix the above scneario: We now
      lookup the path of libclang at runtime through dlfcn.h's dladdr,
      which we pass a libclang function address, here clang_getClangVersion.
      Then on success we deduce the include path by removing the library
      name and then instead appending `clang/$version/include`, which makes
      it use /home/milian/projects/compiled/other/lib/clang/8.0.1/include
      as required.
    • Milian Wolff's avatar
      Simplify setting custom parser args for unit tests · d8119c13
      Milian Wolff authored
      Make it possible to add parser args from a background provider and
      share the test provider implementation.
  8. 19 Mar, 2019 1 commit
  9. 15 Feb, 2019 3 commits
    • Milian Wolff's avatar
      tie DUContext::createNavigationWidget to AbstractNavigationWidget · d9b4c14c
      Milian Wolff authored
      We always return instances of this type anyways, so enforce it in
      the API and simplify the usage code accordingly.
    • Milian Wolff's avatar
      cleanup: remove html prefix/suffix feature from navigation widget · 12e3583f
      Milian Wolff authored
      This was *only* being used by the project file quickopen feature,
      and you only saw it when clicking into the quickopen list, or when
      pressing alt. I doubt anyone ever did that. And it was madness
      anyways: we decreased the font size in a hacky non-html compliant
      way which actually made it quite hard to read for me. So the only
      thing we lose is the project name... which is an acceptable
      tradeoff. This feature messed up the whole API considerably, removing
      it makes me very happy.
      We can bring back the project name in the future by introducing a
      generic wrapper-widget that supports the
    • Milian Wolff's avatar
      Remove dead code: AbstractNavigationContext::fontSize{Prefix,Suffix} · 518e7871
      Milian Wolff authored
      These functions never return any non-null string, so just remove them.
  10. 11 Jan, 2019 1 commit
    • Thomas Schöps's avatar
      Clang plugin: Handle CUDA files better · 71c65a65
      Thomas Schöps authored
      This fixes two issues in how KDevelop's clang plugin handles CUDA files (.cu source files and .cuh headers):
      1) Those file types were not treated as source files, therefore if such a file was modified, it was not passed among the list of modified source files to clang for re-parsing. The re-parsing thus incorrectly used the unmodified file on disk instead. This is addressed by the change to documentfinderhelpers.cpp and kdevclang.xml.
      2) The patch passes the general code parser settings also to CUDA files (change in parsesession.cpp). This is for example important to get flags such as -std=c++11 that are required for correct parsing. However, it is not correct: the build system may use separate options for CUDA files (e.g., CMake's CUDA_NVCC_FLAGS). But it might still be better than the previous behavior of not passing any options except -xcuda, since it might be somewhat likely that it is a reasonable guess.
      Additional comments:
      a) I am not sure whether the change in clanghelpers.cpp is required, but it seems coherent.
      b) I changed the CUDA mime types in kdevclang.xml to inherit from text/x-c++src/hdr instead of text/x-csrc/hdr since the CUDA files can contain C++ code.
      c) This patch is not sufficient to enable proper CUDA support. I'll post to the kdevelop-devel mailing list for that.
      Test Plan: Tested manually.
      Reviewers: #kdevelop, kfunk
      Reviewed By: #kdevelop, kfunk
      Subscribers: kfunk, apol, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D17909
  11. 10 Jan, 2019 1 commit
  12. 09 Jan, 2019 1 commit
  13. 08 Jan, 2019 1 commit
    • Amish Naidu's avatar
      Add assistant to generate header guards · a54c4652
      Amish Naidu authored
      Assistant with two actions allowing you to either add a conventional macro-
      based header guard or pragma-once.
      Test Plan: Run `test_assistants testHeaderGuardAssistant`
      Reviewers: #kdevelop, arrowd
      Reviewed By: arrowd
      Subscribers: apol, arrowd, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D17370
  14. 28 Dec, 2018 1 commit
  15. 20 Nov, 2018 1 commit
  16. 27 Oct, 2018 1 commit
  17. 25 Oct, 2018 1 commit
  18. 05 Oct, 2018 1 commit
    • Kevin Funk's avatar
      clang: Also detect Clang builtin dirs at runtime · ec5477f3
      Kevin Funk authored
      * Add a helper function retrieving the Clang version at runtime
      * Auto-detect bundled copy of Clang builtin headers on Windows
      * Print lots more debug output during startup
      TODO: Wondering if we want to add more code detecting this directory at
      runtime on other platforms, too. But for now, only Windows is
      interesting for us.
      CCBUG: 393779
      Reviewers: kossebau, aaronpuchert, brauch
      Reviewed By: brauch
      Subscribers: brauch, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D15955
  19. 04 Oct, 2018 1 commit
  20. 02 Oct, 2018 1 commit
    • Aaron Puchert's avatar
      Make implicit fallthroughs a compiler error, remove unneeded breaks · 3a2f9a9d
      Aaron Puchert authored
      With -Wimplicit-fallthrough the compiler warns about unannotated
      fallthroughs in switch statements. Since it is supported by both GCC and
      Clang, and can easily be fixed by adding Q_FALLTHROUGH() we enable it as
      As a consequence, we don't need to add redundant break statements as
      safety measure. So we also warn about that, but not as error, especially
      since it's only supported on Clang. (As far as I know.)
      Reviewers: #kdevelop, kossebau, kfunk
      Reviewed By: #kdevelop, kfunk
      Subscribers: mwolff, apol, kfunk, rjvbb, brauch, mssola, kossebau, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D15694
  21. 20 Sep, 2018 1 commit
  22. 10 Sep, 2018 1 commit
  23. 30 Aug, 2018 1 commit
  24. 20 Aug, 2018 2 commits
    • Friedrich W. H. Kossebau's avatar
      Use only const containers in range-loops · c4c11a65
      Friedrich W. H. Kossebau authored
      Powered by (kdev)clazy
    • Michal Srb's avatar
      Add ExplicitlyTyped flag to Declaration. · c0e3d524
      Michal Srb authored
      Explicitly typed declaration has the type writen as part of the declaration. The opposite, implicitly typed declaration, has the type deduced by the compiler.
      E.g. in C++ variable declarations are explicitly typed unless the "auto" keyword is used.
      The intended use is to display inline note with the deduced type next to all implicitly typed declarations.
      Another use, maybe a bit of a stretch; Suggestions on the right side of assignment to an explicitly typed declaration should take the declaration type into consideration, but assignments to implicitly typed declaration should ignore the currently deduced type, since it will change into whatever new type will be assigned into it.
      Test Plan: The plugins/clang/tests/files/variables.cpp was extended to test the basic C++ case.
      Reviewers: brauch
      Reviewed By: brauch
      Subscribers: brauch, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D14838
  25. 18 Aug, 2018 1 commit
  26. 17 Aug, 2018 2 commits
  27. 15 Aug, 2018 3 commits
  28. 13 Aug, 2018 2 commits
    • Michal Srb's avatar
      Store sizeof and friends as numbers instead of comment. · 248e34d1
      Michal Srb authored
      This way they can be used by other plugins, for example to visualize padding
      in structures. They also take a bit less space in duchain in this form.
      It is not longer necessary to exclude them from the json test run, since
      they are not part of the comment.
      The end result is now the same - the values are shown as text in tooltip.
      Test Plan:
      Verify that message similar to "size: 96 Bytes; aligned to: 8 Bytes" is
      shown in tooltip for classes and class members.
      Reviewers: #kdevelop, aaronpuchert
      Reviewed By: #kdevelop, aaronpuchert
      Subscribers: brauch, aaronpuchert, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D14479
    • Friedrich W. H. Kossebau's avatar
  29. 30 Jul, 2018 1 commit
  30. 18 Jul, 2018 1 commit
  31. 07 Jul, 2018 1 commit