From eba5189f9a81a3360dc5a27f82a03cc555fa8ee7 Mon Sep 17 00:00:00 2001 From: "Ariel J. Bernal" Date: Fri, 17 May 2013 15:30:17 +0000 Subject: 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 --- clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h') 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. -- cgit v1.2.3