Correctly classify T{} as an array temporary if T is an array of class type with nontrivial destructor.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@174261 91177308-0d34-0410-b5e6-96231b3b80d8
PR15132: Replace "address expression must be an lvalue or a function
designator" diagnostic with more correct and more human-friendly "cannot take
address of rvalue of type 'T'".

For the case of & &T::f, provide a custom diagnostic, rather than unhelpfully
saying "cannot take address of rvalue of type '<overloaded function type>'".

For the case of &array_temporary, treat it just like a class temporary
(including allowing it as an extension); the existing diagnostic wording
for the class temporary case works fine.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@174262 91177308-0d34-0410-b5e6-96231b3b80d8
libclang: introduce cxstring::{createRef,createDup} for StringRefs

Also migrate all clients from the old API.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@174263 91177308-0d34-0410-b5e6-96231b3b80d8