]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/validate.h
Validate return types of overloaded functions
[libs/gl.git] / source / glsl / validate.h
index b64973276536e2dbc653ac30f142866ccb3b3fcb..a8c6f11c6a8e12602431abb6fd22a93b280e55fd 100644 (file)
@@ -14,11 +14,14 @@ class Validator: protected TraversingVisitor
 {
 protected:
        Stage *stage;
+       Node *last_provoker;
 
        Validator();
 
-       void diagnose(Node &, Diagnostic::Severity, const std::string &);
+       void diagnose(Node &, Node &, Diagnostic::Severity, const std::string &);
+       void diagnose(Node &n, Diagnostic::Severity s, const std::string &m) { diagnose(n, n, s, m); }
        void error(Node &n, const std::string &m) { diagnose(n, Diagnostic::ERR, m); }
+       void add_info(Node &, const std::string &);
 };
 
 class TypeValidator: private Validator
@@ -45,6 +48,7 @@ private:
 
        std::map<Block *, BlockDeclarationMap> declarations;
        std::map<std::string, InterfaceBlock *> interface_blocks;
+       std::map<std::string, FunctionDeclaration *> overloaded_functions;
        bool anonymous_block;
 
 public: