[clang] [clang][ExprConst] Let diagnostics point to std::allocator calls (PR #123744)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 22 21:01:26 PST 2025
================
@@ -1155,7 +1156,7 @@ namespace {
if (CTSD->isInStdNamespace() && ClassII &&
ClassII->isStr("allocator") && TAL.size() >= 1 &&
TAL[0].getKind() == TemplateArgument::Type)
- return {Call->Index, TAL[0].getAsType()};
+ return {Call->Index, TAL[0].getAsType(), Call->CallExpr};
}
return {};
----------------
shafik wrote:
So `Call` will be `nullptr` here and following some of the code from `createHeapAlloc` I am not sure that is safe. Maybe the combination can't happen but it is not obvious to me.
https://github.com/llvm/llvm-project/pull/123744
More information about the cfe-commits
mailing list