forked from OSchip/llvm-project
[clang-rename] skip CXXConversionDecl while searching for NamedDecl
llvm-svn: 276866
This commit is contained in:
parent
9163ca0fc7
commit
5b7f016f41
|
@ -52,8 +52,8 @@ public:
|
|||
// checking if the point lies within the length of the name of the declaration
|
||||
// and the start location is sufficient.
|
||||
bool VisitNamedDecl(const NamedDecl *Decl) {
|
||||
return setResult(Decl, Decl->getLocation(),
|
||||
Decl->getNameAsString().length());
|
||||
return dyn_cast<CXXConversionDecl>(Decl) ? true :
|
||||
setResult(Decl, Decl->getLocation(), Decl->getNameAsString().length());
|
||||
}
|
||||
|
||||
// Expression visitors:
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
// Currently unsupported test.
|
||||
// RUN: cat %s > %t.cpp
|
||||
// FIXME: clang-rename should handle conversions from a class type to another
|
||||
// type.
|
||||
// RUN: clang-rename -offset=143 -new-name=Bar %s -- | FileCheck %s
|
||||
|
||||
class Foo {}; // CHECK: class Bar {};
|
||||
|
||||
class Baz { // CHECK: class Bar {
|
||||
class Baz {
|
||||
operator Foo() const { // CHECK: operator Bar() const {
|
||||
// offset ^
|
||||
Foo foo; // CHECK: Bar foo;
|
||||
return foo;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue