Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clang-rename: fix renaming of field with implicit initializers
The last check failed as Cla::Cla() was rewritten to Cla::hector(). Reviewers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D20150 llvm-svn: 269161
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
clang-tools-extra/test/clang-rename/CtorInitializerTest.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// RUN: cat %s > %t.cpp | ||
// RUN: clang-rename -offset=162 -new-name=hector %t.cpp -i -- | ||
// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s | ||
class A | ||
{ | ||
}; | ||
|
||
class Cla | ||
{ | ||
A foo; // CHECK: hector; | ||
public: | ||
Cla(); | ||
}; | ||
|
||
Cla::Cla() // CHECK: Cla::Cla() | ||
{ | ||
} | ||
|
||
// Use grep -FUbo 'foo' <file> to get the correct offset of foo when changing | ||
// this file. |