aboutsummaryrefslogtreecommitdiff
path: root/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
commit36771d910b049cc534841c48ced90772784af446 (patch)
tree1c9caaf3b7d7c6228dc0612b7040eb7a0971d854 /test/FixIt/fixit.cpp
parent03d262baf1e7f819d269807680c73fc50d7d5b69 (diff)
PR7256: Provide a fixit for incorrect destructor declarations
Fix by Ismail Pazarbasi (ismail.pazarbasi@gmail.com), review by Dmitri Gribenko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt/fixit.cpp')
-rw-r--r--test/FixIt/fixit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp
index 253abd0f4e..fca596b715 100644
--- a/test/FixIt/fixit.cpp
+++ b/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"
+ };
+}