[PATCH] Fix UseAuto not transforming iterators when non-fully qualified names are used and libc++.
Ariel Bernal
ariel.j.bernal at intel.com
Tue Jul 9 10:29:04 PDT 2013
Guillaume,
Thanks for your comments, I tried using isFromStdNamespace in a different way but I think your suggestion significantly simplifies the matcher. I'll try it and post a new patch.
================
Comment at: test/cpp11-migrate/UseAuto/Inputs/test_std_container.h:117
@@ -116,3 +116,3 @@
} // namespace _1
using _1::CONTAINER;
#endif
----------------
Guillaume Papin wrote:
> This line should be removed. The declarations in an inline namespace are available in its 'outer scope'.
Somehow I miss this one in this patch.
================
Comment at: test/cpp11-migrate/UseAuto/basic_iterator_tests.cpp:23
@@ -22,3 +22,3 @@
// RUN: cpp11-migrate -use-auto %t.cpp -- -DCONTAINER=array \
// RUN: -DUSE_BASE_CLASS_ITERATORS -I %S/Inputs
// RUN: FileCheck -input-file=%t.cpp %s
----------------
Guillaume Papin wrote:
> Since the `-DUSE_INLINE_NAMESPACE` has been fixed I would fix this one as well `-DUSE_BASE_CLASS_ITERATORS=1` .
Sure
================
Comment at: test/cpp11-migrate/UseAuto/basic_iterator_tests.cpp:121
@@ -120,3 +120,3 @@
}
return 0;
----------------
Guillaume Papin wrote:
> I suggest to add this test here:
> ```
> {
> using std::CONTAINER;
> CONTAINER<int> C;
> CONTAINER<int>::iterator I = C.begin();
> // CHECK: auto I = C.begin();
> }
> ```
>
> I may be wrong but I don't think these the tests in this file tested the inline namespace bug (when there is no nested name specifier with 'std').
sure no problem
http://llvm-reviews.chandlerc.com/D1116
More information about the cfe-commits
mailing list