[PATCH] D55654: [clang] [Driver] [NetBSD] Add -D_REENTRANT when using sanitizers

2018-12-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: lib/Driver/ToolChains/NetBSD.cpp:465 + const SanitizerArgs &SanArgs = getSanitizerArgs(); + if (SanArgs.needsAsanRt() || SanArgs.needsHwasanRt() || + SanArgs.needsDfsanRt() || SanArgs.needsLsanRt() || There sh

[PATCH] D55741: Implementation Feature Test Macros for P0722R3

2018-12-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks good. Is there anything in www/cxx_status.html that we should update to track that we've implemented this part of P1353R0? Repository: rC Clang CHANGES SINCE LAST ACTION https://re

[PATCH] D55657: [libcxx] [regex] Use distinct __regex_word on NetBSD

2018-12-16 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349293: [regex] Use distinct __regex_word on NetBSD (authored by mgorny, committed by ). Herald added subscribers: llvm-commits, christof. Changed prior to commit: https://reviews.llvm.org/D55657?vs=178

[PATCH] D55576: [libcxx] [test] [support] Use socket()+bind() to create unix sockets portably

2018-12-16 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a reviewer: emaste. mgorny added a comment. @emaste, maybe you could take a look at this too. I think it would solve the problem for FreeBSD as well. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55576/new/ https://reviews.llvm.org/D55576

r349300 - Thread safety analysis: Allow scoped releasing of capabilities

2018-12-16 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Sun Dec 16 06:15:30 2018 New Revision: 349300 URL: http://llvm.org/viewvc/llvm-project?rev=349300&view=rev Log: Thread safety analysis: Allow scoped releasing of capabilities Summary: The pattern is problematic with C++ exceptions, and not as widespread as scoped locks,

[PATCH] D52578: Thread safety analysis: Allow scoped releasing of capabilities

2018-12-16 Thread Aaron Puchert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349300: Thread safety analysis: Allow scoped releasing of capabilities (authored by aaronpuchert, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D55576: [libcxx] [test] [support] Use socket()+bind() to create unix sockets portably

2018-12-16 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. LGTM. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55576/new/ https://reviews.llvm.org/D55576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D55576: [libcxx] [test] [support] Use socket()+bind() to create unix sockets portably

2018-12-16 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX349305: [test] [support] Use socket()+bind() to create unix sockets portably (authored by mgorny, committed by ). Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55576/n

[PATCH] D55576: [libcxx] [test] [support] Use socket()+bind() to create unix sockets portably

2018-12-16 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. @dim, thanks for the review. Should I also try removing the following restriction? #if !defined(__APPLE__) && !defined(__FreeBSD__) // No support for domain sockets {env.create_socket("socket"), file_type::socket}, #endif Repository: rCXX libc++ CHANGE

[PATCH] D55576: [libcxx] [test] [support] Use socket()+bind() to create unix sockets portably

2018-12-16 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D55576#1332370 , @mgorny wrote: > @dim, thanks for the review. Should I also try removing the following > restriction? > > #if !defined(__APPLE__) && !defined(__FreeBSD__) // No support for domain > sockets > {env.crea

r349308 - Thread safety analysis: Avoid intermediate copies [NFC]

2018-12-16 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Sun Dec 16 08:19:11 2018 New Revision: 349308 URL: http://llvm.org/viewvc/llvm-project?rev=349308&view=rev Log: Thread safety analysis: Avoid intermediate copies [NFC] The main reason is to reduce the number of constructor arguments though, especially since many of them

[PATCH] D55730: [analyzer] MoveChecker Pt.9: Add a "peaceful" mode in which it finds only 100% authentic bugs.

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:188-195 + void setAggressiveness(StringRef Str) { +Aggressiveness = +llvm::StringSwitch(Str) +.Case("KnownsOnly", AK_KnownsOnly) +.Case("KnownsAndLocals", AK_Kn

[PATCH] D55730: [analyzer] MoveChecker Pt.9: Add a "peaceful" mode in which it finds only 100% authentic bugs.

2018-12-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:188-195 + void setAggressiveness(StringRef Str) { +Aggressiveness = +llvm::StringSwitch(Str) +.Case("KnownsOnly", AK_KnownsOnly) +.Case("KnownsAndLocals",

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-12-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp:136 Agg f8 = {EnumVal}; // OK + // expected-warning@+1 {{implicit conversion from 'int' to 'float' changes value from 123456789 to 1.234

[PATCH] D55749: [Driver] Automatically enable -munwind-tables if -fseh-exceptions is enabled

2018-12-16 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, mgrang, ssijaric. Herald added subscribers: JDevlieghere, kristof.beyls, javed.absar, aprantl. For targets where SEH exceptions are used by default (on MinGW, only x86_64 so far), -munwind-tables are added automatically. If -fseh-exep

[PATCH] D55566: [analyzer] LiveVariables: Fix a zombie expression problem, add testing infrastructure.

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Tested it a little bit. It causes an extremely slight skew in warnings. I'll reduce a few of them to see if this is mostly just budgets reached earlier or later, or these are sensible improvements/regressions, but generally this looks pretty safe, so i'll try to commit. R

[PATCH] D55566: [analyzer] LiveVariables: Fix a zombie expression problem, add testing infrastructure.

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. @Szelethus: i'm very happy that someone's reading this :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55566/new/ https://reviews.llvm.org/D55566 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D55566: [analyzer] LiveVariables: Fix a zombie expression problem, add testing infrastructure.

2018-12-16 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL349320: [analyzer] Fix some expressions staying live too long. Add a debug checker. (authored by dergachev, committed by )

r349320 - [analyzer] Fix some expressions staying live too long. Add a debug checker.

2018-12-16 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Sun Dec 16 15:44:06 2018 New Revision: 349320 URL: http://llvm.org/viewvc/llvm-project?rev=349320&view=rev Log: [analyzer] Fix some expressions staying live too long. Add a debug checker. StaticAnalyzer uses the CFG-based RelaxedLiveVariables analysis in order to, in parti

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-12-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, thank you a lot! I have to say that even having your patch, I still don't understand why the patch fixes the problem (and what the problem is). As I see, the patch handles the cases where some fields or friends have DeclContext different from ToRD. Could yo

[PATCH] D54918: [analyzer] Apply clang-format to GenericTaintChecker.cpp

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. I appreciate the cleanup in general and any work on taint analysis in particular, thanks! In D54918#1332089 , @Szelethus wrote: > I vaguely remember @george.karpenkov having many great points against it --

[PATCH] D55734: [analyzer] Revise GenericTaintChecker's internal representation

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hi, thanks again for looking into this! I have a single piece of doubt that this doesn't change the behavior (the comment about `pread`), but other than that, this diff is good to go, in my opinion. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChec

[PATCH] D54834: [analyzer][MallocChecker] Improve warning messages on double-delete errors

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Mm, yeah, but it's still weird to see it in `checkPreCall` for `CXXDestructorCall`. I suspect that your new warning covers these tests as well. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54834/new/ https://reviews.llvm.org/D54834

[PATCH] D54834: [analyzer][MallocChecker] Improve warning messages on double-delete errors

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ugh. MSVC buildbot is acting weird again. Also it is not acting deterministically

[PATCH] D54834: [analyzer][MallocChecker] Improve warning messages on double-delete errors

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Wait, no, i didn't do anything with checker options yet. Something else then, i guess. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54834/new/ https://reviews.llvm.org/D54834 ___ cfe-commits ma

RE: r349281 - [analyzer][MallocChecker][NFC] Document and reorganize some functions

2018-12-16 Thread via cfe-commits
Hi Kristof, Your change seems to have caused 7 new test failures on the PS4 Windows bot: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/22257/ Clang :: Analysis/Malloc+MismatchedDeallocator+NewDelete.cpp Clang :: Analysis/MismatchedDeallocator-path-note

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349326: Speculatively re-apply "[analyzer] MoveChecker: Add checks for dereferencing..." (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D55388?vs=178328&id=178

r349326 - Speculatively re-apply "[analyzer] MoveChecker: Add checks for dereferencing..."

2018-12-16 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Sun Dec 16 21:25:23 2018 New Revision: 349326 URL: http://llvm.org/viewvc/llvm-project?rev=349326&view=rev Log: Speculatively re-apply "[analyzer] MoveChecker: Add checks for dereferencing..." This re-applies commit r349226 that was reverted in r349233 due to failures on c

[PATCH] D55741: Implementation Feature Test Macros for P0722R3

2018-12-16 Thread Chris Kennelly via Phabricator via cfe-commits
ckennelly updated this revision to Diff 178423. ckennelly added a comment. Added update to cxx_status.html for partial implementation of feature test macros adopted in San Diego CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55741/new/ https://reviews.llvm.org/D55741 Files: lib/Front

[PATCH] D55741: Implementation Feature Test Macros for P0722R3

2018-12-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. Thanks! Do you need someone to commit for you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55741/new/ https://reviews.llvm.org/D55741 ___ cfe-commits mailing list cfe-commits@lists.ll

r349327 - [analyzer] MoveChecker: Add an option to suppress warnings on locals.

2018-12-16 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Sun Dec 16 22:19:32 2018 New Revision: 349327 URL: http://llvm.org/viewvc/llvm-project?rev=349327&view=rev Log: [analyzer] MoveChecker: Add an option to suppress warnings on locals. Re-using a moved-from local variable is most likely a bug because there's rarely a good mot

[PATCH] D55730: [analyzer] MoveChecker Pt.9: Add a "peaceful" mode in which it finds only 100% authentic bugs.

2018-12-16 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL349327: [analyzer] MoveChecker: Add an option to suppress warnings on locals. (authored by dergachev, committed by ). Hera

[PATCH] D38675: [analyzer] MoveChecker Pt.10: Move the checker out of alpha state.

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Currently the checker is very quiet. I have seen exactly 6 warnings on internal codebases on which i tested it (on which we otherwise emit around 12000 warnings), and all of them were good. The only false positive i've seen so far was fixed in D55566

r349328 - [analyzer] MoveChecker: Enable by default as cplusplus.Move.

2018-12-16 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Sun Dec 16 22:30:39 2018 New Revision: 349328 URL: http://llvm.org/viewvc/llvm-project?rev=349328&view=rev Log: [analyzer] MoveChecker: Enable by default as cplusplus.Move. This checker warns you when you re-use an object after moving it. Mostly developed by Peter Szecsi!

[PATCH] D38675: [analyzer] MoveChecker Pt.10: Move the checker out of alpha state.

2018-12-16 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC349328: [analyzer] MoveChecker: Enable by default as cplusplus.Move. (authored by dergachev, committed by ). Repository:

[PATCH] D54834: [analyzer][MallocChecker] Improve warning messages on double-delete errors

2018-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ok, D55388 seems to have landed (3 builds without failures in move checker), so i guess these are separate problems after all. The first failing build seems to be http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/2662 - it i