summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/copy-initialization.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-19 00:52:42 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-19 00:52:42 +0000
commit0f3dd9a86bf34ae02f9dece0ff0966a91a2de8bd (patch)
tree581af3becfd099e31770c637ae5ff480f8e6fff6 /clang/test/SemaCXX/copy-initialization.cpp
parent83e3eea5fc8a14bae22a5b5a80fe96b7e6b91e55 (diff)
downloadbcm5719-llvm-0f3dd9a86bf34ae02f9dece0ff0966a91a2de8bd.tar.gz
bcm5719-llvm-0f3dd9a86bf34ae02f9dece0ff0966a91a2de8bd.zip
Provide a proper source location when building an implicit dereference. Fixes PR3600
llvm-svn: 64993
Diffstat (limited to 'clang/test/SemaCXX/copy-initialization.cpp')
-rw-r--r--clang/test/SemaCXX/copy-initialization.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/copy-initialization.cpp b/clang/test/SemaCXX/copy-initialization.cpp
index e380cc1ad3c..a56a886f55d 100644
--- a/clang/test/SemaCXX/copy-initialization.cpp
+++ b/clang/test/SemaCXX/copy-initialization.cpp
@@ -1,5 +1,4 @@
// RUN: clang -fsyntax-only -verify %s
-
class X {
public:
explicit X(const X&);
@@ -15,3 +14,10 @@ void f(Y y, int *ip, float *fp) {
X x3 = ip;
X x4 = fp; // expected-error{{cannot initialize 'x4' with an lvalue of type 'float *'}}
}
+
+struct foo {
+ void bar();
+};
+
+// PR3600
+void test(const foo *P) { P->bar(); } // expected-error{{cannot initialize object parameter of type 'struct foo' with an expression of type 'struct foo const'}}
OpenPOWER on IntegriCloud