Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator Clang Code Model problems collection

Qt Creator Clang Code Model problems collection

Scheduled Pinned Locked Moved Qt Creator and other tools
qt creatorclang
36 Posts 17 Posters 18.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A.A.SEZENA Offline
    A.A.SEZENA Offline
    A.A.SEZEN
    wrote on last edited by
    #23

    probably
    https://forum.qt.io/topic/107332/undeclared-i̇dentifier-ve-auto-complete-problemi/2
    too.

    1 Reply Last reply
    1
    • R Offline
      R Offline
      rsacchettini
      wrote on last edited by
      #24

      Hitting a similar issue in Qtcreatorv4.11.0 on linux x64 ubuntu18 lts with CMAKE and gcc or clang btw, the symbols parsing i.e. finding functions or type definitions does not work :

      1. does not work at all if not starting qtCreator in the actual CMAKE project source directory
      2. Always stops working regardless after a few minutes to about 1hours, requires a restart of Qtcreator after which it usually works again.

      Make me hate trying to convince my colleagues to migrate from Eclipse to QtCreator, I was always telling them how much more usable and snappy QtCreator is but a bug like this is not a small bug and not a good look to my colleagues currently trying it.

      Regards

      aha_1980A 1 Reply Last reply
      1
      • R rsacchettini

        Hitting a similar issue in Qtcreatorv4.11.0 on linux x64 ubuntu18 lts with CMAKE and gcc or clang btw, the symbols parsing i.e. finding functions or type definitions does not work :

        1. does not work at all if not starting qtCreator in the actual CMAKE project source directory
        2. Always stops working regardless after a few minutes to about 1hours, requires a restart of Qtcreator after which it usually works again.

        Make me hate trying to convince my colleagues to migrate from Eclipse to QtCreator, I was always telling them how much more usable and snappy QtCreator is but a bug like this is not a small bug and not a good look to my colleagues currently trying it.

        Regards

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by aha_1980
        #25

        Hi @rsacchettini,

        Clang is a double-sided sword. If it works, it gives you fantastic insight in your code - but if not, you often have no idea why.

        I'd recommend you nevertheless to start an own discussion topic here, we might be able to help you get it at least running. Can you at least work on a small example project?

        Also note that the CMake integration is in flow currently, so there might be regressions in .0 releases. You might want to try the last stable or the next snapshot release.

        Regards

        Edit: Ah, you alread did: https://forum.qt.io/topic/111067/symbols-parsing-and-finding-stops-working-qtcreator-v4-11-0-cmake-on-linux-x64

        Qt has to stay free or it will die.

        1 Reply Last reply
        1
        • N Offline
          N Offline
          Neil9
          wrote on last edited by
          #26

          When I just typed a few code in a c++ project,I got an error in the editor which was " no member named 'uint64_t' in namespace 'std' ".The code are listed here:

          #include <iostream>
          #include <cstdint>
          using std::uint64_t
          

          I didn't think it was the code made the issue.And I didn't know how to fix it until I found this topic.Actually,I solved the problem just by disabling Clang. It was really useful.

          1 Reply Last reply
          0
          • 0 Offline
            0 Offline
            0...-5
            wrote on last edited by 0...-5
            #27

            I have upgraded QtCreator to version 6. When I opened my project session clangd run out of memory and crashed my system. Sometimes it just crashes QtCreator:

            [12437.692439] Out of memory: Killed process 56361 (clangd.main) total-vm: 1033980kb, anon-ess: 564302kb, shmem-rss: 0kb, UID: 1000, pgtables: 1360kb, oom_score_adj: 0
            
            1 Reply Last reply
            0
            • B Offline
              B Offline
              Bollywoodcellebrite
              Banned
              wrote on last edited by
              #28
              This post is deleted!
              1 Reply Last reply
              0
              • M Offline
                M Offline
                maxim2511
                wrote on last edited by
                #29

                Helo, I have also this same problem with clang. I like this plugin, because it shows me future errors before I will compile program, but I noticed issue with NO auto completion in brackets, I want to autocomplete overloaded function in child class, but this is not working, and then I need spend time to open base class and copy all inputs from virtual function.
                Turn it of plugin, helps fixing that issue, but now I cant use clang compilation warnings.
                I do not need turn of auto closing brackets to autocomplete inputs in side brackets. Only clang code model is somehow blocking autocompletion. Maybe another plugin is colliding with clang and maybe finding another plugin will fix that issue, and will allow to use again clang?

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  Joe McGuchan
                  wrote on last edited by
                  #30

                  Commenting to say that I had an issue that the above change also fixed.

                  I was receiving a repeated warning "definition of builtin function __cpuid", being caused by a file that I discovered was in clang, even though my project was meant to compile in msvc.

                  Thank you!

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    RangerQT
                    wrote on last edited by
                    #31

                    On Qt 6.4.x with Qt Creator 9.0.1 I'm seeing the slow as molasses response to keystrokes even with the ClangCodeModel disabled (I did restart but still no improvement. It's almost unusable as an editor since it is several - like five or six keystrokes behind and this on a pretty beefy machine.

                    MehrshadM 1 Reply Last reply
                    0
                    • MehrshadM Mehrshad referenced this topic on
                    • R RangerQT

                      On Qt 6.4.x with Qt Creator 9.0.1 I'm seeing the slow as molasses response to keystrokes even with the ClangCodeModel disabled (I did restart but still no improvement. It's almost unusable as an editor since it is several - like five or six keystrokes behind and this on a pretty beefy machine.

                      MehrshadM Offline
                      MehrshadM Offline
                      Mehrshad
                      wrote on last edited by
                      #32

                      @aha_1980 Still the same problem in mid 2023, but only when using CMake. Why is that?

                      1 Reply Last reply
                      0
                      • O Offline
                        O Offline
                        Omar Hatem
                        wrote on last edited by
                        #33

                        I am using qt-creator latest version (12.0.0) on ubuntu 20.0.4 LTS.
                        when using the default c++ code model and uncheck use clangd, I noticed that semantic issues and errors are not detected!
                        I must build the project to see the errors.
                        Any ideas how to fix the problem??

                        MehrshadM 1 Reply Last reply
                        0
                        • O Omar Hatem

                          I am using qt-creator latest version (12.0.0) on ubuntu 20.0.4 LTS.
                          when using the default c++ code model and uncheck use clangd, I noticed that semantic issues and errors are not detected!
                          I must build the project to see the errors.
                          Any ideas how to fix the problem??

                          MehrshadM Offline
                          MehrshadM Offline
                          Mehrshad
                          wrote on last edited by
                          #34

                          @Omar-Hatem, what build system are you using and which version?

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Serwus
                            wrote on last edited by
                            #35

                            This topic seems related, so I have a question. How can I disable adding automatic space in angle brackets so this:

                            object->findChild<QObject *>("abc");
                            

                            Would look like this:

                            object->findChild<QObject*>("abc");
                            

                            It's making me crazy, I couldn't find option for that anywhere.

                            1 Reply Last reply
                            0
                            • andrA Offline
                              andrA Offline
                              andr
                              wrote on last edited by
                              #36

                              could we please "unpin" this thread? quite a few things mentioned here are not relevant anymore, and the prominent place has a tendency to end up as a dumping ground for not-so-related issues.

                              1 Reply Last reply
                              0
                              • PedroP Pedro unpinned this topic on

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved