Changeset View
Changeset View
Standalone View
Standalone View
language/duchain/declarationid.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | 119 | }else{ | |||
---|---|---|---|---|---|
123 | for(; decl; ++decl) { | 123 | for(; decl; ++decl) { | ||
124 | const IndexedDeclaration& iDecl(*decl); | 124 | const IndexedDeclaration& iDecl(*decl); | ||
125 | 125 | | |||
126 | ///@todo think this over once we don't pull in all imported top-context any more | 126 | ///@todo think this over once we don't pull in all imported top-context any more | ||
127 | //Don't trigger loading of top-contexts from here, it will create a lot of problems | 127 | //Don't trigger loading of top-contexts from here, it will create a lot of problems | ||
128 | if((!DUChain::self()->isInMemory(iDecl.topContextIndex()))) | 128 | if((!DUChain::self()->isInMemory(iDecl.topContextIndex()))) | ||
129 | continue; | 129 | continue; | ||
130 | 130 | | |||
131 | if(!top) { | | |||
132 | Declaration* decl = iDecl.data(); | 131 | Declaration* decl = iDecl.data(); | ||
133 | if(decl && m_indirectData.additionalIdentity == decl->additionalIdentity()) { | 132 | if(decl && m_indirectData.additionalIdentity == decl->additionalIdentity()) { | ||
134 | //Hit | 133 | //Hit | ||
135 | ret.append(decl); | 134 | ret.append(decl); | ||
136 | } | 135 | } | ||
137 | } | 136 | } | ||
138 | } | 137 | } | ||
139 | } | | |||
140 | }else{ | 138 | }else{ | ||
141 | Declaration* decl = m_directData.declaration(); | 139 | Declaration* decl = m_directData.declaration(); | ||
142 | if(decl) | 140 | if(decl) | ||
143 | ret.append(decl); | 141 | ret.append(decl); | ||
144 | } | 142 | } | ||
145 | 143 | | |||
146 | if(!ret.isEmpty() && m_specialization.index()) { | 144 | if(!ret.isEmpty() && m_specialization.index()) { | ||
147 | KDevVarLengthArray<Declaration*> newRet; | 145 | KDevVarLengthArray<Declaration*> newRet; | ||
Show All 35 Lines | 177 | }else{ | |||
183 | for(; decl; ++decl) { | 181 | for(; decl; ++decl) { | ||
184 | const IndexedDeclaration& iDecl(*decl); | 182 | const IndexedDeclaration& iDecl(*decl); | ||
185 | 183 | | |||
186 | ///@todo think this over once we don't pull in all imported top-context any more | 184 | ///@todo think this over once we don't pull in all imported top-context any more | ||
187 | //Don't trigger loading of top-contexts from here, it will create a lot of problems | 185 | //Don't trigger loading of top-contexts from here, it will create a lot of problems | ||
188 | if((!DUChain::self()->isInMemory(iDecl.topContextIndex()))) | 186 | if((!DUChain::self()->isInMemory(iDecl.topContextIndex()))) | ||
189 | continue; | 187 | continue; | ||
190 | 188 | | |||
191 | if(!top) { | | |||
192 | Declaration* decl = iDecl.data(); | 189 | Declaration* decl = iDecl.data(); | ||
193 | if(decl && m_indirectData.additionalIdentity == decl->additionalIdentity()) { | 190 | if(decl && m_indirectData.additionalIdentity == decl->additionalIdentity()) { | ||
194 | //Hit | 191 | //Hit | ||
195 | ret = decl; | 192 | ret = decl; | ||
196 | if(!ret->isForwardDeclaration()) | 193 | if(!ret->isForwardDeclaration()) | ||
197 | break; | 194 | break; | ||
198 | } | 195 | } | ||
199 | } | 196 | } | ||
200 | } | 197 | } | ||
201 | } | | |||
202 | }else{ | 198 | }else{ | ||
203 | //Find the declaration by m_topContext and m_declaration | 199 | //Find the declaration by m_topContext and m_declaration | ||
204 | ret = m_directData.declaration(); | 200 | ret = m_directData.declaration(); | ||
205 | } | 201 | } | ||
206 | 202 | | |||
207 | 203 | | |||
208 | if(ret) | 204 | if(ret) | ||
209 | { | 205 | { | ||
Show All 36 Lines |