aboutsummaryrefslogtreecommitdiff
path: root/clang/test
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-03-17 16:39:03 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-03-17 16:39:03 +0000
commitb94c7d80406550b273c9630c3a0fd4f63d593c79 (patch)
tree14aaaa159f88ff5695b2081f649ad890b6136a2d /clang/test
parent15af0667d070b7bd5808825ad02343f7e519d436 (diff)
downloadllvm-b94c7d80406550b273c9630c3a0fd4f63d593c79.zip
llvm-b94c7d80406550b273c9630c3a0fd4f63d593c79.tar.gz
llvm-b94c7d80406550b273c9630c3a0fd4f63d593c79.tar.bz2
Merging r200954:
------------------------------------------------------------------------ r200954 | richard-llvm | 2014-02-06 15:35:16 -0800 (Thu, 06 Feb 2014) | 9 lines Temporary fix for PR18473: Don't try to evaluate the initializer for a type-dependent variable, even if the initializer isn't value-dependent. This happens for ParenListExprs composed of non-value-dependent subexpressions, for instance. We should really give ParenListExprs (and InitListExprs) the type of the initialized entity if they're used to represent a dependent initialization (and if so, set them to be type-, value- and instantiation-dependent). llvm-svn: 204050
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/lambda-expressions.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/lambda-expressions.cpp b/clang/test/SemaCXX/lambda-expressions.cpp
index e290424..65f4856 100644
--- a/clang/test/SemaCXX/lambda-expressions.cpp
+++ b/clang/test/SemaCXX/lambda-expressions.cpp
@@ -282,4 +282,19 @@ namespace lambdas_in_NSDMIs {
};
L l;
}
-} \ No newline at end of file
+}
+
+namespace PR18473 {
+ template<typename T> void f() {
+ T t(0);
+ (void) [=]{ int n = t; }; // expected-error {{deleted}}
+ }
+
+ template void f<int>();
+ struct NoCopy {
+ NoCopy(int);
+ NoCopy(const NoCopy &) = delete; // expected-note {{deleted}}
+ operator int() const;
+ };
+ template void f<NoCopy>(); // expected-note {{instantiation}}
+}