diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2017-06-04 12:53:12 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2017-06-04 12:53:12 +0000 |
commit | 10673c98bd33fd5978835342b10f0e2b9cbe6dfa (patch) | |
tree | 6beab2b1da43264995485e949812b4272d794759 /clang/lib | |
parent | 3bfba2c5692274af73b421b700236e24c97dfa07 (diff) | |
download | bcm5719-llvm-10673c98bd33fd5978835342b10f0e2b9cbe6dfa.tar.gz bcm5719-llvm-10673c98bd33fd5978835342b10f0e2b9cbe6dfa.zip |
Implement isDefined by call to isThisDeclarationADefinition.
Modifies FunctionDecl::isThisDeclarationADefinition so that it covers
all the cases checked by FunctionDecl::isDefined. Implements the latter
method by call to isThisDeclarationADefinition.
This change is a part of the patch D30170.
llvm-svn: 304684
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index a1342f477b6..eeffc50f29e 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -2534,9 +2534,8 @@ bool FunctionDecl::hasTrivialBody() const bool FunctionDecl::isDefined(const FunctionDecl *&Definition) const { for (auto I : redecls()) { - if (I->IsDeleted || I->IsDefaulted || I->Body || I->IsLateTemplateParsed || - I->hasDefiningAttr()) { - Definition = I->IsDeleted ? I->getCanonicalDecl() : I; + if (I->isThisDeclarationADefinition()) { + Definition = I; return true; } } |