[cfe-commits] r55417 - in /cfe/trunk: include/clang/AST/ASTContext.h include/clang/AST/Type.h include/clang/Basic/DiagnosticKinds.def include/clang/Basic/LangOptions.h include/clang/Parse/DeclSpec.h lib/AST/ASTContext.cpp lib/AST/Type.cpp lib/AST

Chris Lattner clattner at apple.com
Wed Aug 27 22:57:03 PDT 2008


On Aug 27, 2008, at 10:53 PM, Eli Friedman wrote:

> On Wed, Aug 27, 2008 at 10:47 PM, Chris Lattner <clattner at apple.com>  
> wrote:
>>
>> On Aug 27, 2008, at 9:52 PM, Eli Friedman wrote:
>>
>>> On Wed, Aug 27, 2008 at 8:41 PM, Chris Lattner  
>>> <clattner at apple.com> wrote:
>>>>
>>>> On Aug 27, 2008, at 6:30 PM, Eli Friedman wrote:
>>>>
>>>>> On Wed, Aug 27, 2008 at 9:04 AM, Steve Naroff  
>>>>> <snaroff at apple.com> wrote:
>>>>>>
>>>>>> +      if (DeclType.Cls.TypeQuals)
>>>>>> +        Diag(D.getIdentifierLoc(),
>>>>>> diag::err_qualified_block_pointer_type);
>>>>
>>>> the only thing a block pointer can point to is a function.   
>>>> Functions
>>>> can't
>>>> be volatile, restrict etc.
>>>
>>> Right.
>>>
>>>> The pointer itself can of course
>>>
>>> Which is why the diagnostic is bogus.
>>
>>
>> This:
>> typedef int F();
>> F^ volatile P;
>>
>> passes 'clang -parse-noop' just fine,
>
> Of course it does; -parse-noop doesn't call into Sema.

Heh ok, fair enough.  I get this assertion with fsyntax only right  
now, not enough is in:

/Users/sabre/llvm/tools/clang/lib/Sema/../../include/clang/Parse/ 
DeclSpec.h:479: failed assertion `0 && "Unknown declarator kind!"'

The intention is that this rejects qualifiers on the function, not on  
the pointer.

-Chris



More information about the cfe-commits mailing list