diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-06-11 03:05:39 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-06-11 03:05:39 +0000 |
commit | 00be6d0ff86a5328c13f3f88171b26097c8ed664 (patch) | |
tree | d302511800ab41e53edcaf85dbbba82b492e00d0 /clang/lib | |
parent | 9321f926b01bfba21fa2524d916b889f280bae8e (diff) | |
download | bcm5719-llvm-00be6d0ff86a5328c13f3f88171b26097c8ed664.tar.gz bcm5719-llvm-00be6d0ff86a5328c13f3f88171b26097c8ed664.zip |
[modules] Fix a few places where merging wasn't performed if modules was disabled but local module visibilty was enabled.
llvm-svn: 239504
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 7 | ||||
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 1c0eea72dd8..a4a73753383 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1788,7 +1788,7 @@ static void filterNonConflictingPreviousDecls(Sema &S, NamedDecl *decl, LookupResult &previous){ // This is only interesting when modules are enabled. - if (!S.getLangOpts().Modules) + if (!S.getLangOpts().Modules && !S.getLangOpts().ModulesLocalVisibility) return; // Empty sets are uninteresting. @@ -1818,7 +1818,7 @@ static void filterNonConflictingPreviousTypedefDecls(Sema &S, TypedefNameDecl *Decl, LookupResult &Previous) { // This is only interesting when modules are enabled. - if (!S.getLangOpts().Modules) + if (!S.getLangOpts().Modules && !S.getLangOpts().ModulesLocalVisibility) return; // Empty sets are uninteresting. @@ -13488,7 +13488,8 @@ EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, Sema::SkipBodyInfo Sema::shouldSkipAnonEnumBody(Scope *S, IdentifierInfo *II, SourceLocation IILoc) { - if (!getLangOpts().Modules || !getLangOpts().CPlusPlus) + if (!(getLangOpts().Modules || getLangOpts().ModulesLocalVisibility) || + !getLangOpts().CPlusPlus) return SkipBodyInfo(); // We have an anonymous enum definition. Look up the first enumerator to diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 628eb734cdd..5734f3b2ed5 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -5153,7 +5153,7 @@ bool Sema::RequireCompleteType(SourceLocation Loc, QualType T, /// in order to provide a definition of this entity. bool Sema::hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested) { // Easy case: if we don't have modules, all declarations are visible. - if (!getLangOpts().Modules) + if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility) return true; // If this definition was instantiated from a template, map back to the |