Revert "Call VisitRedeclarable before VisitDeclContext to avoid any recursion that might occur."

This reverts commit 1d1d8fd511a4ec621a92628462142cb8d9356b70.
This commit is contained in:
Axel Naumann 2017-02-10 08:30:08 +01:00 committed by sftnight
parent 71187acfba
commit 7bcbdf120b
3 changed files with 6 additions and 21 deletions

View File

@ -557,8 +557,8 @@ bool DeclUnloader::VisitRedeclarable(clang::Redeclarable<T>* R, DeclContext* DC)
// We start with the decl context first, because parameters are part of the
// DeclContext and when trying to remove them we need the full redecl chain
// still in place.
bool Successful = VisitRedeclarable(FD, FD->getDeclContext());
Successful &= VisitDeclContext(FD);
bool Successful = VisitDeclContext(FD);
Successful &= VisitRedeclarable(FD, FD->getDeclContext());
Successful &= VisitDeclaratorDecl(FD);
// Template instantiation of templated function first creates a canonical
@ -711,8 +711,8 @@ bool DeclUnloader::VisitRedeclarable(clang::Redeclarable<T>* R, DeclContext* DC)
bool DeclUnloader::VisitNamespaceDecl(NamespaceDecl* NSD) {
// NamespaceDecl: NamedDecl, DeclContext, Redeclarable
bool Successful = VisitRedeclarable(NSD, NSD->getDeclContext());
Successful &= VisitDeclContext(NSD);
bool Successful = VisitDeclContext(NSD);
Successful &= VisitRedeclarable(NSD, NSD->getDeclContext());
Successful &= VisitNamedDecl(NSD);
return Successful;
@ -809,8 +809,8 @@ bool DeclUnloader::VisitRedeclarable(clang::Redeclarable<T>* R, DeclContext* DC)
bool DeclUnloader::VisitTagDecl(TagDecl* TD) {
// TagDecl: TypeDecl, DeclContext, Redeclarable
bool Successful = VisitRedeclarable(TD, TD->getDeclContext());
Successful &= VisitDeclContext(TD);
bool Successful = VisitDeclContext(TD);
Successful &= VisitRedeclarable(TD, TD->getDeclContext());
Successful &= VisitTypeDecl(TD);
return Successful;
}

View File

@ -22,12 +22,6 @@ void bestFriend();
.compareState "NF"
//CHECK-NOT: Differences
#include "FriendRecursive.h"
.undo
.compareState "NF"
//CHECK-NOT: Differences
// STL has many of these in memory & stdexcept
//#include <memory>
//.undo

View File

@ -1,9 +0,0 @@
class TestA {
friend class TestB;
void empty() {}
};
class TestB {
friend class TestA;
void empty() {}
};