[cfe-commits] r67313 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/function-redecl.c
Douglas Gregor
dgregor at apple.com
Mon Mar 23 09:28:09 PDT 2009
On Mar 20, 2009, at 5:22 PM, Eli Friedman wrote:
> 2009/3/19 Douglas Gregor <dgregor at apple.com>:
>> - bool HasPrototype =
>> + bool HasPrototype =
>> getLangOptions().CPlusPlus ||
>> - (D.getNumTypeObjects() &&
>> D.getTypeObject(0).Fun.hasPrototype);
>> + (D.getNumTypeObjects() &&
>> D.getTypeObject(0).Fun.hasPrototype) ||
>> + !isa<FunctionType>(R.getTypePtr());
>
> This logic looks wrong; what about the following case?
>
> typedef int a();
> a x;
>
> "x" here doesn't have a prototype...
You're right! Fixed.
- Doug
More information about the cfe-commits
mailing list