[PATCH] D58797: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 15 11:16:10 PDT 2019
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from some minor nits.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:338
+ case Builtin::BI__builtin___vsnprintf_chk: {
+ DiagID = diag::warn_memcpy_chk_overflow;
+ IsChkVariant = true;
----------------
I feel like this diagnostic name should be updated -- `snprintf()` and `memcpy()` are pretty distinct things. Maybe `warn_builtin_chk_overflow`?
================
Comment at: clang/lib/Sema/SemaChecking.cpp:400
+ int BOSType = 0;
+ if (auto *POS =
+ FD->getParamDecl(ObjectIndex)->getAttr<PassObjectSizeAttr>())
----------------
`const auto *`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58797/new/
https://reviews.llvm.org/D58797
More information about the cfe-commits
mailing list