aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-05-07 04:49:29 +0000
committerDouglas Gregor <dgregor@apple.com>2008-05-07 04:49:29 +0000
commit6d6eb57225b53fb627c565861d1d0e90645400d1 (patch)
tree78f85cfa25a37b468300c0bd09e59cf7e6e131e8 /include/clang
parent84060dbbe5b06c26b25d0ba7107213479a2e0f8b (diff)
Diagnose attempts to use C++ default arguments outside of a function declaration
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/DiagnosticKinds.def2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticKinds.def b/include/clang/Basic/DiagnosticKinds.def
index 2f281128c7..3839d7f76b 100644
--- a/include/clang/Basic/DiagnosticKinds.def
+++ b/include/clang/Basic/DiagnosticKinds.def
@@ -662,6 +662,8 @@ DIAG(err_param_default_argument_references_param, ERROR,
"default argument references parameter '%0'")
DIAG(err_param_default_argument_references_local, ERROR,
"default argument references local variable '%0' of enclosing function")
+DIAG(err_param_default_argument_nonfunc, ERROR,
+ "default arguments can only be specified for parameters in a function declaration")
DIAG(err_previous_definition, ERROR,
"previous definition is here")
DIAG(err_previous_use, ERROR,