Miscellaneous-NoStdStringInternalsΒΆ
Do not rely on std::string internals when converting to char*
Required inputs: IR
operator[] of std::string should not be used to retrieve
a reference or pointer into the string contents.
Instead, use the c_str() or data() member functions.
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
cpp_string_internals |
Use of std::string operator[], use c_str() instead. |
None |
False |
Options
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.