mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
fix one more clang-tidy issue
This commit is contained in:
parent
2efa7a51ff
commit
4bf96522d5
@ -22,8 +22,11 @@ if (USE_GPERF)
|
||||
BYPRODUCTS "${CMAKE_CURRENT_SOURCE_DIR}/tldLookup.gperf"
|
||||
)
|
||||
add_custom_target(generate-tldlookup ${GPERF} tldLookup.gperf --output-file=tldLookup.generated.cpp && clang-format -i tldLookup.generated.cpp
|
||||
# for clang-tidy, since string.h is deprecated
|
||||
&& sed -i 's/\#include <string.h>/\#include <cstring>/g' tldLookup.generated.cpp
|
||||
# apply these clang-tidy fixes to the file generated by gperf:
|
||||
# - use cstring since string.h is deprecated
|
||||
# - return nullptr instead of 0
|
||||
&& sed -i -e 's/\#include <string.h>/\#include <cstring>/g' tldLookup.generated.cpp -e 's/return 0\;/return nullptr\;/g' tldLookup.generated.cpp
|
||||
|
||||
SOURCES tldLookup.gperf
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
# BYPRODUCTS "${CMAKE_CURRENT_SOURCE_DIR}/tldLookup.generated.cpp"
|
||||
|
@ -110733,6 +110733,6 @@ const char * TopLevelDomainLookupHash::isValid(const char * str, size_t len)
|
||||
return s;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
#line 5060 "tldLookup.gperf"
|
||||
|
Loading…
Reference in New Issue
Block a user