CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
83 lines
2.0 KiB
C++
83 lines
2.0 KiB
C++
// RUN: %check_clang_tidy %s bugprone-suspicious-missing-comma %t
|
|
|
|
const char* Cartoons[] = {
|
|
"Bugs Bunny",
|
|
"Homer Simpson",
|
|
"Mickey Mouse",
|
|
"Bart Simpson",
|
|
"Charlie Brown" // There is a missing comma here.
|
|
"Fred Flintstone",
|
|
"Popeye",
|
|
};
|
|
// CHECK-MESSAGES: :[[@LINE-4]]:3: warning: suspicious string literal, probably missing a comma [bugprone-suspicious-missing-comma]
|
|
|
|
const wchar_t* Colors[] = {
|
|
L"Red", L"Yellow", L"Blue", L"Green", L"Purple", L"Rose", L"White", L"Black"
|
|
};
|
|
|
|
// The following array should not trigger any warnings. There is more than 5
|
|
// elements, but they are all concatenated string literals.
|
|
const char* HttpCommands[] = {
|
|
"GET / HTTP/1.0\r\n"
|
|
"\r\n",
|
|
|
|
"GET /index.html HTTP/1.0\r\n"
|
|
"\r\n",
|
|
|
|
"GET /favicon.ico HTTP/1.0\r\n"
|
|
"header: dummy"
|
|
"\r\n",
|
|
|
|
"GET /index.html-en HTTP/1.0\r\n"
|
|
"\r\n",
|
|
|
|
"GET /index.html-fr HTTP/1.0\r\n"
|
|
"\r\n",
|
|
|
|
"GET /index.html-es HTTP/1.0\r\n"
|
|
"\r\n",
|
|
};
|
|
|
|
// This array is too small to trigger a warning.
|
|
const char* SmallArray[] = {
|
|
"a" "b", "c"
|
|
};
|
|
|
|
// Parentheses should be enough to avoid warnings.
|
|
const char* ParentheseArray[] = {
|
|
("a" "b"), "c",
|
|
("d"
|
|
"e"
|
|
"f"),
|
|
"g", "h", "i", "j", "k", "l"
|
|
};
|
|
|
|
// Indentation should be enough to avoid warnings.
|
|
const char* CorrectlyIndentedArray[] = {
|
|
"This is a long message "
|
|
"which is spanning over multiple lines."
|
|
"And this should be fine.",
|
|
"a", "b", "c", "d", "e", "f",
|
|
"g", "h", "i", "j", "k", "l"
|
|
};
|
|
|
|
const char* IncorrectlyIndentedArray[] = {
|
|
"This is a long message "
|
|
"which is spanning over multiple lines."
|
|
"And this should be fine.",
|
|
"a", "b", "c", "d", "e", "f",
|
|
"g", "h", "i", "j", "k", "l"
|
|
};
|
|
// CHECK-MESSAGES: :[[@LINE-6]]:3: warning: suspicious string literal, probably missing a comma [bugprone-suspicious-missing-comma]
|
|
|
|
const char* TooManyConcatenatedTokensArray[] = {
|
|
"Dummy line",
|
|
"Dummy line",
|
|
"a" "b" "c" "d" "e" "f",
|
|
"g" "h" "i" "j" "k" "l",
|
|
"Dummy line",
|
|
"Dummy line",
|
|
"Dummy line",
|
|
"Dummy line",
|
|
};
|