summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-05-07 02:25:43 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-05-07 02:25:43 +0000
commit3d23c42029a8675f388c996fc7e7c1aff5e85f43 (patch)
tree7867dc23443f2c78d542641d80c731461d228975 /clang/lib/Sema/SemaDecl.cpp
parentcf27e1b996f290c4ae186fd9060bf5b36302b3ec (diff)
downloadbcm5719-llvm-3d23c42029a8675f388c996fc7e7c1aff5e85f43.tar.gz
bcm5719-llvm-3d23c42029a8675f388c996fc7e7c1aff5e85f43.zip
If an instantiation of a template is required to be a complete type, check
whether the definition of the template is visible rather than checking whether the instantiated definition happens to be in an imported module. llvm-svn: 208150
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 3ee1577b0ba..0d448e0aa87 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -13177,7 +13177,12 @@ void Sema::ActOnModuleInclude(SourceLocation DirectiveLoc, Module *Mod) {
/*Complain=*/true);
}
-void Sema::createImplicitModuleImport(SourceLocation Loc, Module *Mod) {
+void Sema::createImplicitModuleImportForErrorRecovery(SourceLocation Loc,
+ Module *Mod) {
+ // Bail if we're not allowed to implicitly import a module here.
+ if (isSFINAEContext() || !getLangOpts().ModulesErrorRecovery)
+ return;
+
// Create the implicit import declaration.
TranslationUnitDecl *TU = getASTContext().getTranslationUnitDecl();
ImportDecl *ImportD = ImportDecl::CreateImplicit(getASTContext(), TU,
OpenPOWER on IntegriCloud