[cfe-dev] PATCH: Diagnosing use of C++ default arguments outside of a function declaration

Doug Gregor doug.gregor at gmail.com
Thu May 1 19:51:30 PDT 2008

The attached patch diagnoses attempts to use C++ default arguments
outside of a parameter-declaration of a function declaration, e.g.,

  void foo(int (*p)(int x = 5)); // ill-formed: p's parameters are not
allowed to have default arguments

I believe that this wraps up support for default arguments until Clang
gets templates or member functions. Otherwise, this is a pretty boring

  - Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-defarg-nondecl.patch
Type: text/x-patch
Size: 7019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080501/f7795d79/attachment.bin>

More information about the cfe-dev mailing list