From 10463c3a8bc8aea47f6524622dc85acb73a7d0bc Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 19 Apr 2019 23:02:30 +0000 Subject: Modules: Search for a visible definition of the decl context when computing visibility of a default template parameter The code is/was already correct for the case where a parameter is a parameter of its enclosing lexical DeclContext (functions and classes). But for other templates (alias and variable templates) they don't create their own scope to be members of - in those cases, they parameter should be considered visible if any definition of the lexical decl context is visible. [this should cleanup the failure on the libstdc++ modules buildbot] [this doesn't actually fix the variable template case for a secondary/compounding reason (its lexical decl context is incorrectly considered to be the translation unit)] Test covers all 4 kinds of templates with default args, including a regression test for the still broken variable template case. Reviewers: rsmith Differential Revision: https://reviews.llvm.org/D60892 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358795 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Modules/Inputs/nested-template-default-arg-redecl/func1.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/Modules/Inputs/nested-template-default-arg-redecl/func1.h (limited to 'test/Modules/Inputs/nested-template-default-arg-redecl/func1.h') diff --git a/test/Modules/Inputs/nested-template-default-arg-redecl/func1.h b/test/Modules/Inputs/nested-template-default-arg-redecl/func1.h new file mode 100644 index 0000000000..940d76726b --- /dev/null +++ b/test/Modules/Inputs/nested-template-default-arg-redecl/func1.h @@ -0,0 +1 @@ +#include "func.h" -- cgit v1.2.3