summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/fixit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-03-20 17:42:13 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-03-20 17:42:13 +0000
commit5e026f55e9e557d7370a640375407239b0f16e7e (patch)
tree0a96bd6b524581d8ff50d2373964b97158686778 /clang/test/FixIt/fixit.cpp
parent7a84d4f864008ab9eb34d0c659e0ebae56061228 (diff)
downloadbcm5719-llvm-5e026f55e9e557d7370a640375407239b0f16e7e.tar.gz
bcm5719-llvm-5e026f55e9e557d7370a640375407239b0f16e7e.zip
PR7256: Provide a fixit for incorrect destructor declarations
Fix by Ismail Pazarbasi (ismail.pazarbasi@gmail.com), review by Dmitri Gribenko. llvm-svn: 177546
Diffstat (limited to 'clang/test/FixIt/fixit.cpp')
-rw-r--r--clang/test/FixIt/fixit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/FixIt/fixit.cpp b/clang/test/FixIt/fixit.cpp
index 253abd0f4e8..fca596b715d 100644
--- a/clang/test/FixIt/fixit.cpp
+++ b/clang/test/FixIt/fixit.cpp
@@ -1,4 +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: 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
@@ -299,3 +300,10 @@ class foo {
}
int i();
};
+
+namespace dtor_fixit {
+ class foo {
+ ~bar() { } // expected-error {{expected the class name after '~' to name a destructor}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:6-[[@LINE-1]]:9}:"foo"
+ };
+}
OpenPOWER on IntegriCloud