зеркало из https://github.com/microsoft/clang-1.git
[AST] VarDecl::hasDefinition() - Early exit if we find a strong definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152166 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
60d302a707
Коммит
047da195ae
|
@ -1313,8 +1313,11 @@ VarDecl::DefinitionKind VarDecl::hasDefinition() const {
|
|||
|
||||
const VarDecl *First = getFirstDeclaration();
|
||||
for (redecl_iterator I = First->redecls_begin(), E = First->redecls_end();
|
||||
I != E; ++I)
|
||||
I != E; ++I) {
|
||||
Kind = std::max(Kind, (*I)->isThisDeclarationADefinition());
|
||||
if (Kind == Definition)
|
||||
break;
|
||||
}
|
||||
|
||||
return Kind;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче