[cfe-commits] r168895 - in /cfe/trunk: include/clang/Sema/Initialization.h lib/AST/ASTContext.cpp lib/CodeGen/CGCall.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp test/Sema/merge-decls.c

Douglas Gregor dgregor at apple.com
Fri Jan 4 08:57:03 PST 2013


LGTM.

On Jan 4, 2013, at 8:18 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

> On 4 January 2013 05:34, Enea Zaffanella <zaffanella at cs.unipr.it> wrote:
>> Hello Rafael.
> ...
> 
>> It seems to me that, this way, you are no longer unqualifying the parameter
>> type. As a consequence, I now see the following:
>> 
>> $ cat bug.c
>> void foo1(void*);
>> void foo2(void* const);
>> 
>> void bar() {
>>  foo1(0);
>>  foo2(0);
>> }
>> 
>> In the call foo2(0), the null pointer implicit cast converts to a const
>> qualified scalar rvalue, which should be forbidden; afaict, it should
>> produce the very same cast as for the call foo1(0):
> 
> The attached patch should fix it.
> 
>> Enea.
>> 
> 
> Cheers,
> Rafael
> <t.patch>





More information about the cfe-commits mailing list