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
if (WarnAllRootCause || SM.isInMainFile(SL) || PtrCount > 1) {
This is unhelpful for the tutorial, in which after the first 3C pass, only one wild pointer is left and the user has no good way to find it because its root cause has only 1 affected pointer. In -warn-all-root-cause, the important root cause is buried in a pile of other root causes for unwritable code with 0 affected relevant pointers.
We should probably change -warn-root-cause to show all root causes that affect at least 1 relevant pointer. It looks like the original decision to set the threshold at 2 was made here; that may have made sense at the time (possibly because 3C handled unwritable code differently at the time?), but I don't see any justification for it now.
The text was updated successfully, but these errors were encountered:
#721)
Root causes will now be emitted if they affect at least one pointer.
This is a change from the previous minimum of two affected pointers.
Fixes#685.
Currently,
3c -warn-root-cause
shows a root cause only if its location is in one of the main source files or it affects at least 2 relevant pointers:checkedc-clang/clang/lib/3C/RewriteUtils.cpp
Line 572 in e1897b5
This is unhelpful for the tutorial, in which after the first 3C pass, only one wild pointer is left and the user has no good way to find it because its root cause has only 1 affected pointer. In
-warn-all-root-cause
, the important root cause is buried in a pile of other root causes for unwritable code with 0 affected relevant pointers.We should probably change
-warn-root-cause
to show all root causes that affect at least 1 relevant pointer. It looks like the original decision to set the threshold at 2 was made here; that may have made sense at the time (possibly because 3C handled unwritable code differently at the time?), but I don't see any justification for it now.The text was updated successfully, but these errors were encountered: