summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-02-21 22:10:49 +0000
committerTed Kremenek <kremenek@apple.com>2013-02-21 22:10:49 +0000
commit2edaf4e9735d738657f9560473cec484f41b6f47 (patch)
treebd9e92e8f560ae1262df59eb2483ea4201c01a62 /clang
parentd4fac256b070d0a460bf64c7d801e1d6f45cfd69 (diff)
downloadbcm5719-llvm-2edaf4e9735d738657f9560473cec484f41b6f47.tar.gz
bcm5719-llvm-2edaf4e9735d738657f9560473cec484f41b6f47.zip
Remove superfluous null pointer check. The pointer is used prior to this check.
llvm-svn: 175807
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 7411e809dbb..65bdd2a47fb 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1672,14 +1672,13 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R,
<< SS.getRange()
<< FixItHint::CreateReplacement(Corrected.getCorrectionRange(),
CorrectedStr);
- if (ND) {
- unsigned diag = isa<ImplicitParamDecl>(ND)
- ? diag::note_implicit_param_decl
- : diag::note_previous_decl;
- Diag(ND->getLocation(), diag)
- << CorrectedQuotedStr;
- }
+ unsigned diag = isa<ImplicitParamDecl>(ND)
+ ? diag::note_implicit_param_decl
+ : diag::note_previous_decl;
+
+ Diag(ND->getLocation(), diag)
+ << CorrectedQuotedStr;
// Tell the callee to try to recover.
return false;
OpenPOWER on IntegriCloud