[cfe-commits] r148610 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp lib/Parse/ParseExpr.cpp lib/Sema/AnalysisBasedWarnings.cpp lib/Sema/SemaExpr.cpp test/Sema/i-c-e.c test/Sema/vla-2.c test/SemaCXX/vararg-non-pod.cpp

Eli Friedman eli.friedman at gmail.com
Mon Feb 6 15:34:24 PST 2012


r149930.

-Eli

On Wed, Feb 1, 2012 at 12:19 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> Sorry about the delay; I haven't lost track of this, just haven't had
> a chance to take a look yet.
>
> -Eli
>
> On Wed, Feb 1, 2012 at 9:25 AM, Enea Zaffanella <zaffanella at cs.unipr.it> wrote:
>> Ping.
>>
>> NOTE: fyi, the commit causing regression was detected by svn-bisect.
>>
>> Enea.
>>
>>
>> On 01/28/2012 06:37 PM, Enea Zaffanella wrote:
>>>
>>> On 01/21/2012 02:01 AM, Eli Friedman wrote:
>>>>
>>>> Author: efriedma
>>>> Date: Fri Jan 20 19:01:51 2012
>>>> New Revision: 148610
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=148610&view=rev
>>>> Log:
>>>> Make clang's AST model sizeof and typeof with potentially-evaluated
>>>> operands correctly, similar to what we already do with typeid.
>>>>
>>>>
>>>> Added:
>>>>      cfe/trunk/test/Sema/vla-2.c
>>>> Modified:
>>>>      cfe/trunk/include/clang/Sema/Sema.h
>>>>      cfe/trunk/lib/Parse/ParseDecl.cpp
>>>>      cfe/trunk/lib/Parse/ParseExpr.cpp
>>>>      cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
>>>>      cfe/trunk/lib/Sema/SemaExpr.cpp
>>>>      cfe/trunk/test/Sema/i-c-e.c
>>>>      cfe/trunk/test/SemaCXX/vararg-non-pod.cpp
>>>
>>>
>>>
>>> It seems that this change is causing a spurious parse error on the
>>> following program fragment:
>>>
>>> $ cat bug.c
>>> int foo(int a) {
>>>    return sizeof(*(int(*)[({ goto v; v: a;})]) 0);
>>> }
>>>
>>>
>>> $ clang -fsyntax-only bug.c
>>> bug.c:2:37: error:
>>>        redefinition of label 'v'
>>>    return sizeof(*(int(*)[({ goto v; v: a;})]) 0);
>>>                                      ^
>>> bug.c:2:37: note: previous
>>>        definition is here
>>> 1 error generated.
>>>
>>> Enea.
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>>




More information about the cfe-commits mailing list