From fa139cd3bd48e02a5b8a79338365bb3462a0c869 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 30 Apr 2012 23:33:33 +0000 Subject: Remove -Wc++98-compat warning for an outrageously-rare circumstance of 'this' being used in an exception specification in a way which isn't otherwise ill-formed in C++98: this warning also incorrectly triggered on uses of 'this' inside thread-safety attributes, and the mechanism required to tell these cases apart is more complex than can be justified by the (minimal) value of this part of -Wc++98-compat. llvm-svn: 155857 --- clang/lib/Sema/SemaExprCXX.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'clang/lib/Sema/SemaExprCXX.cpp') diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 7d345073d79..af0f971c1ca 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -693,10 +693,6 @@ Sema::CXXThisScopeRAII::~CXXThisScopeRAII() { } void Sema::CheckCXXThisCapture(SourceLocation Loc, bool Explicit) { - if (getLangOpts().CPlusPlus0x && - !dyn_cast_or_null(getFunctionLevelDeclContext())) - Diag(Loc, diag::warn_cxx98_compat_this_outside_method); - // We don't need to capture this in an unevaluated context. if (ExprEvalContexts.back().Context == Unevaluated && !Explicit) return; -- cgit v1.2.3