================
Comment at: cpp11-migrate/UseAuto/UseAutoMatchers.cpp:175
@@ +174,3 @@
+/// matches "using std::vector" and "using ns::list".
+AST_MATCHER(Decl, isFromStdNamespace) {
+ const DeclContext *D = Node.getDeclContext();
----------------
Edwin Vane wrote:
> This is duplicated from Replace auto_ptr transform. Can we put this in a
> header in Core instead and use it from both transforms?
yes sure
================
Comment at: cpp11-migrate/UseAuto/UseAutoMatchers.cpp:237
@@ -210,3 +236,3 @@
),
hasPrefix(
specifiesNamespace(hasName("std"))
----------------
Edwin Vane wrote:
> Guillaume Papin wrote:
> > I'm not sure if this part is still needed but I don't think it hurts either.
> I'd try removing it and see if tests pass.
no need for this, its covered by isFromStdNamespace. In fact isFromStdNamespace
is more general since hasPrefix is false if std is not specified as part of the
type.
================
Comment at: test/cpp11-migrate/UseAuto/Inputs/test_std_container.h:66
@@ -65,2 +65,3 @@
#if USE_INLINE_NAMESPACE
+inline namespace _1 {
----------------
Edwin Vane wrote:
> I'm tempted to say to just use `#ifdef USE_INLINE_NAMESPACE` so you don't
> need `-D...=1`.
I have no preference but below we have #if USE_BASE_CLASS_ITERATORS so I think
we should use either one or the other.
http://llvm-reviews.chandlerc.com/D1116
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits