summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/nested-template-default-arg-redecl.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2019-04-19 23:04:05 +0000
committerDavid Blaikie <dblaikie@gmail.com>2019-04-19 23:04:05 +0000
commit07489f9ccf4acb87f43e4f154f92ebd36e2d66d3 (patch)
treeffdf177e6f77ba9f93c2c4e821272a8edf77529a /clang/test/Modules/nested-template-default-arg-redecl.cpp
parentaa3bf6ce721dc9531f52b84e93b6ad182517561b (diff)
downloadbcm5719-llvm-07489f9ccf4acb87f43e4f154f92ebd36e2d66d3.tar.gz
bcm5719-llvm-07489f9ccf4acb87f43e4f154f92ebd36e2d66d3.zip
Modules: Adopt template parameters for variable templates to set their decl context correctly
Exposed by a related bug about visibility of default arguments of nested templates - without the correct decl context, default template parameters of variable templates nested in classes would have incorrect visibility computed. llvm-svn: 358796
Diffstat (limited to 'clang/test/Modules/nested-template-default-arg-redecl.cpp')
-rw-r--r--clang/test/Modules/nested-template-default-arg-redecl.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/test/Modules/nested-template-default-arg-redecl.cpp b/clang/test/Modules/nested-template-default-arg-redecl.cpp
index 3baa2022625..55568f8711d 100644
--- a/clang/test/Modules/nested-template-default-arg-redecl.cpp
+++ b/clang/test/Modules/nested-template-default-arg-redecl.cpp
@@ -1,18 +1,16 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
// RUN: -I %S/Inputs/nested-template-default-arg-redecl -std=c++14 \
-// RUN: -fmodules-local-submodule-visibility -verify %s
+// RUN: -fmodules-local-submodule-visibility -w -verify %s
+
+// expected-no-diagnostics
+
#include "alias2.h"
#include "var2.h"
#include "strct2.h"
#include "func2.h"
-// FIXME: Variable templates lexical decl context appears to be the translation
-// unit, which is incorrect. Fixing this will hopefully address the following
-// error/bug:
-
-// expected-note@Inputs/nested-template-default-arg-redecl/var.h:4 {{default argument declared here}}
-auto var = &var_outer::var<>; // expected-error {{default argument of 'var' must be imported from module 'VAR1' before it is required}}
+auto var = &var_outer::var<>;
auto func = &func_outer::func<>;
strct_outer::strct<> *strct;
alias_outer::alias<> *alias;
OpenPOWER on IntegriCloud