zequanwu marked 2 inline comments as done. zequanwu added inline comments.
================ Comment at: clang/lib/Analysis/UninitializedValues.cpp:410 + if (FunctionDecl *fd = CE->getDirectCallee()) { + if (FunctionTemplateDecl *ftd = fd->getPrimaryTemplate()) + return ftd->getTemplatedDecl()->hasTrivialBody(); ---------------- hans wrote: > Is this special check for templates necessary? Doesn't the > "fd->hasTrivialBody()" check below also handle the template case? Yes, it is necessary. If the function is a function template, `fd` doesn't have body when this analysis happens. So `fd->hasTrivialBody()` is always false in that case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82425/new/ https://reviews.llvm.org/D82425 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits