diff options
| author | John McCall <rjmccall@apple.com> | 2012-03-21 00:45:33 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2012-03-21 00:45:33 +0000 |
| commit | f21bfcf805327f0be6ef31a08e244a23bebe3071 (patch) | |
| tree | c9ff82d5f2ce73d156aa2f1a4c3cc27d05dc4896 /clang | |
| parent | 69a76e98fe8215de8f33cecbbd081eaacb105d0e (diff) | |
| download | bcm5719-llvm-f21bfcf805327f0be6ef31a08e244a23bebe3071.tar.gz bcm5719-llvm-f21bfcf805327f0be6ef31a08e244a23bebe3071.zip | |
Test case for rdar://problem/11055105, a bug with the instantiation
of references to function template parameters in noexcept clauses when
the instantiation is forced from a point during parsing when a block
is in scope.
llvm-svn: 153152
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/SemaCXX/blocks-1.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/blocks-1.cpp b/clang/test/SemaCXX/blocks-1.cpp index 29de1e666ad..1b1509482af 100644 --- a/clang/test/SemaCXX/blocks-1.cpp +++ b/clang/test/SemaCXX/blocks-1.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks +// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks -std=c++11 extern "C" int exit(int); @@ -43,3 +43,16 @@ namespace rdar8134521 { P = (int(^)(int))((void*)1); } } + +namespace rdar11055105 { + struct A { + void foo(); + }; + + template <class T> void foo(T &x) noexcept(noexcept(x.foo())); + + void (^block)() = ^{ + A a; + foo(a); + }; +} |

