[cfe-commits] r123893 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/SemaDeclCXX.cpp
Anders Carlsson
andersca at mac.com
Wed Jan 19 22:29:02 PST 2011
Author: andersca
Date: Thu Jan 20 00:29:02 2011
New Revision: 123893
URL: http://llvm.org/viewvc/llvm-project?rev=123893&view=rev
Log:
Make CheckOverrideControl a member of Sema.
Modified:
cfe/trunk/include/clang/Sema/Sema.h
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=123893&r1=123892&r2=123893&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Thu Jan 20 00:29:02 2011
@@ -2724,6 +2724,9 @@
bool CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange);
+ /// CheckOverrideControl - Check C++0x override control semantics.
+ void CheckOverrideControl(const Decl *D);
+
//===--------------------------------------------------------------------===//
// C++ Access Control
//
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=123893&r1=123892&r2=123893&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Thu Jan 20 00:29:02 2011
@@ -853,8 +853,7 @@
}
/// CheckOverrideControl - Check C++0x override control semantics.
-static void
-CheckOverrideControl(Sema& SemaRef, const Decl *D) {
+void Sema::CheckOverrideControl(const Decl *D) {
const CXXMethodDecl *MD = llvm::dyn_cast<CXXMethodDecl>(D);
if (!MD || !MD->isVirtual())
return;
@@ -866,7 +865,7 @@
bool HasOverriddenMethods =
MD->begin_overridden_methods() != MD->end_overridden_methods();
if (MD->isMarkedOverride() && !HasOverriddenMethods) {
- SemaRef.Diag(MD->getLocation(),
+ Diag(MD->getLocation(),
diag::err_function_marked_override_not_overriding)
<< MD->getDeclName();
return;
@@ -1029,7 +1028,7 @@
MD->setIsMarkedFinal(true);
}
- CheckOverrideControl(*this, Member);
+ CheckOverrideControl(Member);
assert((Name || isInstField) && "No identifier for non-field ?");
More information about the cfe-commits
mailing list