Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighting in IDE is not updated on edit #35

Open
firewave opened this issue Apr 16, 2020 · 4 comments
Open

Highlighting in IDE is not updated on edit #35

firewave opened this issue Apr 16, 2020 · 4 comments

Comments

@firewave
Copy link
Collaborator

firewave commented Apr 16, 2020

Environment

  • Operating System (e.g. Ubuntu 16.04 x64): Windows 10 Version 1909
  • IDE Version (e.g. CLion 2016.3.2): CLion 2020.1
  • Cppcheck executable version (cppcheck --version): 1.90
  • Cppcheck plugin version: 1.4.2

Expected behaviour

When editing the code the Cppcheck highlighting should update accordingly.

Actual behaviour

The highlight is not correct until the file has been closed and opened again.

Steps to reproduce the behaviour

#include <string>

template<typename T>
void f(T t) {
	(void)t;
}

class A
{
private:
	std::string s_{"str"};
};

static void f2(A a)
{
	(void)a;
}

int main()
{
	A a;
	//f<const A>(a); // un-comment for warning template function f()
	f2(a);

    return 0;
}

If you un-comment that line it should show a warning in the template function, but no error is shown. If you close the file and open it again the warning will be shown. Same when you comment it the warning doesn't go away.

@johnthagen
Copy link
Owner

What Cppcheck options are you using?

@johnthagen
Copy link
Owner

In general, when I test uncommenting code, annotations seem to update correctly.

@firewave
Copy link
Collaborator Author

This appears to be an issue in CLion. The shown problems never change from the initial state when the file was opened. I filed a ticket with CLion - see https://youtrack.jetbrains.com/issue/CPP-22882

@firewave
Copy link
Collaborator Author

Apparently not an upstream issue but a implementation one related to #65.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants