summaryrefslogtreecommitdiffstats
path: root/test/FixIt/fixit.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/FixIt/fixit.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/FixIt/fixit.cpp')
-rw-r--r--test/FixIt/fixit.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp
index fca596b..52bbb38 100644
--- a/test/FixIt/fixit.cpp
+++ b/test/FixIt/fixit.cpp
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -pedantic -Wall -Wno-comment -verify -fcxx-exceptions -x c++ %s
-// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -x c++ %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -x c++ %s 2>&1 | FileCheck %s
// RUN: cp %s %t
// RUN: not %clang_cc1 -pedantic -Wall -Wno-comment -fcxx-exceptions -fixit -x c++ %t
// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -Wno-comment -fcxx-exceptions -x c++ %t
@@ -307,3 +307,34 @@ namespace dtor_fixit {
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:6-[[@LINE-1]]:9}:"foo"
};
}
+
+namespace PR5066 {
+ template<typename T> struct X {};
+ X<int *p> x; // expected-error {{type-id cannot have a name}}
+}
+
+namespace PR5898 {
+ class A {
+ public:
+ const char *str();
+ };
+ const char* foo(A &x)
+ {
+ return x.str.(); // expected-error {{unexpected '.' in function call; perhaps remove the '.'?}}
+ }
+ bool bar(A x, const char *y) {
+ return foo->(x) == y; // expected-error {{unexpected '->' in function call; perhaps remove the '->'?}}
+ }
+}
+
+namespace PR15045 {
+ class Cl0 {
+ public:
+ int a;
+ };
+
+ int f() {
+ Cl0 c;
+ return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; maybe you meant to use '.'?}}
+ }
+}
OpenPOWER on IntegriCloud