This is an archive of the discontinued LLVM Phabricator instance.

[-Wunsafe-buffer-usage] Use relevant source locations for warnings
ClosedPublic

Authored by jkorous on Jan 9 2023, 5:52 PM.

Details

Summary

This way we highlight a particular unsafe subexpression by providing more accurate source location than begin of an entire statement.

Diff Detail

Event Timeline

jkorous created this revision.Jan 9 2023, 5:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 9 2023, 5:52 PM
jkorous requested review of this revision.Jan 9 2023, 5:52 PM
aaron.ballman added inline comments.Jan 12 2023, 11:06 AM
clang/lib/Sema/AnalysisBasedWarnings.cpp
2159
2162
2163

Please spell this type out and drop the top-level const.

2174–2175

Same here as above.

jkorous updated this revision to Diff 489933.Jan 17 2023, 1:39 PM
jkorous marked 4 inline comments as done.

Addressed the comments about use of auto in declarations.

This revision is now accepted and ready to land.Jan 18 2023, 11:27 AM
This revision was landed with ongoing or failed builds.Jan 18 2023, 2:19 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 2:19 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript