[cfe-commits] r64313 - /cfe/trunk/lib/Sema/SemaTemplate.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Wed Feb 11 12:08:21 PST 2009


Mike Stump wrote:
> On Feb 11, 2009, at 11:00 AM, Douglas Gregor wrote:
>   
>> Ewwwwwwwww. Is there no other way?
>>     
>
> My proposed solution, let's built that file with clang.  :-)
>   
It will take the static analyzer to recognize this :-)

However, your fix may satisfy the compiler, but definitely not the
language lawyers. The iterator is singular, and any use whatsoever
(excluding only overwriting it) is undefined behavior.

I recommend assigning it NewParams->end() as a workaround.

Sebastian



More information about the cfe-commits mailing list