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

2020-07-08 Thread Bruno Ricci via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ba6fb929396: [clang] Fix a crash when passing a C structure of incompatible type to a… (authored by ArcsinX, committed by riccibruno). Changed prior to commit:

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

2020-07-08 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D82805#2139243 , @riccibruno wrote: > Do you want me to commit it for you? Yes, thank you. > If so I need a name and an email for the attribution. Aleksandr Platonov Repository: rG LLVM Github Monorepo CHANGES SINCE

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

2020-07-08 Thread Bruno Ricci via Phabricator via cfe-commits
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 >

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

2020-07-08 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82805/new/ https://reviews.llvm.org/D82805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2020-07-01 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 274789. ArcsinX added a comment. Try conversion function only in C++. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82805/new/ https://reviews.llvm.org/D82805 Files: clang/lib/Sema/SemaInit.cpp

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

2020-07-01 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked 3 inline comments as done. ArcsinX added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4539 +if (CXXRecordDecl *T2RecordDecl = +dyn_cast(T2RecordType->getDecl())) { + const auto = T2RecordDecl->getVisibleConversionFunctions();

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

2020-06-30 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: clang/test/Sema/init-ref-c.c:8 +} \ No newline at end of file ArcsinX wrote: > riccibruno wrote: > > I think it would be better to name this test `varargs-arm.c` since this bug > > can only happen with the

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

2020-06-30 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked an inline comment as done. ArcsinX added inline comments. Comment at: clang/test/Sema/init-ref-c.c:8 +} \ No newline at end of file riccibruno wrote: > I think it would be better to name this test `varargs-arm.c` since this bug > can only happen

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

2020-06-30 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4539 +if (CXXRecordDecl *T2RecordDecl = +dyn_cast(T2RecordType->getDecl())) { + const auto = T2RecordDecl->getVisibleConversionFunctions(); ArcsinX wrote: > riccibruno

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

2020-06-30 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 274338. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82805/new/ https://reviews.llvm.org/D82805 Files: clang/lib/Sema/SemaInit.cpp clang/test/Sema/init-ref-c.c Index: clang/test/Sema/init-ref-c.c

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

2020-06-29 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked an inline comment as done. ArcsinX added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4539 +if (CXXRecordDecl *T2RecordDecl = +dyn_cast(T2RecordType->getDecl())) { + const auto = T2RecordDecl->getVisibleConversionFunctions();

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

2020-06-29 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 274250. ArcsinX added a comment. Fix format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82805/new/ https://reviews.llvm.org/D82805 Files: clang/lib/Sema/SemaInit.cpp clang/test/Sema/init-ref-c.c Index: clang/test/Sema/init-ref-c.c

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

2020-06-29 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4539 +if (CXXRecordDecl *T2RecordDecl = +dyn_cast(T2RecordType->getDecl())) { + const auto = T2RecordDecl->getVisibleConversionFunctions(); I cannot reproduce this with

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

2020-06-29 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added a reviewer: rsmith. ArcsinX added a project: clang. Herald added a subscriber: cfe-commits. ArcsinX edited the summary of this revision. `__builtin_va_*()` and `__builtin_ms_va_*()` declared as functions with reference parameters. This patch fix