summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-06-27 08:31:58 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-06-27 08:31:58 +0000
commit5925926a2fc0fe7ca558575e8cd4879e2ef83993 (patch)
tree116110c2cad301e4f90ac7d6d81f250b9848f0b0 /clang/lib/Sema/SemaOverload.cpp
parentc93322182615e2333e85ff21d8a93b2e4fce1e3d (diff)
downloadbcm5719-llvm-5925926a2fc0fe7ca558575e8cd4879e2ef83993.tar.gz
bcm5719-llvm-5925926a2fc0fe7ca558575e8cd4879e2ef83993.zip
Fix missing braces around two statements that were intended to be part
of a single if block. This is really annoying to track down and test. Silly changes to the test case caused it to stop showing up. I wish there were a more concrete way of asserting that a note attaches to the intended diagnostic. This fixes PR10195. llvm-svn: 133907
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 4764ced9b46..b6045123fe2 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -9168,13 +9168,14 @@ Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE,
TheCall->getMethodDecl()->isPure()) {
const CXXMethodDecl *MD = TheCall->getMethodDecl();
- if (isa<CXXThisExpr>(MemExpr->getBase()->IgnoreParenCasts()))
+ if (isa<CXXThisExpr>(MemExpr->getBase()->IgnoreParenCasts())) {
Diag(MemExpr->getLocStart(),
diag::warn_call_to_pure_virtual_member_function_from_ctor_dtor)
<< MD->getDeclName() << isa<CXXDestructorDecl>(CurContext)
<< MD->getParent()->getDeclName();
Diag(MD->getLocStart(), diag::note_previous_decl) << MD->getDeclName();
+ }
}
return MaybeBindToTemporary(TheCall);
}
OpenPOWER on IntegriCloud