aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/clangparser/clangdebugutils.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-06-17 17:31:23 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-06-24 10:36:07 +0200
commit8f85650fe8066c5903e865aedb3d92d863243996 (patch)
treeefdef02a00572d16a46f5309fc30b7ce0408bea7 /sources/shiboken6/ApiExtractor/clangparser/clangdebugutils.cpp
parent12e370d38ab0f88c6ae555793ed5ac6a18343255 (diff)
shiboken6: Fix static analysis warnings
- Initialize variables - Use auto * - Use const references to prevent copies - Remove const from function returns - Remove repeated return types - Fix else after return/throw - Make functions const/static where appropriate - Add missing override - Fix some invocations of static methods - Fix some int types (qsizetype) to avoid lossy conversions - Minor cleanups - Remove some macros Change-Id: I414b8451703b136f135383289de49e743e84fb3a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/clangdebugutils.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangdebugutils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangdebugutils.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangdebugutils.cpp
index 3c002da9c..7c6996373 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangdebugutils.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangdebugutils.cpp
@@ -146,10 +146,10 @@ QDebug operator<<(QDebug s, const CXSourceLocation &location)
{
QDebugStateSaver saver(s);
s.nospace();
- CXFile file; // void *
- unsigned line;
- unsigned column;
- unsigned offset;
+ CXFile file{}; // void *
+ unsigned line{};
+ unsigned column{};
+ unsigned offset{};
clang_getExpansionLocation(location, &file, &line, &column, &offset);
const CXString cxFileName = clang_getFileName(file);
// Has been observed to be 0 for invalid locations