]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/generate.cpp
Remove the ParenthesizedExpression node type
[libs/gl.git] / source / glsl / generate.cpp
index c670bc1a814ee1002eac71285c9002fe568c1968..9dff1e607ae40f6fd7019cdbac2f2338ff81de23 100644 (file)
@@ -619,12 +619,6 @@ void ExpressionResolver::visit(Literal &literal)
                resolve(literal, find_type(BasicTypeDeclaration::FLOAT, 32), false);
 }
 
-void ExpressionResolver::visit(ParenthesizedExpression &parexpr)
-{
-       TraversingVisitor::visit(parexpr);
-       resolve(parexpr, parexpr.expression->type, parexpr.expression->lvalue);
-}
-
 void ExpressionResolver::visit(VariableReference &var)
 {
        if(var.declaration)
@@ -986,6 +980,15 @@ void FunctionResolver::visit(FunctionDeclaration &func)
        vector<FunctionDeclaration *> &decls = declarations[key];
        if(func.definition==&func)
        {
+               if(stage_decl && stage_decl->definition)
+               {
+                       if(!func.overrd)
+                               stage->diagnostics.push_back(Diagnostic(Diagnostic::WARN, func.source, func.line,
+                                       format("Overriding function '%s' without the override keyword is deprecated", key)));
+                       if(!stage_decl->definition->virtua)
+                               stage->diagnostics.push_back(Diagnostic(Diagnostic::WARN, func.source, func.line,
+                                       format("Overriding function '%s' not declared as virtual is deprecated", key)));
+               }
                stage_decl = &func;
 
                // Set all previous declarations to use this definition.