]> granicus.if.org Git - clang/commit
[UB] When attaching empty strings to the AST, use an empty StringRef
authorChandler Carruth <chandlerc@gmail.com>
Tue, 4 Aug 2015 03:52:58 +0000 (03:52 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 4 Aug 2015 03:52:58 +0000 (03:52 +0000)
commit9bf6d3458b05900ba9836e92b17081c7e0f01230
treed2689ec6d81b9794cece4b111f98ff0894e7c215
parent9bf4b5f6264515fde32523af77dbea5557b1ec7a
[UB] When attaching empty strings to the AST, use an empty StringRef
rather than forcing the bump pointer allocator to produce a viable
pointer. This also fixes UB when we would try to memcpy from the null
incoming StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243947 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Stmt.cpp