aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/cplusplus/FindUsages.cpp
diff options
context:
space:
mode:
authorEike Ziller <[email protected]>2013-07-09 11:04:59 +0200
committerEike Ziller <[email protected]>2013-07-09 11:04:59 +0200
commit79fbb0db047ff96aa64aefff515e43dee6fd8556 (patch)
treee0d804f01bbf10d160b29562c662b0e339cfb20a /src/libs/cplusplus/FindUsages.cpp
parent0d92b468b73aa2593378b0e531785ea631346e75 (diff)
parent79c8a8fbb0ec98f2497bc2b275c2b0f215314a76 (diff)
Merge remote-tracking branch 'origin/2.8' into HEAD
Conflicts: src/libs/cplusplus/FindUsages.cpp tests/auto/cplusplus/findusages/tst_findusages.cpp tests/auto/debugger/tst_dumpers.cpp Change-Id: I20e2002c7b25cc25d8120922fa9b52e59db498e3
Diffstat (limited to 'src/libs/cplusplus/FindUsages.cpp')
-rw-r--r--src/libs/cplusplus/FindUsages.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libs/cplusplus/FindUsages.cpp b/src/libs/cplusplus/FindUsages.cpp
index a178ad088c8..870c6960288 100644
--- a/src/libs/cplusplus/FindUsages.cpp
+++ b/src/libs/cplusplus/FindUsages.cpp
@@ -233,7 +233,15 @@ bool FindUsages::checkCandidates(const QList<LookupItem> &candidates) const
if (scopeOfTemplEnclosingCandidateSymbol != scopeOfTemplEnclosingDeclSymbol)
return false;
} else if (s->enclosingScope()->isTemplate() && ! _declSymbol->isTypenameArgument()) {
- if (s->enclosingScope()->enclosingScope() != _declSymbol->enclosingScope())
+ if (_declSymbol->enclosingScope()->isTemplate()) {
+ if (s->enclosingScope()->enclosingScope() != _declSymbol->enclosingScope()->enclosingScope())
+ return false;
+ } else {
+ if (s->enclosingScope()->enclosingScope() != _declSymbol->enclosingScope())
+ return false;
+ }
+ } else if (_declSymbol->enclosingScope()->isTemplate() && s->isTemplate()) {
+ if (_declSymbol->enclosingScope()->enclosingScope() != s->enclosingScope())
return false;
} else if (! s->isUsingDeclaration()
&& s->enclosingScope() != _declSymbol->enclosingScope()) {