forked from OSchip/llvm-project
Bugfix for nullptr check by klocwork
Klocwork static check: Pointer from call to function `DebugLoc::operator DILocation *() const ` may be NULL and will be dereference in function `printExtendedName``` Patch by Shengchen Kan (skan) Differential Revision: https://reviews.llvm.org/D61715 llvm-svn: 360317
This commit is contained in:
parent
3edca1ac1a
commit
c05aad0532
|
@ -504,7 +504,8 @@ static void printExtendedName(raw_ostream &OS, const DINode *Node,
|
|||
|
||||
if (!Res.empty())
|
||||
OS << Res << "," << Line;
|
||||
if (auto *InlinedAt = DL->getInlinedAt()) {
|
||||
auto *InlinedAt = DL ? DL->getInlinedAt() : nullptr;
|
||||
if (InlinedAt) {
|
||||
if (DebugLoc InlinedAtDL = InlinedAt) {
|
||||
OS << " @[";
|
||||
printDebugLoc(InlinedAtDL, OS, Ctx);
|
||||
|
|
Loading…
Reference in New Issue