[cfe-commits] r153152 - /cfe/trunk/test/SemaCXX/blocks-1.cpp

John McCall rjmccall at apple.com
Tue Mar 20 17:45:34 PDT 2012


Author: rjmccall
Date: Tue Mar 20 19:45:33 2012
New Revision: 153152

URL: http://llvm.org/viewvc/llvm-project?rev=153152&view=rev
Log:
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.

Modified:
    cfe/trunk/test/SemaCXX/blocks-1.cpp

Modified: cfe/trunk/test/SemaCXX/blocks-1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/blocks-1.cpp?rev=153152&r1=153151&r2=153152&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/blocks-1.cpp (original)
+++ cfe/trunk/test/SemaCXX/blocks-1.cpp Tue Mar 20 19:45:33 2012
@@ -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 @@
     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);
+  };
+}





More information about the cfe-commits mailing list