From 95d83959d89df84804500798cb98defc75b9b0be Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 10 Jun 2015 20:36:34 +0000 Subject: [modules] Don't allow use of non-visible (inherited) default template arguments. llvm-svn: 239487 --- clang/test/Modules/Inputs/template-default-args/a.h | 2 ++ clang/test/Modules/template-default-args.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'clang/test/Modules') diff --git a/clang/test/Modules/Inputs/template-default-args/a.h b/clang/test/Modules/Inputs/template-default-args/a.h index 3e415358243..be760fe6f1d 100644 --- a/clang/test/Modules/Inputs/template-default-args/a.h +++ b/clang/test/Modules/Inputs/template-default-args/a.h @@ -3,3 +3,5 @@ template struct B {}; template struct C; template struct D; template struct E; +template struct G; +template struct H; diff --git a/clang/test/Modules/template-default-args.cpp b/clang/test/Modules/template-default-args.cpp index 97569f0aa33..99f5c6f0590 100644 --- a/clang/test/Modules/template-default-args.cpp +++ b/clang/test/Modules/template-default-args.cpp @@ -1,13 +1,12 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs/template-default-args -std=c++11 %s -// -// expected-no-diagnostics template struct A; template struct B; template struct C; template struct D; template struct E {}; +template struct H {}; // expected-note {{here}} #include "b.h" @@ -17,6 +16,7 @@ template struct B; template struct C; template struct D {}; template struct F {}; +template struct G {}; // expected-note {{here}} #include "c.h" @@ -26,3 +26,5 @@ extern C<> c; D<> d; E<> e; F<> f; +G<> g; // expected-error {{too few}} +H<> h; // expected-error {{too few}} -- cgit v1.2.3