diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-05-23 23:53:17 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-05-23 23:53:17 +0000 |
commit | f664a24aa363ac3825a2ae50da74b2fa4a27f0bd (patch) | |
tree | 01b9a4c104780904180072a73de503123ac5dd35 /clang/lib/Sema/SemaLookup.cpp | |
parent | 7bf95b964fb7c0e3e8ae0f71c79ab3e71300e49b (diff) | |
download | bcm5719-llvm-f664a24aa363ac3825a2ae50da74b2fa4a27f0bd.tar.gz bcm5719-llvm-f664a24aa363ac3825a2ae50da74b2fa4a27f0bd.zip |
[Modules] Fix overly conservative assertion for import diagnostic
We currenltly assert when want to diagnose a missing import and the decl
in question is already visible. It turns out that the decl in question
might be visible because another decl from the same module actually made
the module visible in a previous error diagnostic.
Remove the assertion and avoid re-exporting the module if it's already
visible.
rdar://problem/27975402
Differential Revision: https://reviews.llvm.org/D32828
llvm-svn: 303705
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 2852ea41631..48f4a0251f5 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -4933,8 +4933,6 @@ static NamedDecl *getDefinitionToImport(NamedDecl *D) { void Sema::diagnoseMissingImport(SourceLocation Loc, NamedDecl *Decl, MissingImportKind MIK, bool Recover) { - assert(!isVisible(Decl) && "missing import for non-hidden decl?"); - // Suggest importing a module providing the definition of this entity, if // possible. NamedDecl *Def = getDefinitionToImport(Decl); |