Bug 363540 - detaching-member false positive if non-const reference is stored
Summary: detaching-member false positive if non-const reference is stored
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-26 10:52 UTC by Nyall Dawson
Modified: 2016-07-09 11:11 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nyall Dawson 2016-05-26 10:52:01 UTC
The detaching-member test incorrectly flags the following code:

my_class &obj = list[index];
obj.someNonConstMember( 5 );
obj.someOtherNonConstMember( 10 );

Ideally the test would detect that the returned value is being stored in a non-const reference and not throw the warning.

Reproducible: Always
Comment 1 Sergio Martins 2016-05-26 14:56:21 UTC
can you attach a compilable test-case ?

thanks
Comment 2 Sergio Martins 2016-06-25 12:20:37 UTC
ping ? I can't reproduce this