projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e7ec3c
)
Check that the return type of function definition matches its prototype.
author
Eric Anholt
<eric@anholt.net>
Wed, 14 Apr 2010 23:19:19 +0000
(16:19 -0700)
committer
Eric Anholt
<eric@anholt.net>
Wed, 14 Apr 2010 23:19:19 +0000
(16:19 -0700)
Doesn't fix any testcases, but fixes a FINISHME.
ast_to_hir.cpp
patch
|
blob
|
history
diff --git
a/ast_to_hir.cpp
b/ast_to_hir.cpp
index b150ba36908b96e90d8745940530fa8b7356a2c6..251845acd9d12a673043a994a168f5624bcecdaa 100644
(file)
--- a/
ast_to_hir.cpp
+++ b/
ast_to_hir.cpp
@@
-1864,7
+1864,14
@@
ast_function::hir(exec_list *instructions,
iter_b.next();
}
- /* FINISHME: Compare return types. */
+ if (sig->return_type != return_type) {
+ YYLTYPE loc = this->get_location();
+
+ _mesa_glsl_error(& loc, state,
+ "function `%s' return type doesn't match "
+ "prototype",
+ name);
+ }
if (is_definition && (sig->definition != NULL)) {
YYLTYPE loc = this->get_location();