Lines Matching defs:line
35 int line,
41 modifiers.checkPermitted(context, line, permitted, /*permittedLayoutFlags=*/0);
44 context.fErrors->error(line, "functions cannot be both 'inline' and 'noinline'");
50 static bool check_return_type(const Context& context, int line, const Type& returnType) {
53 errors.error(line, "functions may not return type '" + returnType.displayName() + "'");
57 errors.error(line, "functions may not return structs containing arrays");
62 errors.error(line, "functions may not return opaque type '" + returnType.displayName() +
136 static bool check_main_signature(const Context& context, int line, const Type& returnType,
166 errors.error(line, "'main' must return: 'vec4', 'float4', or 'half4'");
171 errors.error(line, "'main' parameter must be 'vec4', 'float4', or 'half4'");
179 errors.error(line, "'main' must return: 'vec4', 'float4', or 'half4'");
186 errors.error(line, "'main' parameters must be (float2, (vec4|float4|half4)?)");
194 errors.error(line, "'main' must return: 'vec4', 'float4', or 'half4'");
200 errors.error(line, "'main' parameters must be (vec4|float4|half4, "
213 errors.error(line, "shader 'main' must be main() or main(float2)");
220 errors.error(line, "shader 'main' must have zero parameters");
235 int line,
253 errors.error(line, "symbol '" + name + "' was already defined");
277 FunctionDeclaration invalidDecl(line,
283 errors.error(line,
290 errors.error(line,
297 errors.error(line, "duplicate definition of " + other->description());
307 FunctionDeclaration::FunctionDeclaration(int line,
313 : INHERITED(line, kSymbolKind, name, /*type=*/nullptr)
325 int line,
333 if (!check_modifiers(context, line, *modifiers) ||
334 !check_return_type(context, line, *returnType) ||
336 (isMain && !check_main_signature(context, line, *returnType, parameters)) ||
337 !find_existing_declaration(context, symbols, line, name, parameters, returnType, &decl)) {
348 auto result = std::make_unique<FunctionDeclaration>(line, modifiers, name,