summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-06-04 22:27:30 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-06-04 22:27:30 +0000
commiteb3cad53e7e81be2738ef1ab24b101c3a2745e6c (patch)
tree52bcb9d4c5a9e63daf9b42b5f6d698aa72865618 /llvm/lib/CodeGen
parent06caff46c05e407d89306001ea96f1e53cf20b13 (diff)
downloadbcm5719-llvm-eb3cad53e7e81be2738ef1ab24b101c3a2745e6c.tar.gz
bcm5719-llvm-eb3cad53e7e81be2738ef1ab24b101c3a2745e6c.zip
Add a warning for when an array-to-pointer decay is performed on an array
temporary or an array subobject of a class temporary, and the resulting value is used to initialize a pointer which outlives the temporary. Such a pointer is always left dangling after the initialization completes and the array's lifetime ends. In order to detect this situation, this change also adds an LValueClassification of LV_ArrayTemporary for temporaries of array type which aren't subobjects of class temporaries. These occur in C++11 T{...} and GNU C++ (T){...} expressions, when T is an array type. Previously we treated the former as a generic prvalue and the latter as a class temporary. llvm-svn: 157955
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud