Windows library: Add intrinsics __noop and __nop (#1119)

This commit is contained in:
Sebastian 2018-03-15 12:31:20 +01:00 committed by GitHub
parent 166e4cafcd
commit 65c85cbb53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -4827,6 +4827,16 @@ HFONT CreateFont(
<not-uninit/>
</arg>
</function>
<!-- Intrinsic __noop https://docs.microsoft.com/en-us/cpp/intrinsics/noop -->
<function name="__noop">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="any"/>
</function>
<!-- Intrinsic void __nop(); https://docs.microsoft.com/en-us/cpp/intrinsics/nop -->
<function name="__nop">
<noreturn>false</noreturn>
</function>
<podtype name="LARGE_INTEGER" sign="s" size="8"/>
<podtype name="POINTER_SIGNED" sign="s"/>
<podtype name="POINTER_UNSIGNED" sign="u"/>

View File

@ -146,6 +146,11 @@ void validCode()
SecureZeroMemory(byteBuf, sizeof(byteBuf));
RtlFillMemory(byteBuf, sizeof(byteBuf), 0xff);
// Intrinsics
__noop();
__noop(1, "test", NULL);
__nop();
// Valid Library usage, no leaks, valid arguments
HINSTANCE hInstLib = LoadLibrary(L"My.dll");
FreeLibrary(hInstLib);