summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/LookupContext.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2015-06-05 17:07:37 +0300
committerOrgad Shaneh <orgads@gmail.com>2015-06-09 05:37:36 +0000
commitb365387f0db0bde0ae26d88549eaa042b9926b9c (patch)
tree4eefebcc74814d85cd6c539b3d11e268228df103 /src/libs/cplusplus/LookupContext.cpp
parente00aa54f4e1d1e91e6dcac416eb9a3996145735a (diff)
downloadqt-creator-b365387f0db0bde0ae26d88549eaa042b9926b9c.tar.gz
C++: Add some debug output for specialization choosing
Change-Id: I13082288a56f6f7fe58c69f01824c56294ca258d Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Diffstat (limited to 'src/libs/cplusplus/LookupContext.cpp')
-rw-r--r--src/libs/cplusplus/LookupContext.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 2afe046ac0..f2d9f0a3e8 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -1324,10 +1324,14 @@ LookupScopePrivate *LookupScopePrivate::nestedType(const Name *name, LookupScope
// we found full specialization
reference = cit->second;
} else {
- LookupScopePrivate *specializationWithPointer
- = findSpecialization(templId, specializations, origin);
- if (specializationWithPointer)
- reference = specializationWithPointer;
+ if (LookupScopePrivate *specialization =
+ findSpecialization(templId, specializations, origin)) {
+ reference = specialization;
+ if (Q_UNLIKELY(debug)) {
+ Overview oo;
+ qDebug() << "picked specialization" << oo(specialization->_name);
+ }
+ }
}
// let's instantiation be instantiation
nonConstTemplId->setIsSpecialization(false);