summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-05-07 03:54:19 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-05-07 03:54:19 +0000
commitd9ba224f66af76e66352dcabd52a030e382ee235 (patch)
tree2672a07b55bb73c955fe0ae06ba1a4292e7487a1 /clang/lib/Sema/SemaLookup.cpp
parent69a4779965a47ca7ce767a2c28fd8ffc041df77c (diff)
downloadbcm5719-llvm-d9ba224f66af76e66352dcabd52a030e382ee235.tar.gz
bcm5719-llvm-d9ba224f66af76e66352dcabd52a030e382ee235.zip
[modules] Suport for merging a parsed enum definition into an existing imported but not visible definition.
llvm-svn: 236690
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 09424a48d63..012c1cf3927 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//
#include "clang/Sema/Lookup.h"
#include "clang/AST/ASTContext.h"
+#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
@@ -1169,6 +1170,12 @@ static Decl *getInstantiatedFrom(Decl *D, MemberSpecializationInfo *MSInfo) {
return MSInfo->isExplicitSpecialization() ? D : MSInfo->getInstantiatedFrom();
}
+void Sema::makeMergedDefinitionVisible(NamedDecl *ND, SourceLocation Loc) {
+ if (auto *Listener = getASTMutationListener())
+ Listener->RedefinedHiddenDefinition(ND, Loc);
+ ND->setHidden(false);
+}
+
/// \brief Find the module in which the given declaration was defined.
static Module *getDefiningModule(Decl *Entity) {
if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Entity)) {
OpenPOWER on IntegriCloud