Skip to content

Commit a9f9949

Browse files
authored
clang-tidy analysis did not contain vf_*.h header files (danmar#7361)
1 parent e792bb8 commit a9f9949

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.clang-tidy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ Checks: >
7070
-readability-suspicious-call-argument,
7171
-readability-uppercase-literal-suffix
7272
WarningsAsErrors: '*'
73-
HeaderFilterRegex: '(cli|gui|lib|oss-fuzz|test|triage)\/[a-z]+\.h'
73+
HeaderFilterRegex: '(cli|gui|lib|oss-fuzz|test|triage)\/[a-z_]+\.h'
74+
ExcludeHeaderFilterRegex: 'ui_.*.h'
7475
CheckOptions:
7576
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
7677
value: '1'

cmake/clang_tidy.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ if(RUN_CLANG_TIDY_NAMES)
2525
endif()
2626
message(STATUS "NPROC=${NPROC}")
2727

28+
# TODO: exclude moc_*.cpp
29+
# TODO: exclude mocs_compilation.cpp
2830
# disable all compiler warnings since we are just interested in the tidy ones
29-
add_custom_target(run-clang-tidy ${Python_EXECUTABLE} ${RUN_CLANG_TIDY} -p=${CMAKE_BINARY_DIR} -j ${NPROC} -quiet)
31+
add_custom_target(run-clang-tidy
32+
${Python_EXECUTABLE} ${RUN_CLANG_TIDY} -p=${CMAKE_BINARY_DIR} -j ${NPROC} -quiet
33+
USES_TERMINAL)
3034
if(BUILD_GUI)
3135
add_dependencies(run-clang-tidy gui-build-deps)
3236
if(BUILD_TRIAGE)

lib/vf_common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ namespace ValueFlow
4040
{
4141
bool getMinMaxValues(const ValueType* vt, const Platform& platform, MathLib::bigint& minValue, MathLib::bigint& maxValue);
4242

43-
MathLib::bigint truncateIntValue(MathLib::bigint value, size_t value_size, const ValueType::Sign dst_sign);
43+
MathLib::bigint truncateIntValue(MathLib::bigint value, size_t value_size, ValueType::Sign dst_sign);
4444

4545
Token * valueFlowSetConstantValue(Token *tok, const Settings &settings);
4646

47-
Value castValue(Value value, const ValueType::Sign sign, nonneg int bit);
47+
Value castValue(Value value, ValueType::Sign sign, nonneg int bit);
4848

4949
std::string debugString(const Value& v);
5050

0 commit comments

Comments
 (0)