[PATCH] D49354: [MinGW] Automatically mangle Windows-specific entry points as C

2018-07-15 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337146: [MinGW] Automatically mangle Windows-specific entry points as C (authored by mstorsjo, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r337146 - [MinGW] Automatically mangle Windows-specific entry points as C

2018-07-15 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Sun Jul 15 22:42:25 2018 New Revision: 337146 URL: http://llvm.org/viewvc/llvm-project?rev=337146=rev Log: [MinGW] Automatically mangle Windows-specific entry points as C This mangles entry points wmain, WinMain, wWinMain or DllMain as C functions, to match the ABI for

[PATCH] D49360: [analyzer] Add support for more basic_string API in DanglingInternalBufferChecker

2018-07-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Cool! I don't have a strong preference with respect to whitelist vs. blacklist; your approach is safer but listing functions that don't immediately invalidate the buffer would allow us to avoid

[PATCH] D49361: [analyzer][WIP] Detect pointers escaped after return statement execution in MallocChecker

2018-07-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Aha, so the destructors are called //after// the return statement! Makes sense. The return statement is available in `ExprEngine::processEndOfFunction()`, so i guess we could improve the `checkEndFunction()` callback to provide it, and then we wouldn't need any of those

[PATCH] D49361: [analyzer][WIP] Detect pointers escaped after return statement execution in MallocChecker

2018-07-15 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs created this revision. rnkovacs added reviewers: NoQ, xazax.hun, george.karpenkov. Herald added subscribers: mikhail.ramalho, a.sidorin, dkrupp, szepet, baloghadamsoftware, whisperity. Sometimes an object is destroyed right after the statement returning it is executed. This patch aims

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-15 Thread Andrew Comminos via Phabricator via cfe-commits
acomminos updated this revision to Diff 155616. acomminos added a comment. Remove `const` qualifier for SourceRange. Repository: rC Clang https://reviews.llvm.org/D48845 Files: include/clang/Sema/DeclSpec.h include/clang/Sema/ScopeInfo.h include/clang/Sema/Sema.h

[PATCH] D49360: [analyzer] Add support for more basic_string API in DanglingInternalBufferChecker

2018-07-15 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs created this revision. rnkovacs added reviewers: NoQ, xazax.hun, george.karpenkov. Herald added subscribers: mikhail.ramalho, a.sidorin, dkrupp, szepet, baloghadamsoftware, whisperity. A pointer referring to the elements of a `basic_string` may be invalidated by calling a non-const

[PATCH] D49354: [MinGW] Automatically mangle Windows-specific entry points as C

2018-07-15 Thread David Majnemer via Phabricator via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D49354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49356: [clang-tidy: modernize] Fix modernize-use-equals-default with {} brackets list initialization: patch

2018-07-15 Thread Idriss via Phabricator via cfe-commits
IdrissRio created this revision. IdrissRio added reviewers: aaron.ballman, hokein, alexfh. Herald added a subscriber: cfe-commits. Hello, i would like to suggest a fix for one of the checks in clang-tidy. The bug was reported in https://bugs.llvm.org/show_bug.cgi?id=38039 where you can find

[PATCH] D49355: Thread safety analysis: Allow lock upgrading and downgrading

2018-07-15 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, delesley. Herald added a subscriber: cfe-commits. We can now have methods that release a locked in shared mode and acquire it in exclusive mode or the other way around. The fix was just to release the locks before

[PATCH] D49354: [MinGW] Automatically mangle Windows-specific entry points as C

2018-07-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: majnemer, zturner, pcc, rnk, hans, compnerd, smeenai. This mangles entry points wmain, WinMain, wWinMain or DllMain as C functions, to match the ABI for these functions. We already did the same for these functions in MSVC mode, but we

[PATCH] D49348: Harden/relax clang/test/CodeGen/opt-record-MIR.c test

2018-07-15 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 155591. lebedev.ri added a comment. Simplify regex even more. Repository: rC Clang https://reviews.llvm.org/D49348 Files: test/CodeGen/opt-record-MIR.c Index: test/CodeGen/opt-record-MIR.c

[PATCH] D49348: Harden/relax clang/test/CodeGen/opt-record-MIR.c test

2018-07-15 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: anemet, aaron.ballman, hfinkel. Herald added a subscriber: cfe-commits. If the build path is short, `Line` field can end up fitting on the same line as `File`, but the `{{.*}}` would consume it. Keeping in mind

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. Aside from a small nit in the comments, LGTM. Comment at: include/clang/Sema/Sema.h:5608 + /// diagnostic is emitted. + bool DiagnoseUnusedLambdaCapture(const SourceRange CaptureRange, +

[PATCH] D49275: Thread safety: Run tests with both lock and capability attributes

2018-07-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In https://reviews.llvm.org/D49275#1162204, @aaronpuchert wrote: > Thanks for the review. Could you commit this for me (`Aaron Puchert > `)? Happy to do so. I've commit in r337125. Thank you for the patch! Repository: rC

r337125 - Run thread safety tests with both lock and capability attributes; NFC to the analysis behavior.

2018-07-15 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Sun Jul 15 05:08:52 2018 New Revision: 337125 URL: http://llvm.org/viewvc/llvm-project?rev=337125=rev Log: Run thread safety tests with both lock and capability attributes; NFC to the analysis behavior. Patch thanks to Aaron Puchert. Modified:

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-15 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, The change is OK but I have some questions regarding tests. Comment at: unittests/AST/ASTImporterTest.cpp:2495 + FirstDeclMatcher().match(ToTU, fieldDecl(hasName("entry1"))); + auto getRecordDecl = [](FieldDecl *FD) { +auto *ET =

[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

2018-07-15 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, Could you provide some tests for the issue? Repository: rC Clang https://reviews.llvm.org/D49300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org