[cfe-commits] r67313 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/function-redecl.c

Eli Friedman eli.friedman at gmail.com
Fri Mar 20 17:22:57 PDT 2009


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...

-Eli




More information about the cfe-commits mailing list