Skip to content

Commit a9b3054

Browse files
authored
[NFC][CLANG] Fix static analyzer bugs about large copy by values (#75060)
Reported by Static Analyzer tool: In getSourceRangeToTokenEnd(clang::Decl const *, clang::SourceManager const &, clang::LangOptions): A very large function call parameter exceeding the high threshold is passed by value pass_by_value: Passing parameter LangOpts of type clang::LangOptions (size 1784 bytes) by value, which exceeds the high threshold of 512 bytes
1 parent b730703 commit a9b3054

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
@@ -1534,7 +1534,7 @@ static bool hasUnsupportedSpecifiers(const VarDecl *VD,
15341534
// returned by this function is the last location of the last token.
15351535
static SourceRange getSourceRangeToTokenEnd(const Decl *D,
15361536
const SourceManager &SM,
1537-
LangOptions LangOpts) {
1537+
const LangOptions &LangOpts) {
15381538
SourceLocation Begin = D->getBeginLoc();
15391539
SourceLocation
15401540
End = // `D->getEndLoc` should always return the starting location of the

0 commit comments

Comments
 (0)