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
Copy file name to clipboardExpand all lines: clang-tools-extra/test/clang-tidy/checkers/portability/avoid-platform-specific-fundamental-types-chars.cpp
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: avoid using platform-dependent character type 'char'; consider using 'char8_t' for text or 'std::byte' for bytes [portability-avoid-platform-specific-fundamental-types]
174
174
}
175
175
176
+
// Test template specializations with char types
177
+
template<typename T>
178
+
voidtemplate_function(T param) {}
179
+
180
+
template<>
181
+
void template_function<char>(char param) {
182
+
// CHECK-MESSAGES: :[[@LINE-1]]:24: warning: avoid using platform-dependent character type 'char'; consider using 'char8_t' for text or 'std::byte' for bytes
183
+
// CHECK-MESSAGES: :[[@LINE-2]]:30: warning: avoid using platform-dependent character type 'char'; consider using 'char8_t' for text or 'std::byte' for bytes
184
+
}
185
+
176
186
// Test that integer and float types are NOT flagged when their options are disabled
0 commit comments