From 1d66e366e96d9622bfdbc9a78383033e89a808b4 Mon Sep 17 00:00:00 2001 From: "Ariel J. Bernal" Date: Mon, 27 May 2013 14:30:23 +0000 Subject: Fix UseAuto replacing declaration lists with new expressions UseAuto used to replace declarion lists with new expressons where some variable were not initialized with new. This fix checks that every DeclStmt has a VarDecl with an initializer and it also ensures that all declarations have the same type. Added tests for multiple declarations and for typedefs. llvm-svn: 182736 --- clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 d02a6a71f9d..f2c8f84f262 100644 --- a/clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h +++ b/clang-tools-extra/cpp11-migrate/UseAuto/UseAutoMatchers.h @@ -28,6 +28,6 @@ clang::ast_matchers::StatementMatcher makeIteratorDeclMatcher(); /// \brief Create a matcher that matches variable declarations that are /// initialized by a C++ new expression. -clang::ast_matchers::DeclarationMatcher makeDeclWithNewMatcher(); +clang::ast_matchers::StatementMatcher makeDeclWithNewMatcher(); #endif // LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_USE_AUTO_MATCHERS_H -- cgit v1.2.3