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
The C++ Core Guidelines are there to help you write better and safer code. However, you might find an instance where a rule or a profile shouldn't be applied. It's easy to suppress it directly in the code. You can use the `[[gsl::suppress]]` attribute to keep C++ Core Check from detecting and reporting any violation of a rule in the following code block. You can mark individual statements to suppress specific rules. You can even suppress the entire bounds profile by writing `[[gsl::suppress(bounds)]]` without including a specific rule number.
107
+
The C++ Core Guidelines are there to help you write better and safer code. However, you might find an instance where a rule or a profile shouldn't be applied. It's easy to suppress it directly in the code. You can use the `[[gsl::suppress]]` attribute to keep C++ Core Check from detecting and reporting any violation of a rule in the following code block. You can mark individual statements to suppress specific rules. You can even suppress the entire bounds profile by writing `[[gsl::suppress("bounds")]]` without including a specific rule number.
108
108
109
109
## Supported rule sets
110
110
@@ -197,10 +197,10 @@ The Microsoft C++ compiler has limited support for the `[[gsl::suppress]]` attri
197
197
198
198
```cpp
199
199
// Suppress only warnings from the 'r.11' rule in expression.
200
-
[[gsl::suppress(r.11)]] newint;
200
+
[[gsl::suppress("r.11")]] newint;
201
201
202
202
// Suppress all warnings from the 'r' rule group (resource management) in block.
203
-
[[gsl::suppress(r)]]
203
+
[[gsl::suppress("r")]]
204
204
{
205
205
new int;
206
206
}
@@ -209,7 +209,7 @@ The Microsoft C++ compiler has limited support for the `[[gsl::suppress]]` attri
209
209
// For declarations, you might need to use the surrounding block.
210
210
// Macros are not expanded inside of attributes.
211
211
// Use plain numbers instead of macros from the warnings.h.
0 commit comments