aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/clangparser/clangutils.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-16 15:45:10 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-17 10:07:55 +0000
commit181fa70b7ba06c92c3c0fdc4c70081b14e4b1bdf (patch)
tree3342c5f2020cf693594554b4f96bff6e8f39cf9c /sources/shiboken2/ApiExtractor/clangparser/clangutils.cpp
parent9d4c604943d73cb1c8f1a6dfdf9129f92bed0661 (diff)
shiboken: Fix some clazy warnings
- Mixing const/non-const iterators - Do not use operator[] on temporaries of type QVector - Remove unused nontrivial variables - Add Q_FALLTHROUGH() - Potential detach in range-based for Change-Id: I89391fdda616f119eadd7de529eb6cee69343f85 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/clangparser/clangutils.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/clangutils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangutils.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangutils.cpp
index fdc8d3312..f30a585bc 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/clangutils.cpp
+++ b/sources/shiboken2/ApiExtractor/clangparser/clangutils.cpp
@@ -163,7 +163,7 @@ QVector<Diagnostic> getDiagnostics(CXTranslationUnit tu)
CXDiagnosticSeverity maxSeverity(const QVector<Diagnostic> &ds)
{
CXDiagnosticSeverity result = CXDiagnostic_Ignored;
- for (const Diagnostic d : ds) {
+ for (const Diagnostic& d : ds) {
if (d.severity > result)
result = d.severity;
}