diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-18 07:07:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-18 07:07:28 +0000 |
commit | 965acbb321e94e36aa5365126eee46b97745fdbb (patch) | |
tree | b90c16f0aedbfca9146e07251c896cd22d9fd9c6 /include/clang/Basic | |
parent | c6c16af963eddc3e9b75b5d2614d069e1162fe27 (diff) |
Allow "overloadable" functions in C to be declared as variadic without
any named parameters, e.g., this is accepted in C:
void f(...) __attribute__((overloadable));
although this would be rejected:
void f(...);
To do this, moved the checking of the "ellipsis without any named
arguments" condition from the parser into Sema (where it belongs anyway).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/DiagnosticParseKinds.def | 2 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.def | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticParseKinds.def b/include/clang/Basic/DiagnosticParseKinds.def index 5134a28185..6d87c70a17 100644 --- a/include/clang/Basic/DiagnosticParseKinds.def +++ b/include/clang/Basic/DiagnosticParseKinds.def @@ -162,8 +162,6 @@ DIAG(err_illegal_decl_reference_to_reference, ERROR, "%0 declared as a reference to a reference") DIAG(err_argument_required_after_attribute, ERROR, "argument required after attribute") -DIAG(err_ellipsis_first_arg, ERROR, - "ISO C requires a named argument before '...'") DIAG(err_missing_param, ERROR, "expected parameter declarator") DIAG(err_unexpected_typedef_ident, ERROR, diff --git a/include/clang/Basic/DiagnosticSemaKinds.def b/include/clang/Basic/DiagnosticSemaKinds.def index 16692412dc..fc4bfc9ad2 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.def +++ b/include/clang/Basic/DiagnosticSemaKinds.def @@ -78,7 +78,8 @@ DIAG(warn_decl_in_param_list, WARNING, "declaration of %0 will not be visible outside of this function") DIAG(warn_implicit_function_decl, WARNING, "implicit declaration of function %0") - +DIAG(err_ellipsis_first_arg, ERROR, + "ISO C requires a named argument before '...'") DIAG(err_declarator_need_ident, ERROR, "declarator requires an identifier") DIAG(err_bad_language, ERROR, |