llvm-project/clang-tools-extra/test
Eric Liu ff51f011d1 [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
2016-11-16 16:54:53 +00:00
..
Unit Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 07:01:42 +00:00
change-namespace [change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections 2016-11-16 16:54:53 +00:00
clang-apply-replacements Handle newlines on Windows correctly. 2014-12-09 02:57:56 +00:00
clang-move [clang-move] Support moving function. 2016-11-16 13:05:19 +00:00
clang-query Add a makefile for clang-query. Patch by Alex Horn! 2014-02-18 19:46:01 +00:00
clang-rename [clang-rename] Fix handling of unchanged files 2016-09-17 17:08:47 +00:00
clang-reorder-fields Add clang-reorder-fields to clang-tools-extra 2016-09-02 02:56:07 +00:00
clang-tidy [clang-tidy] New check to prefer transparent functors to non-transparent ones. 2016-11-16 14:42:10 +00:00
include-fixer [include-fixer] Support finding headers for the symbol under cursor. 2016-09-07 16:34:35 +00:00
modularize Fixed some cases in the modularize assistant mode where header file names didn't translate to valid module names. 2016-03-21 23:05:14 +00:00
pp-trace Fix tests to not assume they know exactly what will be in Clang's predefines buffer. 2016-09-30 23:47:58 +00:00
.clang-format Add a .clang-format to avoid reflow of test RUN lines 2013-12-01 05:08:00 +00:00
CMakeLists.txt [clang-move] Make it support both relative and absolute file path arguments. 2016-10-04 09:05:31 +00:00
lit.cfg [find-all-symbols] Add a test to make sure merging actually works. 2016-05-31 12:12:19 +00:00
lit.site.cfg.in Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 07:01:42 +00:00