This is an archive of the discontinued LLVM Phabricator instance.

[clang] Verify ssp buffer size is a valid integer
Needs ReviewPublic

Authored by alextsao1999 on Jan 5 2022, 8:48 PM.

Details

Reviewers
compnerd
Summary

This patch adds to verify whether the ssp buffer size is a legal integer and a new diagnostic driver kind has been added.

Diff Detail

Unit TestsFailed

Event Timeline

alextsao1999 requested review of this revision.Jan 5 2022, 8:48 PM
alextsao1999 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2022, 8:48 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
compnerd added inline comments.Jan 7 2022, 10:18 AM
clang/lib/Driver/ToolChains/Clang.cpp
3205–3210

I really am not a fan of the 16 here. Why not just use split and split on =? Or use [constexpr] strlen?

3210

Please consistently use the braces (either applied to both or on neither).

alextsao1999 marked 2 inline comments as done.Jan 28 2022, 11:05 PM
alextsao1999 added inline comments.
clang/lib/Driver/ToolChains/Clang.cpp
3210

Thanks, fixed. Are there any other issues?