================ @@ -0,0 +1,22 @@ +/*===---- stddefer.h - Standard header for 'defer' -------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __CLANG_STDDEFER_H +#define __CLANG_STDDEFER_H + +/* Provide 'defer' if '_Defer' is supported and update the predefined + macro accordingly. */ +#if defined __STDC_DEFER_TS25755__ && __STDC_DEFER_TS25755__ == 1 +#undef __STDC_DEFER_TS25755__ ---------------- Sirraide wrote:
I suppose it should be enough to just check if it’s defined yes. > We don't want to redefine `__STDC_DEFER_TS25755__` to 2 because we're not > providing `defer` as a keyword, Ah, I thought it should be defined to `2` if `defer` has the same meaning as `_Defer`, irrespective of whether it’s a proper keyword or a macro, but I think you’re right, it should just be `1` in our case. https://github.com/llvm/llvm-project/pull/162848 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
