[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevelop/languages/cpp/cppduchain
From: David Nolden <david.nolden.kde () art-master ! de>
Date: 2008-02-14 1:52:49
Message-ID: 1202953969.761021.25782.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 774804 by zwabel:
If multiple contexts were found for a class context, give a warning, but at least use \
one.
M +3 -3 contextbuilder.cpp
--- trunk/KDE/kdevelop/languages/cpp/cppduchain/contextbuilder.cpp #774803:774804
@@ -442,15 +442,15 @@
if (m_compilingContexts && node->init_declarator && \
node->init_declarator->declarator && \
node->init_declarator->declarator->id) {
QualifiedIdentifier functionName = \
identifierForName(node->init_declarator->declarator->id); if (functionName.count() \
>= 2) {
- // This is a class function
+ // This is a class function definition
functionName.pop();
DUChainReadLocker lock(DUChain::lock());
QList<DUContext*> classContexts = \
currentContext()->findContexts(DUContext::Class, functionName);
- if (classContexts.count() == 1)
+ if (classContexts.count() != 0)
m_importedParentContexts.append(classContexts.first());
- else if (classContexts.count() > 1) {
+ if (classContexts.count() > 1) {
kWarning(9007) << "Muliple class contexts for" << functionName.toString() << \
"- shouldn't happen!" ; foreach (DUContext* classContext, classContexts) {
kDebug(9007) << "Context" << classContext->scopeIdentifier(true) << \
"range" << classContext->range().textRange() << "in" << classContext->url().str();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic