Bug 300347 - show uses of a constructor does not show variable instantiations
Summary: show uses of a constructor does not show variable instantiations
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 4.3.60
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: 4.6.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-20 10:10 UTC by Jaime Torres
Modified: 2013-12-17 13:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaime Torres 2012-05-20 10:10:26 UTC
In libktorrent, there is a constructor DBItem() at dht/database.h which is called in
 DBItem item;
at dht/dhtpeersource.cpp at DHTPeerSource::onDataReady()

but this is not shown in DBItem() show usage.


Reproducible: Always

Steps to Reproduce:
1. open libktorrent from extragear/network
2.go to dht/database.h and look for DBItem() usage
3.No variable declaration, that calls the default constructor, is shown.



I know there is a work-around, just using the find in files function.
Comment 1 Kevin Funk 2013-12-05 17:38:11 UTC
Indeed.

Interesting:
class Foo
{
  Foo() {}
};

int main()
{
    Foo foo1;     <--- is not a use of Foo()
    Foo foo1();   <--- *is* a use of Foo()
}
Comment 2 Kevin Funk 2013-12-17 13:59:14 UTC
Git commit d3ee9744d4317efa72aaf33a8dad10ed888f8fb2 by Kevin Funk.
Committed on 10/12/2013 at 21:28.
Pushed by kfunk into branch 'master'.

Show uses for default-initialization

Before this patch, declarations such as '{ A a; }' didn't increase the
use-count of 'A::A()'
REVIEW: 114397

M  +14   -7    languages/cpp/cppduchain/expressionvisitor.cpp
M  +20   -5    languages/cpp/cppduchain/tests/test_duchain.cpp

http://commits.kde.org/kdevelop/d3ee9744d4317efa72aaf33a8dad10ed888f8fb2