Details
- Reviewers
pcc - Commits
- rL234477: Differential Revision: http://reviews.llvm.org/D7249
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/dfsan/dfsan_custom.cc | ||
---|---|---|
971 | I feel a little uncomfortable about introducing more of these macros. Can we perhaps introduce a struct to hold the state used by these functions and make these macros and the functions into methods of the struct? |
LGTM with my suggestions.
lib/dfsan/dfsan_custom.cc | ||
---|---|---|
1013 | If you keep track of the start of the chunk of the format string instead of its size, you will have only one thing to increment here and in the other loop. | |
1015 | You could modify this switch statement to consume characters instead: switch (*++formatter.fmt) { Once you make the matching change to build_format_string, this will save you from having to confusingly increment and decrement formatter.fmt above. |
I feel a little uncomfortable about introducing more of these macros. Can we perhaps introduce a struct to hold the state used by these functions and make these macros and the functions into methods of the struct?