CLion inspector fails to see that the private constructor is used from outside class. Can it be fixed?
Why CLion, even it's inspector utility, can't see the obvious here, that the constructor Point() can't be used because it's private?
Can this be fixed? It gives me a sense that even the inspector it's not trustworthy! If it can't see so obvious errors, how can I trust it in more complex projects? I am using `Build #CL-243.22562.225, built on December 18, 2024`. Other free IDEs works fine with just this code and detects the issue.
I tried clearing and invalidating caches, whatever.. It can't provide the obvious error and says everything is ok (did not find anything to report). And of course the error is generated in compilation.
In Editor → Inspections I have all checked except the MISRA Static Analysis Tool, which gives a lot of warnings but still fails to detect the error if enabled.
I also have disabled the AI Assistance (trial period has ended).
Do I use somehow wrong the IDE?
Thanks
class Point {
Point(const float x, const float y) : x(x), y(y) {}
public:
float x, y;
};
int main() {
const Point p1(1,2);
const Point p2(3,4);
return 0;
}
Please sign in to leave a comment.
Hello!
Thank you for reporting! I've created RSCPP-36421 about this issue.
As a workaround for now, you can disable CLion Nova by disabling the "Use the ReSharper C++ language engine (CLion Nova)" option in
File | Settings | Advanced Settings
.