You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once checkedc#1174 is merged to our repository via #700, we should change -addcr to allow calls to printf-like functions in checked regions, at least in some cases. There may be some cases in which a printf-like call generates an error in a checked scope but not in an unchecked scope; this part of the design is currently in flux (see checkedc#1160 (comment)). We might want -addcr to try to detect these cases and avoid putting the call in a checked region and causing a compile error, or we could let the error happen if we think it would be easy for the user to fix manually (maybe no worse than 3C's "known bounds inference limitations").
It looks like the heart of this change will be to change the condition here:
The expedient approach would be to copy and paste the code, but we should consider whether we want to start trying to factor out this kind of compiler code so it can be reused by 3C.
The text was updated successfully, but these errors were encountered:
Once checkedc#1174 is merged to our repository via #700, we should change
-addcr
to allow calls toprintf
-like functions in checked regions, at least in some cases. There may be some cases in which aprintf
-like call generates an error in a checked scope but not in an unchecked scope; this part of the design is currently in flux (see checkedc#1160 (comment)). We might want-addcr
to try to detect these cases and avoid putting the call in a checked region and causing a compile error, or we could let the error happen if we think it would be easy for the user to fix manually (maybe no worse than 3C's "known bounds inference limitations").It looks like the heart of this change will be to change the condition here:
checkedc-clang/clang/lib/3C/CheckedRegions.cpp
Line 77 in 07c5311
to allow the same functions that the Checked C compiler allows here:
checkedc-clang/clang/lib/Sema/SemaExpr.cpp
Lines 373 to 386 in 4ece510
The expedient approach would be to copy and paste the code, but we should consider whether we want to start trying to factor out this kind of compiler code so it can be reused by 3C.
The text was updated successfully, but these errors were encountered: