AMP999 updated this revision to Diff 542972. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155814/new/
https://reviews.llvm.org/D155814 Files: clang/lib/Analysis/UnsafeBufferUsage.cpp Index: clang/lib/Analysis/UnsafeBufferUsage.cpp =================================================================== --- clang/lib/Analysis/UnsafeBufferUsage.cpp +++ clang/lib/Analysis/UnsafeBufferUsage.cpp @@ -1889,11 +1889,11 @@ const ParmVarDecl *Parm = FD->getParamDecl(i); if (Parm->isImplicit()) - continue; + continue; // FIXME: If a parameter has no name, it is unused in the // definition. So we could just leave it as it is. - if (!Parm->getIdentifier()) - // If a parameter of a function definition has no name: + if (!Parm->getIdentifier()) + // If a parameter of a function definition has no name: return std::nullopt; if (i == ParmIdx) // This is our spanified paramter! @@ -2208,7 +2208,6 @@ UnsafeBufferUsageHandler &Handler, bool EmitSuggestions) { assert(D && D->getBody()); - // We do not want to visit a Lambda expression defined inside a method independently. // Instead, it should be visited along with the outer method. if (const auto *fd = dyn_cast<CXXMethodDecl>(D)) {
Index: clang/lib/Analysis/UnsafeBufferUsage.cpp =================================================================== --- clang/lib/Analysis/UnsafeBufferUsage.cpp +++ clang/lib/Analysis/UnsafeBufferUsage.cpp @@ -1889,11 +1889,11 @@ const ParmVarDecl *Parm = FD->getParamDecl(i); if (Parm->isImplicit()) - continue; + continue; // FIXME: If a parameter has no name, it is unused in the // definition. So we could just leave it as it is. - if (!Parm->getIdentifier()) - // If a parameter of a function definition has no name: + if (!Parm->getIdentifier()) + // If a parameter of a function definition has no name: return std::nullopt; if (i == ParmIdx) // This is our spanified paramter! @@ -2208,7 +2208,6 @@ UnsafeBufferUsageHandler &Handler, bool EmitSuggestions) { assert(D && D->getBody()); - // We do not want to visit a Lambda expression defined inside a method independently. // Instead, it should be visited along with the outer method. if (const auto *fd = dyn_cast<CXXMethodDecl>(D)) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits