Skip to content

Commit 9db6276

Browse files
authored
Sync with the OS (#319)
* Sync with OS commit b58d62a22e8b065355e83f17d32f446bac7d5e75 * Fix build issues * Fix test * Merge with OS commit 2f20a1d7f273c9242cff4bb642ac0536833c0e75 * Preprocessor fix for Tracelogging.h * EBO to make UBSan happy * Some existing consumers can't consume win32_helpers * Build issue; apparently [[nodiscard]] causes issues with coroutines
1 parent 70155eb commit 9db6276

File tree

6 files changed

+128
-94
lines changed

6 files changed

+128
-94
lines changed

include/wil/Tracelogging.h

Lines changed: 121 additions & 88 deletions
Large diffs are not rendered by default.

include/wil/cppwinrt_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ namespace wil
115115
m_priority(priority)
116116
{
117117
}
118-
WI_NODISCARD bool await_ready() const noexcept { return false; }
118+
bool await_ready() const noexcept { return false; }
119119

120120
void await_suspend(details::coroutine_handle<> handle)
121121
{

include/wil/token_helpers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ namespace wil
133133
#endif // WIL_ENABLE_EXCEPTIONS
134134

135135
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
136+
136137
// Returns tokenHandle or the effective thread token if tokenHandle is null.
137138
// Note, this returns an token handle who's lifetime is managed independently
138139
// and it may be a pseudo token, don't free it!

tests/ComTests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ IAlways : public IUnknown
637637
STDMETHOD_(void, Always)() = 0;
638638
};
639639

640-
class __declspec(uuid("ececcc6a-5193-4d14-b38e-ed1460c20b00")) // non-implemented to allow QI for the class to be attempted (and fail)
640+
class __declspec(empty_bases) __declspec(uuid("ececcc6a-5193-4d14-b38e-ed1460c20b00")) // non-implemented to allow QI for the class to be attempted (and fail)
641641
ComObject : witest::AllocatedObject,
642642
public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::RuntimeClassType::ClassicCom>,
643643
Microsoft::WRL::ChainInterfaces<IDerivedTest, ITest>,
@@ -648,7 +648,7 @@ ComObject : witest::AllocatedObject,
648648
COM_DECLSPEC_NOTHROW IFACEMETHODIMP_(void) Always() {}
649649
};
650650

651-
class __declspec(uuid("ececcc6a-5193-4d14-b38e-ed1460c20b01")) // non-implemented to allow QI for the class to be attempted (and fail)
651+
class __declspec(empty_bases) __declspec(uuid("ececcc6a-5193-4d14-b38e-ed1460c20b01")) // non-implemented to allow QI for the class to be attempted (and fail)
652652
WinRtObject : witest::AllocatedObject,
653653
public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::RuntimeClassType::WinRtClassicComMix>,
654654
ITest, IDerivedTest, ITestInspectable, IDerivedTestInspectable, IAlways, Microsoft::WRL::FtmBase>
@@ -661,7 +661,7 @@ WinRtObject : witest::AllocatedObject,
661661
COM_DECLSPEC_NOTHROW IFACEMETHODIMP_(void) Always() {}
662662
};
663663

664-
class NoCom : witest::AllocatedObject
664+
class __declspec(empty_bases) NoCom : witest::AllocatedObject
665665
{
666666
public:
667667
ULONG __stdcall AddRef()

tests/ResourceTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ ITest : public IUnknown
124124
STDMETHOD_(void, Test)() = 0;
125125
};
126126

127-
class PointerTestObject : witest::AllocatedObject,
127+
class __declspec(empty_bases) PointerTestObject : witest::AllocatedObject,
128128
public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::RuntimeClassType::ClassicCom>, ITest>
129129
{
130130
public:

tests/wiTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2870,7 +2870,7 @@ interface __declspec(uuid("EDCA4ADC-DF46-442A-A69D-FDFD8BC37B31")) IFakeObject :
28702870
STDMETHOD_(void, DoStuff)() = 0;
28712871
};
28722872

2873-
class ArrayTestObject : witest::AllocatedObject,
2873+
class __declspec(empty_bases) ArrayTestObject : witest::AllocatedObject,
28742874
public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::RuntimeClassType::ClassicCom>, IFakeObject>
28752875
{
28762876
public:

0 commit comments

Comments
 (0)