summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h
diff options
context:
space:
mode:
authorAriel J. Bernal <ariel.j.bernal@intel.com>2013-05-17 15:30:17 +0000
committerAriel J. Bernal <ariel.j.bernal@intel.com>2013-05-17 15:30:17 +0000
commiteba5189f9a81a3360dc5a27f82a03cc555fa8ee7 (patch)
tree4a7ce2f1abd72372b067830b3cf0efda8e2f88cf /clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h
parentecc2ad1cd4ddd09ae7de9beda6af6095021784c4 (diff)
downloadbcm5719-llvm-eba5189f9a81a3360dc5a27f82a03cc555fa8ee7.tar.gz
bcm5719-llvm-eba5189f9a81a3360dc5a27f82a03cc555fa8ee7.zip
Fix UseAuto replacing variable declaration lists containing non-initialized
variables. UseAuto used to match initialized variable declarations independently of whether they were defined in a declaration list or as a single declaration. Now it matches declaration statements where every variable declaration is initialized. llvm-svn: 182114
Diffstat (limited to 'clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h')
-rw-r--r--clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h b/clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h
index 1f09ad407cd..d02a6a71f9d 100644
--- a/clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h
+++ b/clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h
@@ -17,14 +17,14 @@
#include "clang/ASTMatchers/ASTMatchers.h"
-extern const char *IteratorDeclId;
+extern const char *IteratorDeclStmtId;
extern const char *DeclWithNewId;
extern const char *NewExprId;
-/// \brief Create a matcher that matches variable declarations where the type
-/// is an iterator for an std container and has an explicit initializer of the
-/// same type.
-clang::ast_matchers::DeclarationMatcher makeIteratorDeclMatcher();
+/// \brief Create a matcher that matches declaration staments that have
+/// variable declarations where the type is an iterator for an std container
+/// and has an explicit initializer of the same type.
+clang::ast_matchers::StatementMatcher makeIteratorDeclMatcher();
/// \brief Create a matcher that matches variable declarations that are
/// initialized by a C++ new expression.
OpenPOWER on IntegriCloud