mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Merge branch 'master' into sd90
This commit is contained in:
commit
882050ba48
3 changed files with 12 additions and 1 deletions
|
@ -93,7 +93,7 @@ public class ReturnChecker extends AbstractAstFunctionChecker {
|
||||||
public int visit(IASTStatement stmt) {
|
public int visit(IASTStatement stmt) {
|
||||||
if (stmt instanceof IASTReturnStatement) {
|
if (stmt instanceof IASTReturnStatement) {
|
||||||
IASTReturnStatement ret = (IASTReturnStatement) stmt;
|
IASTReturnStatement ret = (IASTReturnStatement) stmt;
|
||||||
boolean hasValue = ret.getReturnValue() != null;
|
boolean hasValue = ret.getReturnArgument() != null;
|
||||||
if (hasret == false && hasValue) {
|
if (hasret == false && hasValue) {
|
||||||
hasret = true;
|
hasret = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,4 +289,13 @@ public class ReturnCheckerTest extends CheckerTestCase {
|
||||||
loadCodeAndRunCpp(getAboveComment());
|
loadCodeAndRunCpp(getAboveComment());
|
||||||
checkNoErrors();
|
checkNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #include <vector>
|
||||||
|
// std::vector<int> f() {
|
||||||
|
// return {1,2,3};
|
||||||
|
// }
|
||||||
|
public void testReturnInitializerList() {
|
||||||
|
loadCodeAndRunCpp(getAboveComment());
|
||||||
|
checkNoErrors();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1311,6 +1311,8 @@ public class CModelManager implements IResourceChangeListener, IContentTypeChang
|
||||||
}
|
}
|
||||||
|
|
||||||
private void preDeleteProject(IProject project) {
|
private void preDeleteProject(IProject project) {
|
||||||
|
// remove binary parsers
|
||||||
|
binaryParsersMap.remove(project);
|
||||||
// stop the binary runner for this project
|
// stop the binary runner for this project
|
||||||
removeBinaryRunner(project);
|
removeBinaryRunner(project);
|
||||||
// stop indexing jobs for this project
|
// stop indexing jobs for this project
|
||||||
|
|
Loading…
Add table
Reference in a new issue