<div dir="ltr">Hi,<div><br></div><div>the attached patch delays semantic analysis of __fastcall until after MergeFunctionDecl() has been called, PR20386.</div><div><br></div><div>The motivation is code like this in a .c file:</div>
<div><br></div><div><div>void __fastcall CrcGenerateTable(void);</div><div>void __fastcall CrcGenerateTable() {}</div></div><div><br></div><div>Without this patch, __fastcall is analyzed before the definition of CrcGenerateTable() is merged with the declaration, so Sema thinks the function doesn't have a prototype. Since the error is only emitted on FunctionNoProto functions, and functions in C++ or functions with more than 0 arguments have a proto, this is only an issue for functions with 0 parameters in C files. See the bug for some more notes.</div>
<div><br></div><div>(A side effect of moving the diagnostic is that the diagnostic now points at the function instead of the attribute, and that the attribute is no longer marked invalid. Neither seems like a problem.)</div>
<div><br></div><div>Nico</div></div>