diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-12-02 16:30:19 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-12-02 17:21:35 +0100 |
commit | dcd95f8d501677ed1a5054cd5da80964a8794d9e (patch) | |
tree | 2064a2d4628ad103af50e0bad8ea97b05b76a288 /src/libs/glsl/glslsemantic.h | |
parent | 1cbfa220fc8b88bfdf880fed87fe7d946bfdd023 (diff) | |
download | qt-creator-dcd95f8d501677ed1a5054cd5da80964a8794d9e.tar.gz |
Handle array types and some initial work on implicit conversions.
Diffstat (limited to 'src/libs/glsl/glslsemantic.h')
-rw-r--r-- | src/libs/glsl/glslsemantic.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libs/glsl/glslsemantic.h b/src/libs/glsl/glslsemantic.h index d3b0ce3214..49bfe67739 100644 --- a/src/libs/glsl/glslsemantic.h +++ b/src/libs/glsl/glslsemantic.h @@ -30,6 +30,7 @@ #define GLSLSEMANTIC_H #include "glslastvisitor.h" +#include "glsltype.h" namespace GLSL { @@ -43,8 +44,15 @@ public: ExprResult(const Type *type = 0, bool isConstant = false) : type(type), isConstant(isConstant) {} - bool isValid() const { return type != 0; } - operator bool() const { return type != 0; } + bool isValid() const { + if (! type) + return false; + else if (type->asUndefinedType() != 0) + return false; + return true; + } + + operator bool() const { return isValid(); } const Type *type; bool isConstant; |