[objcmt] Fix a buffer overflow crash than can occur while modernizing enums.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 15 Jul 2016 19:22:34 +0000 (19:22 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 15 Jul 2016 19:22:34 +0000 (19:22 +0000)
commit88737a5aa5cca893b47206cd048fa781fa3fc4d7
tree851cbadcee48f73d071d799811e5b05543e8f0cb
parent7f6484448121dc82f8080b0c95a675a2317ca32c
[objcmt] Fix a buffer overflow crash than can occur while modernizing enums.

Note that due to the nature of the crash it requires libgmalloc or asan for it to crash consistently.

rdar://19932927

llvm-svn: 275600
clang/lib/ARCMigrate/ObjCMT.cpp
clang/test/ARCMT/objcmt-ns-enum-crash.m [new file with mode: 0644]
clang/test/ARCMT/objcmt-ns-enum-crash.m.result [new file with mode: 0644]
clang/test/ARCMT/objcmt-ns-macros.m.result