From b365387f0db0bde0ae26d88549eaa042b9926b9c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh <orgad.shaneh@audiocodes.com> Date: Fri, 5 Jun 2015 17:07:37 +0300 Subject: [PATCH] C++: Add some debug output for specialization choosing Change-Id: I13082288a56f6f7fe58c69f01824c56294ca258d Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> --- src/libs/cplusplus/LookupContext.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index 2afe046ac0f..f2d9f0a3e8e 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); -- GitLab