diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-03-11 06:22:39 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-03-11 06:22:39 +0000 |
commit | ae7e589c07248fda4fca0a39e9eb7c547689314b (patch) | |
tree | b566c3b81312657e989985c27e0aba9eb359e086 /utils | |
parent | b5d8fba05e74d73ef40056b8fe4b4a611e02a728 (diff) | |
download | clang-ae7e589c07248fda4fca0a39e9eb7c547689314b.tar.gz clang-ae7e589c07248fda4fca0a39e9eb7c547689314b.tar.bz2 clang-ae7e589c07248fda4fca0a39e9eb7c547689314b.tar.xz |
[C++11] Add 'override' keyword to virtual methods that override their base class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/ClangAttrEmitter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index b2c6b6cddf..d4f8d57c61 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -1491,10 +1491,10 @@ void EmitClangAttrClass(RecordKeeper &Records, raw_ostream &OS) { OS << " }\n\n"; } - OS << " virtual " << R.getName() << "Attr *clone (ASTContext &C) const;\n"; - OS << " virtual void printPretty(raw_ostream &OS,\n" - << " const PrintingPolicy &Policy) const;\n"; - OS << " virtual const char *getSpelling() const;\n"; + OS << " " << R.getName() << "Attr *clone(ASTContext &C) const override;\n"; + OS << " void printPretty(raw_ostream &OS,\n" + << " const PrintingPolicy &Policy) const override;\n"; + OS << " const char *getSpelling() const override;\n"; if (!ElideSpelling) { assert(!SemanticToSyntacticMap.empty() && "Empty semantic mapping list"); @@ -1524,11 +1524,11 @@ void EmitClangAttrClass(RecordKeeper &Records, raw_ostream &OS) { << "attr::" << R.getName() << "; }\n"; bool LateParsed = R.getValueAsBit("LateParsed"); - OS << " virtual bool isLateParsed() const { return " + OS << " bool isLateParsed() const override { return " << LateParsed << "; }\n"; if (R.getValueAsBit("DuplicatesAllowedWhileMerging")) - OS << " virtual bool duplicatesAllowed() const { return true; }\n\n"; + OS << " bool duplicatesAllowed() const override { return true; }\n\n"; OS << "};\n\n"; } |