diff options
| author | Ariel J. Bernal <ariel.j.bernal@intel.com> | 2013-03-27 18:49:31 +0000 |
|---|---|---|
| committer | Ariel J. Bernal <ariel.j.bernal@intel.com> | 2013-03-27 18:49:31 +0000 |
| commit | 3f08aae84f3f6816c119ceecf59eade751132aa3 (patch) | |
| tree | 223afa5a6d0b5e441eece96d5409ef0f0be6fedb /clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp | |
| parent | 38a723830cee87aac2141e5c8435fce4d81406af (diff) | |
| download | bcm5719-llvm-3f08aae84f3f6816c119ceecf59eade751132aa3.tar.gz bcm5719-llvm-3f08aae84f3f6816c119ceecf59eade751132aa3.zip | |
cpp11-migrate segfaults transforming map<string,int>::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
Diffstat (limited to 'clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp')
| -rw-r--r-- | clang-tools-extra/test/cpp11-migrate/UseAuto/iterator.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<int> MapFind; + std::unordered_map<int>::iterator I = MapFind.find("foo"); + // CHECK: auto I = MapFind.find("foo"); + } + return 0; } |

