Skip to content

Commit c868336

Browse files
committed
another test case
1 parent e4f9a80 commit c868336

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang-tools-extra/test/clang-tidy/checkers/portability/avoid-platform-specific-fundamental-types-chars.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ void test_comprehensive_cases() {
136136
// Test auto with initializer
137137
auto auto_char = char{'x'};
138138
// CHECK-MESSAGES: :[[@LINE-1]]:20: 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]
139+
140+
// Verify auto without initializer isn't flagged
141+
auto auto_nonexplicit_char = 'x';
139142

140143
char brace_init_char{};
141144
// 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]

0 commit comments

Comments
 (0)