This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe12e02df09a9: [clang] Evaluate strlen of strcpy argument for
-Wfortify-source. (authored by mbenfield, committed by gbiv).
Repository:
rG LLVM Git
george.burgess.iv accepted this revision.
george.burgess.iv added a comment.
This revision is now accepted and ready to land.
lgtm -- thanks!
please give a day for other reviewers to add any last minute comments, then i
think we can land this.
Comment at: clang/lib/Sema/SemaC
mbenfield updated this revision to Diff 359955.
mbenfield added a comment.
Rebase.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104887/new/
https://reviews.llvm.org/D104887
Files:
clang/include/clang/AST/Expr.h
clang/include/clang/Basic/Diagn
mbenfield updated this revision to Diff 359655.
mbenfield added a comment.
Rebased and addressed comments.
- Renamed ComputeCheckVariantSize.
- const Expr *.
- Changed existing test case to write only one excess byte.
- Added new, non-diagnosing test case.
Repository:
rG LLVM Github Monore
mbenfield added inline comments.
Comment at: clang/lib/Sema/SemaChecking.cpp:739
DiagID = diag::warn_fortify_source_size_mismatch;
-SizeIndex = TheCall->getNumArgs() - 1;
-ObjectIndex = 0;
+SourceSize = ComputeCheckVariantSize(TheCall->getNumArgs() - 1);
+Des
mbenfield added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:15737
+
+// Fall through to slow path.
+ }
cjdb wrote:
> This comment is slightly different to the RHS: does that mean that a
> diagnostic might not be issued?
I just didn't find th
cjdb added a comment.
Thanks for getting around to this! Just a nit and a clarifying question.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:821
+ "'%0' will always overflow; destination buffer has size %1,"
+ " but the source string has length %2 (including nu
george.burgess.iv added a comment.
thanks for this! mostly just nits from me
Comment at: clang/lib/AST/ExprConstant.cpp:15755
+
+bool Expr::tryEvaluateStrLen(uint64_t &Result, ASTContext &Ctx) const {
+ Expr::EvalStatus Status;
Looks like this is the second "t
mbenfield updated this revision to Diff 358309.
mbenfield added a comment.
undo commenting out in source_location.cpp
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104887/new/
https://reviews.llvm.org/D104887
Files:
clang/include/clang/AST/Expr.
mbenfield updated this revision to Diff 357077.
mbenfield added a comment.
fix failing tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104887/new/
https://reviews.llvm.org/D104887
Files:
clang/include/clang/AST/Expr.h
clang/include/clang/B
mbenfield updated this revision to Diff 354563.
mbenfield added a comment.
Accommodate the fact that APSInt::toString(unsigned) was removed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104887/new/
https://reviews.llvm.org/D104887
Files:
clang/
mbenfield created this revision.
mbenfield added reviewers: george.burgess.iv, cjdb, rsmith.
mbenfield requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Also introduce Expr::tryEvaluateStrLen.
Repository:
rG LLVM Github Monorepo
https://
12 matches
Mail list logo