summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/cpp11-migrate
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/cpp11-migrate')
-rw-r--r--clang-tools-extra/test/cpp11-migrate/AddOverride/basic.cpp4
-rw-r--r--clang-tools-extra/test/cpp11-migrate/AddOverride/comment_before_inline_body_fail.cpp25
2 files changed, 4 insertions, 25 deletions
diff --git a/clang-tools-extra/test/cpp11-migrate/AddOverride/basic.cpp b/clang-tools-extra/test/cpp11-migrate/AddOverride/basic.cpp
index 1c1c95d8146..4bc471015df 100644
--- a/clang-tools-extra/test/cpp11-migrate/AddOverride/basic.cpp
+++ b/clang-tools-extra/test/cpp11-migrate/AddOverride/basic.cpp
@@ -57,8 +57,12 @@ public:
class G : public A {
public:
void h() const; // comment
+ void i() // comment
+ {}
// CHECK: class G
// CHECK: void h() const override; // comment
+ // CHECK: void i() override // comment
+ // CHECK-NEXT: {}
};
// Test that override is placed correctly if there is an inline body.
diff --git a/clang-tools-extra/test/cpp11-migrate/AddOverride/comment_before_inline_body_fail.cpp b/clang-tools-extra/test/cpp11-migrate/AddOverride/comment_before_inline_body_fail.cpp
deleted file mode 100644
index 57c2ab0453f..00000000000
--- a/clang-tools-extra/test/cpp11-migrate/AddOverride/comment_before_inline_body_fail.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
-// RUN: cpp11-migrate -add-override %t.cpp -- -I %S
-// RUN: FileCheck -input-file=%t.cpp %s
-// XFAIL: *
-
-class A {
-public:
- virtual void h() const;
- // CHECK: virtual void h() const;
-};
-
-// Test that the override is correctly placed if there
-// is an inline comment between the function declaration
-// and the function body.
-// This test fails with the override keyword being added
-// to the end of the comment. This failure occurs because
-// the insertion point is incorrectly calculated if there
-// is an inline comment before the method body.
-class B : public A {
-public:
- virtual void h() const // comment
- { }
- // CHECK: virtual void h() const override
-};
-
OpenPOWER on IntegriCloud