Issue more sensible error message for varying pointers in exported functions.

This commit is contained in:
Matt Pharr
2012-05-18 12:00:11 -07:00
parent 4d1eb94dfd
commit 99f57cfda6

View File

@@ -554,8 +554,10 @@ static void
lCheckForVaryingParameter(const Type *type, const std::string &name,
SourcePos pos) {
if (lRecursiveCheckValidParamType(type)) {
const Type *t = type->GetBaseType();
if (CastType<StructType>(t))
if (CastType<PointerType>(type))
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 "
"in an exported function.", name.c_str());
else