[cfe-commits] r157955 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/Basic/DiagnosticSemaKinds.td lib/AST/ExprClassification.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp test/SemaCXX/address-of-temporary.cpp

Richard Smith richard at metafoo.co.uk
Tue Jun 5 15:22:02 PDT 2012


PR12677 is a much more general interprocedural static analyzer check for
lifetime issues. This check is much more specific (looking only for
temporary-array-to-pointer decay) but as a result it can efficiently be
performed as a normal compiler warning.

On Tue, Jun 5, 2012 at 1:32 AM, Gabor Greif <gabor at mac.com> wrote:

> Hi Richard,
>
> how does this relate to http://llvm.org/bugs/show_bug.**cgi?id=12677<http://llvm.org/bugs/show_bug.cgi?id=12677>
> ?
>
> Thanks,
>
>        Gabor
>
>  Author: rsmith
>> Date: Mon Jun  4 17:27:30 2012
>> New Revision: 157955
>>
>> URL: http://llvm.org/viewvc/llvm-**project?rev=157955&view=rev<http://llvm.org/viewvc/llvm-project?rev=157955&view=rev>
>> Log:
>> 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.
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120605/59dd29b1/attachment.html>


More information about the cfe-commits mailing list