diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/NestedNameSpecifier.h | 5 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
-rw-r--r-- | include/clang/Basic/TokenKinds.def | 2 | ||||
-rw-r--r-- | include/clang/Parse/Parser.h | 5 | ||||
-rw-r--r-- | include/clang/Sema/Sema.h | 4 |
5 files changed, 15 insertions, 3 deletions
diff --git a/include/clang/AST/NestedNameSpecifier.h b/include/clang/AST/NestedNameSpecifier.h index e831113863..bda2d31fd5 100644 --- a/include/clang/AST/NestedNameSpecifier.h +++ b/include/clang/AST/NestedNameSpecifier.h @@ -36,8 +36,9 @@ class LangOptions; /// namespaces. For example, "foo::" in "foo::x" is a nested name /// specifier. Nested name specifiers are made up of a sequence of /// specifiers, each of which can be a namespace, type, identifier -/// (for dependent names), or the global specifier ('::', must be the -/// first specifier). +/// (for dependent names), decltype specifier, or the global specifier ('::'). +/// The last two specifiers can only appear at the start of a +/// nested-namespace-specifier. class NestedNameSpecifier : public llvm::FoldingSetNode { /// \brief Enumeration describing diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 4243091291..fa2fabcdeb 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -3993,6 +3993,8 @@ def err_typecheck_deleted_function : Error< "conversion function from %0 to %1 invokes a deleted function">; def err_expected_class_or_namespace : Error<"expected a class or namespace">; +def err_expected_class : Error<"%0 is not a class%select{ or namespace|, " + "namespace, or scoped enumeration}1">; def err_missing_qualified_for_redecl : Error< "must qualify the name %0 to declare %q1 in this scope">; def err_invalid_declarator_scope : Error< diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def index 99ccc9ac4e..e9b772cdde 100644 --- a/include/clang/Basic/TokenKinds.def +++ b/include/clang/Basic/TokenKinds.def @@ -560,6 +560,8 @@ ANNOTATION(template_id) // annotation for a C++ template-id that names a // function template specialization (not a type), // e.g., "std::swap<int>" ANNOTATION(primary_expr) // annotation for a primary expression +ANNOTATION(decltype) // annotation for a decltype expression, + // e.g., "decltype(foo.bar())" // Annotation for #pragma unused(...) // For each argument inside the parentheses the pragma handler will produce diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index 2c8f7ef986..5dfb99ec07 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -1901,7 +1901,10 @@ private: void ParseTypeofSpecifier(DeclSpec &DS); - void ParseDecltypeSpecifier(DeclSpec &DS); + SourceLocation ParseDecltypeSpecifier(DeclSpec &DS); + void AnnotateExistingDecltypeSpecifier(const DeclSpec &DS, + SourceLocation StartLoc, + SourceLocation EndLoc); void ParseUnderlyingTypeSpecifier(DeclSpec &DS); void ParseAtomicSpecifier(DeclSpec &DS); diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index ab644e2c65..adb00dfcb3 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -3326,6 +3326,10 @@ public: bool EnteringContext, CXXScopeSpec &SS); + bool ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS, + const DeclSpec &DS, + SourceLocation ColonColonLoc); + bool IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, |