QtCreator and ClangCodeModel plugin
I just installed QtCreator 4.7.2
, which comes with ClangCodeModel
plugin by default on. After my CMake
project was parsed I saw much better highlighting of keywords in the code and also awesome intellisense handling of auto
declared variables.
The downside was that the ClangCodeModel
plugin was buggy, and gave me errors and warnings in parts of code that didn't make sense, especially the ones in 3rd party library header files. So I was forced to turn it off.
I'm wondering if Clang
can be configured in QtCreator
, so that minimal checks can happen. I played with these settings, but nothing made a difference:
1) Has anyone been able to configure this plugin in QtCreator
so that it can work better? I am mostly concerned about intellisense. I can open the same CMake
project in Visual Studio
and I have much better intellisense there, but I prefer using Qt Creator.
2) If #1 is not possible because the plugin has bugs, what are the other means of improving intellisense in Qt Creator
with CMake
projects?
c++ qt clang qt-creator llvm-clang
add a comment |
I just installed QtCreator 4.7.2
, which comes with ClangCodeModel
plugin by default on. After my CMake
project was parsed I saw much better highlighting of keywords in the code and also awesome intellisense handling of auto
declared variables.
The downside was that the ClangCodeModel
plugin was buggy, and gave me errors and warnings in parts of code that didn't make sense, especially the ones in 3rd party library header files. So I was forced to turn it off.
I'm wondering if Clang
can be configured in QtCreator
, so that minimal checks can happen. I played with these settings, but nothing made a difference:
1) Has anyone been able to configure this plugin in QtCreator
so that it can work better? I am mostly concerned about intellisense. I can open the same CMake
project in Visual Studio
and I have much better intellisense there, but I prefer using Qt Creator.
2) If #1 is not possible because the plugin has bugs, what are the other means of improving intellisense in Qt Creator
with CMake
projects?
c++ qt clang qt-creator llvm-clang
1
QtCreator 4.8 (currently the beta) comes with support for the language-server-protocol. This might be a good alternative
– Felix
Nov 18 '18 at 0:26
Probably those settings only apply to the visual output in the edit pane. I can see the warnings disappear when I apply "level0 checks" for instance. When I select "almost everything" option they re-appear instantly.
– Frederik De Ruyck
Nov 19 '18 at 16:40
add a comment |
I just installed QtCreator 4.7.2
, which comes with ClangCodeModel
plugin by default on. After my CMake
project was parsed I saw much better highlighting of keywords in the code and also awesome intellisense handling of auto
declared variables.
The downside was that the ClangCodeModel
plugin was buggy, and gave me errors and warnings in parts of code that didn't make sense, especially the ones in 3rd party library header files. So I was forced to turn it off.
I'm wondering if Clang
can be configured in QtCreator
, so that minimal checks can happen. I played with these settings, but nothing made a difference:
1) Has anyone been able to configure this plugin in QtCreator
so that it can work better? I am mostly concerned about intellisense. I can open the same CMake
project in Visual Studio
and I have much better intellisense there, but I prefer using Qt Creator.
2) If #1 is not possible because the plugin has bugs, what are the other means of improving intellisense in Qt Creator
with CMake
projects?
c++ qt clang qt-creator llvm-clang
I just installed QtCreator 4.7.2
, which comes with ClangCodeModel
plugin by default on. After my CMake
project was parsed I saw much better highlighting of keywords in the code and also awesome intellisense handling of auto
declared variables.
The downside was that the ClangCodeModel
plugin was buggy, and gave me errors and warnings in parts of code that didn't make sense, especially the ones in 3rd party library header files. So I was forced to turn it off.
I'm wondering if Clang
can be configured in QtCreator
, so that minimal checks can happen. I played with these settings, but nothing made a difference:
1) Has anyone been able to configure this plugin in QtCreator
so that it can work better? I am mostly concerned about intellisense. I can open the same CMake
project in Visual Studio
and I have much better intellisense there, but I prefer using Qt Creator.
2) If #1 is not possible because the plugin has bugs, what are the other means of improving intellisense in Qt Creator
with CMake
projects?
c++ qt clang qt-creator llvm-clang
c++ qt clang qt-creator llvm-clang
asked Nov 14 '18 at 17:08
armanaliarmanali
1,4351431
1,4351431
1
QtCreator 4.8 (currently the beta) comes with support for the language-server-protocol. This might be a good alternative
– Felix
Nov 18 '18 at 0:26
Probably those settings only apply to the visual output in the edit pane. I can see the warnings disappear when I apply "level0 checks" for instance. When I select "almost everything" option they re-appear instantly.
– Frederik De Ruyck
Nov 19 '18 at 16:40
add a comment |
1
QtCreator 4.8 (currently the beta) comes with support for the language-server-protocol. This might be a good alternative
– Felix
Nov 18 '18 at 0:26
Probably those settings only apply to the visual output in the edit pane. I can see the warnings disappear when I apply "level0 checks" for instance. When I select "almost everything" option they re-appear instantly.
– Frederik De Ruyck
Nov 19 '18 at 16:40
1
1
QtCreator 4.8 (currently the beta) comes with support for the language-server-protocol. This might be a good alternative
– Felix
Nov 18 '18 at 0:26
QtCreator 4.8 (currently the beta) comes with support for the language-server-protocol. This might be a good alternative
– Felix
Nov 18 '18 at 0:26
Probably those settings only apply to the visual output in the edit pane. I can see the warnings disappear when I apply "level0 checks" for instance. When I select "almost everything" option they re-appear instantly.
– Frederik De Ruyck
Nov 19 '18 at 16:40
Probably those settings only apply to the visual output in the edit pane. I can see the warnings disappear when I apply "level0 checks" for instance. When I select "almost everything" option they re-appear instantly.
– Frederik De Ruyck
Nov 19 '18 at 16:40
add a comment |
1 Answer
1
active
oldest
votes
The screenshot you took is from the "Analyzer" settings.
The Analyzer performs on-demand checks like running static analysis, clang-tidy, callgrind, etc.
To configure the Code Model, you should go to "C++ > Code Model":
You also have the possibility to override this settings on a per-project basis:
In both cases you can, by clicking on Manage...
, create your own configuration with whatever flags you want:
I tried it. Still getting the same bugs. Which option should I go with?
– armanali
Nov 26 '18 at 18:37
@armanali I have updated my answer. I am not sure you can have clang ignore 3rd-party headers though. You could also try Qt Creator 4.8, the release candidate was published last week and is available in the Qt Online Installer.
– Benjamin T
Nov 26 '18 at 18:56
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53305428%2fqtcreator-and-clangcodemodel-plugin%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The screenshot you took is from the "Analyzer" settings.
The Analyzer performs on-demand checks like running static analysis, clang-tidy, callgrind, etc.
To configure the Code Model, you should go to "C++ > Code Model":
You also have the possibility to override this settings on a per-project basis:
In both cases you can, by clicking on Manage...
, create your own configuration with whatever flags you want:
I tried it. Still getting the same bugs. Which option should I go with?
– armanali
Nov 26 '18 at 18:37
@armanali I have updated my answer. I am not sure you can have clang ignore 3rd-party headers though. You could also try Qt Creator 4.8, the release candidate was published last week and is available in the Qt Online Installer.
– Benjamin T
Nov 26 '18 at 18:56
add a comment |
The screenshot you took is from the "Analyzer" settings.
The Analyzer performs on-demand checks like running static analysis, clang-tidy, callgrind, etc.
To configure the Code Model, you should go to "C++ > Code Model":
You also have the possibility to override this settings on a per-project basis:
In both cases you can, by clicking on Manage...
, create your own configuration with whatever flags you want:
I tried it. Still getting the same bugs. Which option should I go with?
– armanali
Nov 26 '18 at 18:37
@armanali I have updated my answer. I am not sure you can have clang ignore 3rd-party headers though. You could also try Qt Creator 4.8, the release candidate was published last week and is available in the Qt Online Installer.
– Benjamin T
Nov 26 '18 at 18:56
add a comment |
The screenshot you took is from the "Analyzer" settings.
The Analyzer performs on-demand checks like running static analysis, clang-tidy, callgrind, etc.
To configure the Code Model, you should go to "C++ > Code Model":
You also have the possibility to override this settings on a per-project basis:
In both cases you can, by clicking on Manage...
, create your own configuration with whatever flags you want:
The screenshot you took is from the "Analyzer" settings.
The Analyzer performs on-demand checks like running static analysis, clang-tidy, callgrind, etc.
To configure the Code Model, you should go to "C++ > Code Model":
You also have the possibility to override this settings on a per-project basis:
In both cases you can, by clicking on Manage...
, create your own configuration with whatever flags you want:
edited Nov 26 '18 at 18:56
answered Nov 22 '18 at 11:21
Benjamin TBenjamin T
5,1881127
5,1881127
I tried it. Still getting the same bugs. Which option should I go with?
– armanali
Nov 26 '18 at 18:37
@armanali I have updated my answer. I am not sure you can have clang ignore 3rd-party headers though. You could also try Qt Creator 4.8, the release candidate was published last week and is available in the Qt Online Installer.
– Benjamin T
Nov 26 '18 at 18:56
add a comment |
I tried it. Still getting the same bugs. Which option should I go with?
– armanali
Nov 26 '18 at 18:37
@armanali I have updated my answer. I am not sure you can have clang ignore 3rd-party headers though. You could also try Qt Creator 4.8, the release candidate was published last week and is available in the Qt Online Installer.
– Benjamin T
Nov 26 '18 at 18:56
I tried it. Still getting the same bugs. Which option should I go with?
– armanali
Nov 26 '18 at 18:37
I tried it. Still getting the same bugs. Which option should I go with?
– armanali
Nov 26 '18 at 18:37
@armanali I have updated my answer. I am not sure you can have clang ignore 3rd-party headers though. You could also try Qt Creator 4.8, the release candidate was published last week and is available in the Qt Online Installer.
– Benjamin T
Nov 26 '18 at 18:56
@armanali I have updated my answer. I am not sure you can have clang ignore 3rd-party headers though. You could also try Qt Creator 4.8, the release candidate was published last week and is available in the Qt Online Installer.
– Benjamin T
Nov 26 '18 at 18:56
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53305428%2fqtcreator-and-clangcodemodel-plugin%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
QtCreator 4.8 (currently the beta) comes with support for the language-server-protocol. This might be a good alternative
– Felix
Nov 18 '18 at 0:26
Probably those settings only apply to the visual output in the edit pane. I can see the warnings disappear when I apply "level0 checks" for instance. When I select "almost everything" option they re-appear instantly.
– Frederik De Ruyck
Nov 19 '18 at 16:40