Skip to content

Commit 4198e61

Browse files
committed
[-Wunsafe-buffer-usage] Restore be48c0d change lost in merge.
The only actual change was somehow dropped in merges 4de73d1 and 47144fc. rdar://150485090
1 parent f69a82b commit 4198e61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Analysis/UnsafeBufferUsage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ static bool isNullTermPointer(const Expr *Ptr, ASTContext &Ctx) {
14231423
const CXXMethodDecl *MD = MCE->getMethodDecl();
14241424
const CXXRecordDecl *RD = MCE->getRecordDecl()->getCanonicalDecl();
14251425

1426-
if (MD && RD && RD->isInStdNamespace())
1426+
if (MD && RD && RD->isInStdNamespace() && MD->getIdentifier())
14271427
if (MD->getName() == "c_str" && RD->getName() == "basic_string")
14281428
return true;
14291429
}

0 commit comments

Comments
 (0)