From 3f08aae84f3f6816c119ceecf59eade751132aa3 Mon Sep 17 00:00:00 2001 From: "Ariel J. Bernal" Date: Wed, 27 Mar 2013 18:49:31 +0000 Subject: cpp11-migrate segfaults transforming map::iterator cpp11-migrate segfaults when -use-auto tries to resolve initializing expression resulting in an expression with cleanups. - Skip expressions with cleanups from the initializer - Added test case Fixes PR15550 llvm-svn: 178167 --- clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp') diff --git a/clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp b/clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp index ec1e5540759..59c2979b32e 100644 --- a/clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp +++ b/clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp @@ -148,5 +148,13 @@ int main(int argc, char **argv) { // CHECK: auto && I2 = Vec.begin(); } + // Passing a string as an argument to introduce a temporary object + // that will create an expression with cleanups. Bugzilla: 15550 + { + std::unordered_map MapFind; + std::unordered_map::iterator I = MapFind.find("foo"); + // CHECK: auto I = MapFind.find("foo"); + } + return 0; } -- cgit v1.2.3