mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
clang-tidy module: add test for ostringstream check
This commit is contained in:
@@ -13,3 +13,4 @@ endfunction()
|
||||
add_run_clang_tidy_test(cmake-use-cmstrlen)
|
||||
add_run_clang_tidy_test(cmake-use-cmsys-fstream)
|
||||
add_run_clang_tidy_test(cmake-use-bespoke-enum-class)
|
||||
add_run_clang_tidy_test(cmake-ostringstream-use-cmstrcat)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
cmake-ostringstream-use-cmstrcat.cxx:5:3: warning: use strings and cmStrCat() instead of std::ostringstream [cmake-ostringstream-use-cmstrcat]
|
||||
std::ostringstream test;
|
||||
^
|
||||
cmake-ostringstream-use-cmstrcat.cxx:8:13: warning: use strings and cmStrCat() instead of std::ostringstream [cmake-ostringstream-use-cmstrcat]
|
||||
void check2(std::ostringstream& test2)
|
||||
^
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <sstream>
|
||||
|
||||
void check()
|
||||
{
|
||||
std::ostringstream test;
|
||||
}
|
||||
|
||||
void check2(std::ostringstream& test2)
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user