-
Notifications
You must be signed in to change notification settings - Fork 5k
Delete SCAN contract annotations #116182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete SCAN contract annotations #116182
Conversation
These annotations were used by prefast plugin that analyzed contract consistency. This prefast plugin is not coming back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes all SCAN_*
and related static analysis annotations from exception handling and contract macros, consolidating contract headers and cleaning up annotation-only code.
- Deleted
SCAN_
markers andANNOTATION_*
usages across multiple VM and utilcode files. - Streamlined
staticcontract.h
by replacing annotation-based contracts with empty macro definitions. - Fixed duplicate includes of
eecontract.h
incommon.h
.
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/coreclr/vm/exceptmacros.h | Removed SCAN_EHMARKER* and ANNOTATION_NOTHROW macros |
src/coreclr/vm/excep.h | Deleted SCAN_SCOPE_BEGIN /END around helper constructor |
src/coreclr/vm/eecontract.cpp | Removed SCAN_IGNORE_* markers from DoChecks |
src/coreclr/vm/crst.h | Deleted ANNOTATION_SPECIAL_HOLDER_CALLER_NEEDS_DYNAMIC_CONTRACT |
src/coreclr/vm/crst.cpp | Removed SCAN_IGNORE_* macros in Enter |
src/coreclr/vm/common.h | Added and de-duplicated #include "eecontract.h" |
src/coreclr/vm/clrex.cpp | Removed SCAN_IGNORE_FAULT in exception path |
src/coreclr/vm/assemblyspec.cpp | Deleted SCAN_IGNORE_FAULT in wrappers |
src/coreclr/vm/appdomain.hpp | Removed ANNOTATION_SPECIAL_HOLDER_CALLER_NEEDS_DYNAMIC_CONTRACT |
src/coreclr/utilcode/stacktrace.cpp | Cleaned SCAN_IGNORE_FAULT from image/dbghelp loads |
src/coreclr/utilcode/pedecoder.cpp | Removed ANNOTATION_DEBUG_ONLY |
src/coreclr/utilcode/log.cpp | Deleted SCAN_IGNORE_FAULT in logging functions |
src/coreclr/utilcode/check.cpp | Removed SCAN_SCOPE_BEGIN and ANNOTATION_VIOLATION |
src/coreclr/inc/staticcontract.h | Replaced annotation macros with empty STATIC_CONTRACT_* definitions |
src/coreclr/inc/palclr.h | Deleted SCAN_EHMARKER* and throw markers in PAL_TRY |
src/coreclr/inc/ostype.h | Removed static contract annotations from macros |
src/coreclr/inc/ex.h | Removed SCAN_SCOPE_* and SCAN_EHMARKER in exception helpers |
src/coreclr/inc/contract.h | Deleted SCAN_SCOPE_BEGIN /END in contract holders |
src/coreclr/debug/ee/debugger.h | Removed SCAN_SCOPE_BEGIN /END in GC holder |
src/coreclr/debug/ee/debugger.cpp | Removed SCAN_IGNORE_TRIGGER in debugger notifications |
/ba-g timeout |
These annotations were used by prefast plugin that analyzed contract consistency. This prefast plugin is not coming back.