diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 4 | ||||
-rw-r--r-- | include/clang/Sema/DeclSpec.h | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 9e7d0a5761..b61fcc1ab3 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -870,6 +870,10 @@ def err_trailing_return_without_auto : Error< // C++0x attributes def err_repeat_attribute : Error<"'%0' attribute cannot be repeated">; +// C++0x override control +def override_keyword_only_allowed_on_virtual_member_functions : Error< + "only virtual member functions can be marked '%0'">; + // C++0x [[final]] def err_final_function_overridden : Error< "declaration of %0 overrides a 'final' function">; diff --git a/include/clang/Sema/DeclSpec.h b/include/clang/Sema/DeclSpec.h index 9c1f98fa1a..0f8624f0a3 100644 --- a/include/clang/Sema/DeclSpec.h +++ b/include/clang/Sema/DeclSpec.h @@ -1483,6 +1483,15 @@ public: bool SetVirtSpecifier(VirtSpecifier VS, SourceLocation Loc, const char *&PrevSpec); + bool isOverrideSpecified() const { return Specifiers & VS_Override; } + SourceLocation getOverrideLoc() const { return VS_overrideLoc; } + + bool isFinalSpecified() const { return Specifiers & VS_Final; } + SourceLocation getFinalLoc() const { return VS_finalLoc; } + + bool isNewSpecified() const { return Specifiers & VS_New; } + SourceLocation getNewLoc() const { return VS_newLoc; } + private: unsigned Specifiers; |