Issue more sensible error message for varying pointers in exported functions.
This commit is contained in:
@@ -554,8 +554,10 @@ static void
|
|||||||
lCheckForVaryingParameter(const Type *type, const std::string &name,
|
lCheckForVaryingParameter(const Type *type, const std::string &name,
|
||||||
SourcePos pos) {
|
SourcePos pos) {
|
||||||
if (lRecursiveCheckValidParamType(type)) {
|
if (lRecursiveCheckValidParamType(type)) {
|
||||||
const Type *t = type->GetBaseType();
|
if (CastType<PointerType>(type))
|
||||||
if (CastType<StructType>(t))
|
Error(pos, "Varying pointer type parameter \"%s\" is illegal "
|
||||||
|
"in an exported function.", name.c_str());
|
||||||
|
else if (CastType<StructType>(type->GetBaseType()))
|
||||||
Error(pos, "Struct parameter \"%s\" with varying member(s) is illegal "
|
Error(pos, "Struct parameter \"%s\" with varying member(s) is illegal "
|
||||||
"in an exported function.", name.c_str());
|
"in an exported function.", name.c_str());
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user