diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2017-04-17 20:57:40 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2017-04-17 20:57:40 +0000 |
commit | 4b44baf46b47a7e6addbaed0b4c7c99a5e0647fb (patch) | |
tree | 1c4e09b481791062a5772782ffa8a80fdc25af62 /lib/AST/DeclBase.cpp | |
parent | 9f2031f243b0978a11ffa1a52e4e79a63ee8d52d (diff) | |
download | clang-4b44baf46b47a7e6addbaed0b4c7c99a5e0647fb.tar.gz |
Revert "Address http://bugs.llvm.org/pr30994 so that a non-friend can properly replace a friend, and a visible friend can properly replace an invisible friend but not vice verse, and definitions are not replaced. This fixes the two FIXME in SemaTemplate/friend-template.cpp."
This reverts commit r300443. Breaks compiling libc++ with modules in
some configurations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index ae7444579b..cda70c5edc 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -861,21 +861,6 @@ const FunctionType *Decl::getFunctionType(bool BlocksToo) const { return Ty->getAs<FunctionType>(); } -bool Decl::isThisDeclarationADefinition() const { - if (auto *TD = dyn_cast<TagDecl>(this)) - return TD->isThisDeclarationADefinition(); - if (auto *FD = dyn_cast<FunctionDecl>(this)) - return FD->isThisDeclarationADefinition(); - if (auto *VD = dyn_cast<VarDecl>(this)) - return VD->isThisDeclarationADefinition(); - if (auto *CTD = dyn_cast<ClassTemplateDecl>(this)) - return CTD->isThisDeclarationADefinition(); - if (auto *FTD = dyn_cast<FunctionTemplateDecl>(this)) - return FTD->isThisDeclarationADefinition(); - if (auto *VTD = dyn_cast<VarTemplateDecl>(this)) - return VTD->isThisDeclarationADefinition(); - return false; -} /// Starting at a given context (a Decl or DeclContext), look for a /// code context that is not a closure (a lambda, block, etc.). |