diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-04 01:26:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-04 01:26:46 +0000 |
commit | 14f78f4a11df4c06667e2cbb87eeb179e4cb46fe (patch) | |
tree | 392bceb2e768c1f45098628ec63adfabc953e358 /include | |
parent | 15676bec6fa9ad9466d93c163f2d1b8a3f559b3a (diff) |
Separate out and special-case the diagnostic for 'auto' in a
conversion-type-id, in preparation for this becoming valid in c++1y mode.
No functionality change; small diagnostic improvement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181089 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
-rw-r--r-- | include/clang/Sema/DeclSpec.h | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index bfbbb91be9..f43a7d1338 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -1428,7 +1428,7 @@ def err_auto_not_allowed : Error< "|in non-static union member|in non-static class member|in interface member" "|in exception declaration|in template parameter|in block literal" "|in template argument|in typedef|in type alias|in function return type" - "|here}0">; + "|in conversion function type|here}0">; def err_auto_var_requires_init : Error< "declaration of variable %0 with type %1 requires an initializer">; def err_auto_new_requires_ctor_arg : Error< diff --git a/include/clang/Sema/DeclSpec.h b/include/clang/Sema/DeclSpec.h index 1c0a8e4d11..fc818953d8 100644 --- a/include/clang/Sema/DeclSpec.h +++ b/include/clang/Sema/DeclSpec.h @@ -1503,8 +1503,9 @@ public: CXXNewContext, // C++ new-expression. CXXCatchContext, // C++ catch exception-declaration ObjCCatchContext, // Objective-C catch exception-declaration - BlockLiteralContext, // Block literal declarator. + BlockLiteralContext, // Block literal declarator. LambdaExprContext, // Lambda-expression declarator. + ConversionIdContext, // C++ conversion-type-id. TrailingReturnContext, // C++11 trailing-type-specifier. TemplateTypeArgContext, // Template type argument. AliasDeclContext, // C++11 alias-declaration. @@ -1680,6 +1681,7 @@ public: case ObjCCatchContext: case BlockLiteralContext: case LambdaExprContext: + case ConversionIdContext: case TemplateTypeArgContext: case TrailingReturnContext: return true; @@ -1712,6 +1714,7 @@ public: case ObjCResultContext: case BlockLiteralContext: case LambdaExprContext: + case ConversionIdContext: case TemplateTypeArgContext: case TrailingReturnContext: return false; @@ -1761,6 +1764,7 @@ public: case AliasTemplateContext: case BlockLiteralContext: case LambdaExprContext: + case ConversionIdContext: case TemplateTypeArgContext: case TrailingReturnContext: return false; @@ -1943,6 +1947,7 @@ public: case ObjCCatchContext: case BlockLiteralContext: case LambdaExprContext: + case ConversionIdContext: case TemplateTypeArgContext: case TrailingReturnContext: return false; |