Repository navigation
Fix #14325 add originalTypeName to library ValueType-s - #8028
olabetskyi wants to merge 2 commits into
Conversation
| type = ValueType::Type::INT; | ||
| else | ||
| type = ValueType::Type::UNKNOWN_INT; | ||
| originalTypeName = typestr; |
There was a problem hiding this comment.
originalTypeName is already assigned above.
originalTypeName = "size_t";
I'm not sure there might be a reason to remove "std::". if we have some code that uses originalTypeName ..
|
| else | ||
| type = ValueType::Type::UNKNOWN_INT; | ||
| sign = (podtype->sign == 'u') ? ValueType::UNSIGNED : ValueType::SIGNED; | ||
| if (originalTypeName.empty()) |
There was a problem hiding this comment.
I don't remember the exact context but can't typestr be something like "int". can it contain qualifiers and stars?
| "[test.cpp:3]: (warning) %Lf in format string (no. 6) requires 'long double' but the argument type is 'signed int'.\n", | ||
| "void foo() { printf(\"%d %ld %u %lu %f %Lf\", bar().i, bar().i, bar().i, bar().i, bar().i, bar().i); }", | ||
| dinit(CheckOptions, $.portability = true)); | ||
| ASSERT_EQUALS("[test.cpp:3]: (portability) %ld in format string (no. 2) requires 'long' but the argument type is 'int32_t {aka signed int}'.\n" |
There was a problem hiding this comment.
hmm.. this looks very unfortunate. If the type is wrong i.e. long/int then I would prefer "warning". Or if we see that there is UB I would even prefer "error".
How difficult is it to keep writing warnings?
|
Test results for commit 06df4cf (tools/test-my-pr.py, main compared to this PR): Test: http://ec2-16-170-140-253.eu-north-1.compute.amazonaws.com/pr-8028/ Posted automatically by the cppcheck PR test runner. +N: warnings only with this PR, -N: warnings only with main. The AI review is written by Claude and can be wrong. |
|
This pull request has merge conflicts that must be resolved. |



No description provided.