summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-01-09 01:19:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-01-09 01:19:56 +0000
commit70b13043a2efb561854ebf5145b0d8a91290f901 (patch)
tree94d5d7f495f1f85b113e2f9e49e302550110ed98 /clang/test
parentb5d1a73988b80ca57b5702a10baff1b20d9d4cbc (diff)
downloadbcm5719-llvm-70b13043a2efb561854ebf5145b0d8a91290f901.tar.gz
bcm5719-llvm-70b13043a2efb561854ebf5145b0d8a91290f901.zip
PR22117: Fix a case where we would get confused about which function parameter
we're instantiating, if there's a ParmVarDecl within a FunctionDecl context that is not a parameter of that function. Add some asserts to catch this kind of issue more generally, and fix another bug exposed by those asserts where we were missing a local instantiation scope around substitution of explicitly-specified template arguments. llvm-svn: 225490
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/cxx1y-generic-lambdas.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/cxx1y-generic-lambdas.cpp b/clang/test/SemaCXX/cxx1y-generic-lambdas.cpp
index 395b5803236..90ecf6904e5 100644
--- a/clang/test/SemaCXX/cxx1y-generic-lambdas.cpp
+++ b/clang/test/SemaCXX/cxx1y-generic-lambdas.cpp
@@ -921,4 +921,13 @@ int run2 = x2.fooG3();
namespace pr21684_disambiguate_auto_followed_by_ellipsis_no_id {
int a = [](auto ...) { return 0; }();
-} \ No newline at end of file
+}
+
+namespace PR22117 {
+ int x = [](auto) {
+ return [](auto... run_args) {
+ using T = int(decltype(run_args)...);
+ return 0;
+ };
+ }(0)(0);
+}
OpenPOWER on IntegriCloud