You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make tag in gsl::suppress(tag) be a string literal #2042
The current specification In.force: Enforcement explicitly requires "message" in [[gsl::suppress(tag, justification: "message")]] to be a string literal, but doesn't require tag to be a string literal i.e., [[gsl::suppress("tag", justification: "message")]].
Clang already requires tag to be a string, rejecting something like [[gsl::suppress(R.11)]], requiring [[gsl::suppress("R.11")]]. The current GSL implementation therefore needs to special-case this:
//// make suppress attributes parse for some compilers// Hopefully temporary until suppression standardization occurs//
#if defined(__clang__)
#defineGSL_SUPPRESS(x) [[gsl::suppress("#x")]]
#else
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__NVCC__)
#defineGSL_SUPPRESS(x) [[gsl::suppress(x)]]
#else
#defineGSL_SUPPRESS(x)
#endif// _MSC_VER
#endif// __clang__
Activity
hsutter commentedon Jul 27, 2023
Editors call: We will consider this in connection with #2044 and #2048.
hsutter commentedon Feb 15, 2024
Editors call: We agree, it should be a string literal. We'll fix the Guidelines to show that.
Make `suppress` tag a string literal, closes isocpp#2042