voltur01 wrote:

Hi, digging into this a bit more, it looks like handling of builtins is 
different in C and C++ mode: in C mode attributes are initialized earlier and 
are available for the validation, while in C++ this is skipped, so that the 
format attribute is only added after the validation.

I removed the hardcoded attributes from this patch and added my local fix as a 
demonstration - it extends the validation logic to expect that builtins and the 
special asprintf-like functions will get the attribute eventually.

Other ways to fix would be to move validation or addition of implicit 
attributes around, which is a bigger structural change.

Please let me know what you think, thanks!

https://github.com/llvm/llvm-project/pull/194003
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to