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
Loading
Please register or sign in to comment