[PATCH] D82805: [clang] Fix a crash on passing C structure of incompatible type to function with reference parameter

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 8 08:26:16 PDT 2020


riccibruno accepted this revision.
riccibruno added a comment.
This revision is now accepted and ready to land.

This LGTM, with a few wording nits.

> This patch fix clang crashes at using these functions in C and passing incompatible structures as parameters in case of __builtin_va_list/__builtin_ms_va_list are structures.

This patch fix a crash when using these functions in C where an argument of structure type is incompatible with the parameter type.

Do you want me to commit it for you? If so I need a name and an email for the attribution.



================
Comment at: clang/lib/Sema/SemaInit.cpp:4698
+/// We also can get here in C if we call builtin which is declared as
+/// a function with reference arguments (e.g. __builtin_va_end()).
 static void TryReferenceInitializationCore(Sema &S,
----------------
s/call builtin/call a builtin/
s/with reference arguments/with a parameter of reference type/

The second wording change is important since "argument" != "parameter".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82805/new/

https://reviews.llvm.org/D82805





More information about the cfe-commits mailing list