diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-02-21 22:10:49 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-02-21 22:10:49 +0000 |
commit | 94f3f549a7e0c426d5ffda7f25d1983c885dab9c (patch) | |
tree | 3b6be777a1b816b419501d75206c51645c25ca44 | |
parent | 4216ee1ed997b826470864182df34df1a350fcb7 (diff) |
Remove superfluous null pointer check. The pointer is used prior to this check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175807 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 7411e809db..65bdd2a47f 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/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; |