aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-01-20 04:34:22 +0000
committerAnders Carlsson <andersca@mac.com>2011-01-20 04:34:22 +0000
commitaae5af24f031ad5f17872bd8b27ed5c175c0f90c (patch)
tree69416fff661274e7b6a3020d2bcd758b5f13c805 /include/clang/Sema
parent37ea6c461897bcfc8865eb130cddd5c1853c3c22 (diff)
Only allow virtual member functions to be marked 'override' and 'final'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema')
-rw-r--r--include/clang/Sema/DeclSpec.h9
1 files changed, 9 insertions, 0 deletions
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;