name lookup has been performed in that context (this probably only happens in C++). 1) Whenever we add names to a context, set a flag on it, and if we perform lookup and discover that the context has had a lookup table built but has the flag set, update all entries in the lookup table with additional names from the external source. 2) When marking a DeclContext as having external visible decls, mark the context in which lookup is performed, not the one we are adding. These won't be the same if we're adding another copy of a pre-existing namespace. llvm-svn: 174577
61 lines
558 B
C++
61 lines
558 B
C++
@import namespaces_top;
|
|
|
|
float &global(float);
|
|
float &global2(float);
|
|
|
|
namespace LookupBeforeImport {
|
|
float &f(float);
|
|
}
|
|
|
|
namespace N1 { }
|
|
|
|
namespace N1 {
|
|
float& f(float);
|
|
}
|
|
|
|
namespace N2 {
|
|
float& f(float);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
namespace N5 {
|
|
int &f(int);
|
|
}
|
|
|
|
namespace N6 {
|
|
int &f(int);
|
|
}
|
|
|
|
namespace N7 {
|
|
int &f(int);
|
|
}
|
|
|
|
namespace N8 {
|
|
int &f(int);
|
|
}
|
|
|
|
namespace N9 {
|
|
int &f(int);
|
|
}
|
|
|
|
namespace N10 {
|
|
int &f(int);
|
|
}
|
|
|
|
namespace N11 {
|
|
namespace {
|
|
class Foo;
|
|
}
|
|
Foo *getFoo();
|
|
}
|
|
|
|
namespace N12 {
|
|
namespace {
|
|
class Foo;
|
|
}
|
|
Foo *getFoo();
|
|
}
|