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
This commit is contained in:
Ted Kremenek 2013-02-21 22:10:49 +00:00
Родитель 4216ee1ed9
Коммит 94f3f549a7
1 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -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;