forked from OSchip/llvm-project
[clang-tidy] getOutermostNamespace - remove redundant nullptr check
The pointer is always dereferenced
This commit is contained in:
parent
5bc13f9d94
commit
003e038264
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue