]> granicus.if.org Git - clang/commit
Fix a leak in the generated code for attributes with strings.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 13 Feb 2016 18:11:49 +0000 (18:11 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 13 Feb 2016 18:11:49 +0000 (18:11 +0000)
commitc563475a9f0565b56fb97ab7c6f7ea96eac34ad2
treec6d49a5d15ad90e1124290bbfdcdc85c8b604a40
parent074fcba8b65a4ae988b1cb2fad7285fc3727620f
Fix a leak in the generated code for attributes with strings.

Storing std::strings in attributes simply doesn't work, we never call
the destructor. Use an array of StringRefs instead of std::strings and
copy the data into memory taken from the ASTContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260831 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclAttr.cpp
utils/TableGen/ClangAttrEmitter.cpp