diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-28 02:22:10 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-28 02:22:10 +0000 |
commit | e6190db8db5939a63521f74e6cde6ad0ebf9a364 (patch) | |
tree | 91e82897a7c73192f6ee3058b11dbc5688b8a0d8 /clang/lib/AST/Decl.cpp | |
parent | 692177e2d68d6506bb80d40a345963d9593748cf (diff) | |
download | bcm5719-llvm-e6190db8db5939a63521f74e6cde6ad0ebf9a364.tar.gz bcm5719-llvm-e6190db8db5939a63521f74e6cde6ad0ebf9a364.zip |
Propagate VisibleNoLinkage down to class members.
Fixes PR16114.
llvm-svn: 182750
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 57eda43a952..089622fb186 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -789,13 +789,14 @@ static LinkageInfo getLVForClassMember(const NamedDecl *D, LinkageInfo classLV = getLVForDecl(cast<RecordDecl>(D->getDeclContext()), classComputation); - if (!isExternalFormalLinkage(classLV.getLinkage())) - return LinkageInfo::none(); - // If the class already has unique-external linkage, we can't improve. if (classLV.getLinkage() == UniqueExternalLinkage) return LinkageInfo::uniqueExternal(); + if (!isExternallyVisible(classLV.getLinkage())) + return LinkageInfo::none(); + + // Otherwise, don't merge in classLV yet, because in certain cases // we need to completely ignore the visibility from it. |