diff options
author | Eric Liu <ioeric@google.com> | 2016-11-16 16:54:53 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2016-11-16 16:54:53 +0000 |
commit | ff51f011d1edb2de79a2448f68e9de1788596184 (patch) | |
tree | f81c6e2696885fbd785e66cde1abcd61a2a981a1 /lldb/unittests/ScriptInterpreter/Python | |
parent | 3a83e76811d7d8b8a4bfd45943dbd89cb08ee522 (diff) | |
download | llvm-ff51f011d1edb2de79a2448f68e9de1788596184.zip llvm-ff51f011d1edb2de79a2448f68e9de1788596184.tar.gz llvm-ff51f011d1edb2de79a2448f68e9de1788596184.tar.bz2 |
[change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections
Summary:
namespace nx { namespace ny { class Base { public: Base(i) {}} } }
namespace na {
namespace nb {
class X : public nx::ny {
public:
X() : Base::Base(1) {}
};
}
}
When changing from na::nb to x::y, "Base::Base" will be changed to "nx::ny::Base" and
"Base::" in "Base::Base" will be replaced with "nx::ny::Base" too, which causes
conflict. This conflict should've been detected when adding replacements but was hidden by `addOrMergeReplacement`. We now also detect conflict when adding replacements where conflict must not happen.
The namespace lookup is tricky here, we simply replace "Base::Base()" with "nx::ny::Base()" as a workaround, which compiles but not perfect.
Reviewers: hokein
Subscribers: bkramer, cfe-commits
Differential Revision: https://reviews.llvm.org/D26637
llvm-svn: 287118
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions