diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-08 17:10:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-08 17:10:18 +0000 |
commit | f52516038ab5d0b1b90a6dd32f46b7d6dabd04c8 (patch) | |
tree | fae904423f82efc8ac47edd383ab00d8ce223515 /lib/Sema/SemaDeclCXX.cpp | |
parent | a2026c96d3935e7909e049ad9096762844544ed6 (diff) |
Teach libclang's token-annotation logic about context-sensitive
keywords for Objective-C+ and C++0x.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index a2528a6140..9fbbe414d6 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -1069,6 +1069,12 @@ Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MD->addAttr(new (Context) FinalAttr(VS.getFinalLoc(), Context)); } + if (VS.getLastLocation().isValid()) { + // Update the end location of a method that has a virt-specifiers. + if (CXXMethodDecl *MD = dyn_cast_or_null<CXXMethodDecl>(Member)) + MD->setRangeEnd(VS.getLastLocation()); + } + CheckOverrideControl(Member); assert((Name || isInstField) && "No identifier for non-field ?"); @@ -5407,7 +5413,8 @@ CXXMethodDecl *Sema::DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl) { Context.getFunctionType(RetType, &ArgType, 1, EPI), /*TInfo=*/0, /*isStatic=*/false, /*StorageClassAsWritten=*/SC_None, - /*isInline=*/true); + /*isInline=*/true, + SourceLocation()); CopyAssignment->setAccess(AS_public); CopyAssignment->setImplicit(); CopyAssignment->setTrivial(ClassDecl->hasTrivialCopyAssignment()); |