[clang-tidy] getOutermostNamespace - remove redundant nullptr check

The pointer is always dereferenced
This commit is contained in:
Simon Pilgrim 2022-02-12 10:49:54 +00:00
parent 5bc13f9d94
commit 003e038264
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ namespace llvm_libc {
// Unit.
const DeclContext *getOutermostNamespace(const DeclContext *Decl) {
const DeclContext *Parent = Decl->getParent();
if (Parent && Parent->isTranslationUnit())
if (Parent->isTranslationUnit())
return Decl;
return getOutermostNamespace(Parent);
}