summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-09-30 20:09:48 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-10-01 14:31:33 +0200
commitc4e1721c2431b5fb3500e77c3f0e1cd2c0fcd1b7 (patch)
treeacafe4759e667ecf4e93a55eba989fd57970fff5
parentc8da53e6e23cce280d1ad518265003ee006bd6e0 (diff)
lupdate: Fix return-type warningv6.0.0-alpha1
Fix "warning: control reaches end of non-void function" in lookForContext by unconditionally returning the result of exploreBases. The result of lookForContext is checked for emptiness at the call sites. Change-Id: I115710e4093c7ebf0f66079fadb3c3dacc4622d4 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
-rw-r--r--src/linguist/lupdate/clangtoolastreader.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/linguist/lupdate/clangtoolastreader.cpp b/src/linguist/lupdate/clangtoolastreader.cpp
index 2a1a14236..ec90902bf 100644
--- a/src/linguist/lupdate/clangtoolastreader.cpp
+++ b/src/linguist/lupdate/clangtoolastreader.cpp
@@ -129,9 +129,7 @@ namespace LupdatePrivate
};
*/
// For recordDecl corresponding to class C, the following gives access to class A
- context = exploreBases(recordDecl, sm);
- if (!context.isEmpty())
- return context;
+ return exploreBases(recordDecl, sm);
}
}