diff options
author | Anders Carlsson <andersca@mac.com> | 2009-06-12 16:51:40 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-06-12 16:51:40 +0000 |
commit | 5e300d1a8e37f24e71f8cf204b982f20f85cf91a (patch) | |
tree | 4ecedfd5067b9578a835d6f0ccb3df0c7bf9b463 /include/clang/Basic | |
parent | 859ba504e754436e1ccf81f50800e5d2ea647447 (diff) |
It's an error to use a function declared in a class definition as a default argument before the function has been declared.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 2d55d4c4c5..b0a3da0d04 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -572,6 +572,11 @@ def err_param_default_argument_nonfunc : Error< "default arguments can only be specified for parameters in a function " "declaration">; +def err_use_of_default_argument_to_function_declared_later : Error< + "use of default argument to function %0 that is declared later in class %1">; +def note_default_argument_declared_here : Note< + "default argument declared here">; + def ext_param_promoted_not_compatible_with_prototype : ExtWarn< "promoted type %0 of K&R function parameter is not compatible with the " "parameter type %1 declared in a previous prototype">; |