From: Aaron Puchert Date: Sun, 11 Sep 2022 18:44:36 +0000 (+0200) Subject: [libcxxabi] Fix forced_unwind3.pass.cpp compilation error X-Git-Tag: upstream/17.0.6~33834 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4491bb19df17beeb35cc84f4928fee06854762b3;p=platform%2Fupstream%2Fllvm.git [libcxxabi] Fix forced_unwind3.pass.cpp compilation error Under some circumstances there is no struct _Unwind_Exception, it's just an alias to another struct. This would result in an error like this: libcxxabi/test/forced_unwind3.pass.cpp:50:77: error: typedef '_Unwind_Exception' cannot be referenced with a struct specifier static _Unwind_Reason_Code stop(int, _Unwind_Action actions, type, struct _Unwind_Exception*, struct _Unwind_Context*, ^ <...>/lib/clang/15.0.0/include/unwind.h:68:38: note: declared here typedef struct _Unwind_Control_Block _Unwind_Exception; /* Alias */ ^ This seems to have been an issue since the test was first added in D109856, except that it didn't surface with Clang 14 because the code is filtered out by the preprocessor if `__clang_major__ < 15`. Reviewed By: danielkiss, mstorsjo, #libc_abi, ldionne Differential Revision: https://reviews.llvm.org/D132873 --- diff --git a/libcxxabi/test/forced_unwind3.pass.cpp b/libcxxabi/test/forced_unwind3.pass.cpp index 50f7139..91bb74c 100644 --- a/libcxxabi/test/forced_unwind3.pass.cpp +++ b/libcxxabi/test/forced_unwind3.pass.cpp @@ -47,7 +47,7 @@ struct Stop { // libunwind while _Unwind_Exception_Class in libgcc. typedef typename std::tuple_element<2, std::tuple>::type type; - static _Unwind_Reason_Code stop(int, _Unwind_Action actions, type, struct _Unwind_Exception*, struct _Unwind_Context*, + static _Unwind_Reason_Code stop(int, _Unwind_Action actions, type, _Unwind_Exception*, struct _Unwind_Context*, void*) { if (actions & _UA_END_OF_STACK) { assert(destructorCalled == true);