mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 333255 - Parser gives bogus warning about no return value when SFINAE is used
This commit is contained in:
parent
0989509cda
commit
b414adbb13
1 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,7 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
|
|||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDefinition;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.core.dom.ast.gnu.IGNUASTCompoundStatementExpression;
|
||||
|
@ -124,6 +125,8 @@ public class ReturnChecker extends AbstractAstFunctionChecker {
|
|||
*/
|
||||
@Override
|
||||
protected void processFunction(IASTFunctionDefinition func) {
|
||||
if (func.getParent() instanceof ICPPASTTemplateDeclaration)
|
||||
return; // if it is template get out of here
|
||||
ReturnStmpVisitor visitor = new ReturnStmpVisitor(func);
|
||||
func.accept(visitor);
|
||||
if (!visitor.hasret) {
|
||||
|
|
Loading…
Add table
Reference in a new issue