Conversation
| void initvar_smartptr() { // #10237 | ||
| Settings s; | ||
| s.libraries.emplace_back("std"); | ||
| // TODO: test shuld probably not pass without library |
There was a problem hiding this comment.
@chrchr-github Please have a look at this. It was added in 9d6e5c2.
There was a problem hiding this comment.
That should probably be LOAD_LIB_2(s.library, "std.cfg"); Since the fix was for a FP, the test is ineffective, but still passes with or without the library
There was a problem hiding this comment.
The changes in that commit check for smart pointers. But without the library it shouldn't know what is a smart pointer.
Let me guess - those are tracked hard-coded in the source instead of using the library.
| void uninitVarInheritClassInit() { | ||
| Settings s; | ||
| s.libraries.emplace_back("vcl"); | ||
| // TODO: test should probably not pass without library |
There was a problem hiding this comment.
Loading a library with the name "vcl" triggers a bit of hard coded handling in cppcheck. That is unfortunate. But I think the code is intentional at least.
There was a problem hiding this comment.
Yes, but the test never triggers that code since it does pass without the library being loaded.
There was a problem hiding this comment.
hmm I believe I wanted to test that there would be no FP. I am confused why you could remove the vcl library and still don't get false positives.
There was a problem hiding this comment.
Please take a look. It doesn't have to be tackled within this PR though.
I only aligned
Settings::libraryandSettings::librarieswhere necessary. That will be improved in #4798.