File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
clang/lib/StaticAnalyzer/Checkers/WebKit Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class UncountedCallArgsChecker
72
72
73
73
if (auto *MemberCallExpr = dyn_cast<CXXMemberCallExpr>(CE)) {
74
74
auto *E = MemberCallExpr->getImplicitObjectArgument ();
75
- auto * ArgType = MemberCallExpr->getObjectType (). getTypePtrOrNull ();
75
+ QualType ArgType = MemberCallExpr->getObjectType ();
76
76
std::optional<bool > IsUncounted =
77
77
isUncounted (ArgType->getAsCXXRecordDecl ());
78
78
if (IsUncounted && *IsUncounted && !isPtrOriginSafe (E))
@@ -213,15 +213,10 @@ class UncountedCallArgsChecker
213
213
void reportBugOnThis (const Expr *CallArg) const {
214
214
assert (CallArg);
215
215
216
- SmallString<100 > Buf;
217
- llvm::raw_svector_ostream Os (Buf);
218
-
219
- Os << " Call argument for 'this' parameter is uncounted and unsafe." ;
220
-
221
216
const SourceLocation SrcLocToReport = CallArg->getSourceRange ().getBegin ();
222
217
223
218
PathDiagnosticLocation BSLoc (SrcLocToReport, BR->getSourceManager ());
224
- auto Report = std::make_unique<BasicBugReport>(Bug, Os. str () , BSLoc);
219
+ auto Report = std::make_unique<BasicBugReport>(Bug, " Call argument for 'this' parameter is uncounted and unsafe. " , BSLoc);
225
220
Report->addRange (CallArg->getSourceRange ());
226
221
BR->emitReport (std::move (Report));
227
222
}
You can’t perform that action at this time.
0 commit comments