Bug 401745 - auto value incorrectly deduced to int from unsinged int
Summary: auto value incorrectly deduced to int from unsinged int
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-04 18:23 UTC by Martin Flöser
Modified: 2023-02-18 03:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
CMakeList.txt (52 bytes, text/plain)
2018-12-04 18:23 UTC, Martin Flöser
Details
main.cpp (271 bytes, text/x-c++src)
2018-12-04 18:24 UTC, Martin Flöser
Details
Screenshot highlighting the difference (127.92 KB, image/png)
2018-12-04 18:24 UTC, Martin Flöser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Flöser 2018-12-04 18:23:54 UTC
Created attachment 116674 [details]
CMakeList.txt

Please consider the following example code:

#include <iostream>
#include <limits>
#include <boost/type_index.hpp>

using boost::typeindex::type_id_with_cvr;

int main()

{
    const auto value = std::numeric_limits<unsigned int>::max();
    std::cout << type_id_with_cvr<decltype(value)>().pretty_name() << '\n';
}

Hovering value gives "const int value", but running the application gives: "unsigned int const" as debug output.

Attached is a screenshot illustrating the difference, cpp and CMakeLists.txt for this issue.
Comment 1 Martin Flöser 2018-12-04 18:24:11 UTC
Created attachment 116675 [details]
main.cpp
Comment 2 Martin Flöser 2018-12-04 18:24:35 UTC
Created attachment 116676 [details]
Screenshot highlighting the difference
Comment 3 Justin Zobel 2023-01-19 00:18:53 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Bug Janitor Service 2023-02-03 05:01:50 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2023-02-18 03:47:46 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!