r322787 - [analyzer] operator new: Add a new checker callback, check::NewAllocator.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 15:46:13 2018 New Revision: 322787 URL: http://llvm.org/viewvc/llvm-project?rev=322787&view=rev Log: [analyzer] operator new: Add a new checker callback, check::NewAllocator. The callback runs after operator new() and before the construction and allows the check

[PATCH] D42208: Use an enum value instea of an string

2018-01-17 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola created this revision. espindola added reviewers: rnk, rsmith. The old StringSwitch use was also broken. It assumed that a StringSwitch returns Optional instead of T and was missing a .Default. https://reviews.llvm.org/D42208 Files: clang/include/clang/Frontend/CodeGenOptions.h

[PATCH] D41406: [analyzer] Add a new checker callback, check::NewAllocator.

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322787: [analyzer] operator new: Add a new checker callback, check::NewAllocator. (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D41406?vs=129369&id=130304#toc

[PATCH] D42208: Use an enum value instead of an string

2018-01-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Looks good! https://reviews.llvm.org/D42208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

r322790 - [analyzer] NFC: operator new: Fix new(nothrow) definition in tests.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 16:03:43 2018 New Revision: 322790 URL: http://llvm.org/viewvc/llvm-project?rev=322790&view=rev Log: [analyzer] NFC: operator new: Fix new(nothrow) definition in tests. Fix the const qualifier so that the operator defined in the tests indeed does override the de

[PATCH] D41408: [analyzer] NFC: Fix nothrow operator new definition in a test.

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322790: [analyzer] NFC: operator new: Fix new(nothrow) definition in tests. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[PATCH] D41409: [analyzer] Fix intermediate diagnostics on paths that go through operator new().

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322791: [analyzer] operator new: Fix path diagnostics around the operator call. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D41409 Files: lib/StaticAnalyzer

r322791 - [analyzer] operator new: Fix path diagnostics around the operator call.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 16:10:21 2018 New Revision: 322791 URL: http://llvm.org/viewvc/llvm-project?rev=322791&view=rev Log: [analyzer] operator new: Fix path diagnostics around the operator call. Implements finding appropriate source locations for intermediate diagnostic pieces in pat

Re: r322769 - [RISCV] Propagate -mabi and -march values to GNU assembler.

2018-01-17 Thread Mikhail Zolotukhin via cfe-commits
Hi, Looks like the test is failing on MacOS [1]. Could you please take a look? Thanks, Michael [1] http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/45726/consoleFull#9955924438254eaf0-7326-4999-85b0-388101f2d404

r322792 - Use an enum value instead of a string.

2018-01-17 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Wed Jan 17 16:20:03 2018 New Revision: 322792 URL: http://llvm.org/viewvc/llvm-project?rev=322792&view=rev Log: Use an enum value instead of a string. The old StringSwitch use was also broken. It assumed that a StringSwitch returns Optional instead of T and was missing a .Def

[PATCH] D42213: [ASTMatchers] [NFC] Fix code examples

2018-01-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. Herald added subscribers: cfe-commits, klimek. Repository: rC Clang https://reviews.llvm.org/D42213 Files: include/clang/ASTMatchers/ASTMatchers.h Index: include/clang/ASTMatchers/ASTMatchers.h =

[libcxx] r322794 - libcxx: Define set_unexpected, _get_unexpected and __uncaught_exceptions without dllimport.

2018-01-17 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Wed Jan 17 16:33:35 2018 New Revision: 322794 URL: http://llvm.org/viewvc/llvm-project?rev=322794&view=rev Log: libcxx: Define set_unexpected, _get_unexpected and __uncaught_exceptions without dllimport. It turns out that the MSVC headers define these functions without dllimpor

Re: r322769 - [RISCV] Propagate -mabi and -march values to GNU assembler.

2018-01-17 Thread Rafael Avila de Espindola via cfe-commits
With this I am getting a test failure on linux: TEST 'Clang :: Driver/riscv-gnutools.c' FAILED Script: -- /home/admin/llvm/build/bin/clang -target riscv32-linux-unknown-elf -fno-integrated-as --gcc-toolchain=/home/admin/llvm/llvm-project/clang/test/Dri

[PATCH] D42208: Use an enum value instead of an string

2018-01-17 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola added a comment. 322792 https://reviews.llvm.org/D42208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r322795 - [analyzer] Suppress "this" pointer escape during construction.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 16:44:41 2018 New Revision: 322795 URL: http://llvm.org/viewvc/llvm-project?rev=322795&view=rev Log: [analyzer] Suppress "this" pointer escape during construction. Pointer escape event notifies checkers that a pointer can no longer be reliably tracked by the ana

[PATCH] D42217: Set Module Metadata "AvoidPLT" when -fno-plt is used.

2018-01-17 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram created this revision. tmsriram added reviewers: rnk, rafael. Set Module Metadata "AvoidPLT" when -fno-plt is used. Please see: https://reviews.llvm.org/D42216 for more details. This allows processing of calls to intrinsics easily. https://reviews.llvm.org/D42217 Files: lib/CodeGen

[PATCH] D41797: [analyzer] Suppress escape of this-pointer during construction.

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322795: [analyzer] Suppress "this" pointer escape during construction. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D41797 Files: lib/StaticAnalyzer/Core/Cal

r322796 - [analyzer] operator new: Add a new ProgramPoint for check::NewAllocator.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 16:50:19 2018 New Revision: 322796 URL: http://llvm.org/viewvc/llvm-project?rev=322796&view=rev Log: [analyzer] operator new: Add a new ProgramPoint for check::NewAllocator. Add PostAllocatorCall program point to represent the moment in the analysis between the

[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322796: [analyzer] operator new: Add a new ProgramPoint for check::NewAllocator. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D41800 Files: include/clang/Ana

r322797 - [analyzer] operator new: Fix callback order for CXXNewExpr.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 16:53:50 2018 New Revision: 322797 URL: http://llvm.org/viewvc/llvm-project?rev=322797&view=rev Log: [analyzer] operator new: Fix callback order for CXXNewExpr. PreStmt was never called. Additionally, under c++-allocator-inlining=true, PostStmt was called twice

[PATCH] D41934: [analyzer] Fix CXXNewExpr callback order.

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322797: [analyzer] operator new: Fix callback order for CXXNewExpr. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D41934 Files: lib/StaticAnalyzer/Checkers/An

r322798 - [analyzer] NFC: Use "= default" for default ProgramPoint constructors.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 16:55:29 2018 New Revision: 322798 URL: http://llvm.org/viewvc/llvm-project?rev=322798&view=rev Log: [analyzer] NFC: Use "= default" for default ProgramPoint constructors. Differential Revision: https://reviews.llvm.org/D41935 Modified: cfe/trunk/include/cl

[PATCH] D41935: [analyzer] NFC: Mark default constructors for ProgramPoints.

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322798: [analyzer] NFC: Use "= default" for default ProgramPoint constructors. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D41935 Files: include/clang/Analy

[PATCH] D41935: [analyzer] NFC: Mark default constructors for ProgramPoints.

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322798: [analyzer] NFC: Use "= default" for default ProgramPoint constructors. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

r322799 - [analyzer] NFC: RetainCount: Protect from dumping raw region to path notes.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 17:01:56 2018 New Revision: 322799 URL: http://llvm.org/viewvc/llvm-project?rev=322799&view=rev Log: [analyzer] NFC: RetainCount: Protect from dumping raw region to path notes. MemRegion::getString() is a wrapper around MemRegion::dump(), which is not user-frien

[PATCH] D42015: [analyzer] NFC: RetainCount: Don't dump() regions to the user.

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322799: [analyzer] NFC: RetainCount: Protect from dumping raw region to path notes. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D42015 Files: lib/StaticAnal

[PATCH] D42219: [analyzer] Enable c++-allocator-inlining by default?

2018-01-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. Once https://reviews.llvm.org/D42192 lands, i believe it should be safe to flip the default value of `-analyzer-config c++-allocator-inlining

[PATCH] D42192: [analyzer] Assume that the allocated value is non-null before construction, not after.

2018-01-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:516 +if (!ProtoType->isNothrow(getContext())) + State = State->assume(RetVal.castAs(), true); +} george.karpenkov wrote: >

[PATCH] D42192: [analyzer] Assume that the allocated value is non-null before construction, not after.

2018-01-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 130335. NoQ added a comment. Use `auto`. https://reviews.llvm.org/D42192 Files: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp test/Analysis/new-ctor-conservative.cpp test/Analysis/new-ctor-null-throw.cpp test/Analysis/new-ctor-null.cpp Index: test/Analysis

[PATCH] D42221: [analyzer] NFC: See if existing C++ tests work with custom operator new().

2018-01-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. NoQ added a dependency: D42219: [analyzer] Enable c++-allocator-inlining by default?. In order to provide more test coverage for inlined `ope

r322804 - [analyzer] NFC: Remove unused method - BugReporter::RemoveUnneededCalls().

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 17:40:31 2018 New Revision: 322804 URL: http://llvm.org/viewvc/llvm-project?rev=322804&view=rev Log: [analyzer] NFC: Remove unused method - BugReporter::RemoveUnneededCalls(). Patch by Henry Wong! Differential Revision: https://reviews.llvm.org/D42106 Modified

[PATCH] D42106: [analyzer] Remove the useless method declararion 'BugReporter::RemoveUnneededCalls()'.

2018-01-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322804: [analyzer] NFC: Remove unused method - BugReporter::RemoveUnneededCalls(). (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.l

[PATCH] D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument

2018-01-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Please take a look at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0588r1.html, which respecifies the rules for lambda capture and its interaction with default arguments, and has been voted into the C++ working paper as a defect report resolution. The approa

[PATCH] D37189: Fix an assertion failure that occured when custom 'operator new[]' return non-ElementRegion and 'c++-allocator-inlining' sets true.

2018-01-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Oh well, i guess i covered this in my recent patches anyway (esp. r322787/https://reviews.llvm.org/D41406). Sorry, i just fixed everything differently and it became unclear how to integrate your patch into the whole thing. Repository: rC Clang https://reviews.llvm.org/

r322808 - Update for llvm change.

2018-01-17 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Wed Jan 17 18:08:38 2018 New Revision: 322808 URL: http://llvm.org/viewvc/llvm-project?rev=322808&view=rev Log: Update for llvm change. Modified: cfe/trunk/test/OpenMP/target_codegen_registration.cpp cfe/trunk/test/OpenMP/target_parallel_codegen_registration.cpp c

[PATCH] D37189: Fix an assertion failure that occured when custom 'operator new[]' return non-ElementRegion and 'c++-allocator-inlining' sets true.

2018-01-17 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D37189#979795, @NoQ wrote: > Oh well, i guess i covered this in my recent patches anyway (esp. > r322787/https://reviews.llvm.org/D41406). Sorry, i just fixed everything > differently and it became unclear how to integrate your patch into the who

[PATCH] D37189: Fix an assertion failure that occured when custom 'operator new[]' return non-ElementRegion and 'c++-allocator-inlining' sets true.

2018-01-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. That's the "Add Action..." list-box above the comment box. Repository: rC Clang https://reviews.llvm.org/D37189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

r322809 - [analyzer] a few helper methods for getting and comparing symbolic values

2018-01-17 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Jan 17 19:18:36 2018 New Revision: 322809 URL: http://llvm.org/viewvc/llvm-project?rev=322809&view=rev Log: [analyzer] a few helper methods for getting and comparing symbolic values API calls should express intent, and that's a motivation behind this patch. Dif

[PATCH] D41318: Start setting dso_local in clang

2018-01-17 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola updated this revision to Diff 130351. espindola added a comment. Herald added subscribers: niosHD, sabuasal, apazos, jordy.potman.lists, simoncook, johnrusso, rbar, asb. All tests have been updated. A few missing cases in c++ codegen are handled. We now use CodeGenOpts.RelocationModel,

[libcxx] r322810 - Fix most GCC test failures.

2018-01-17 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jan 17 19:41:06 2018 New Revision: 322810 URL: http://llvm.org/viewvc/llvm-project?rev=322810&view=rev Log: Fix most GCC test failures. This patch fixes almost all currently failing tests when using GCC ToT. The specific changes are: (A) Workaround gcc.gnu.org/PR83921 w

[PATCH] [libcxx] a simple comment fix in include/list

2018-01-17 Thread Qian Yun via cfe-commits
Hello all, This is a simple (and my first) patch that fixes a comment in include/list. Qian Yun --- a/include/list +++ b/include/list @@ -1129,9 +1129,9 @@ __l->__next_->__prev_ = __l; base::__end_.__next_ = __f; } -// Link in nodes [__f, __l] at the front of the list +// Link in nod

[PATCH] D42227: [Refactor] Use enum instead of magic number in handleX86ForceAlignArgPointerAttr, NFC

2018-01-17 Thread Hongbin Zheng via Phabricator via cfe-commits
etherzhhb created this revision. etherzhhb added reviewers: aaron.ballman, echristo. Herald added a subscriber: cfe-commits. Simple change to use Use enum instead of magic number in handleX86ForceAlignArgPointerAttr. No functional change Repository: rC Clang https://reviews.llvm.org/D42227

r322813 - Fix Scope::dump()

2018-01-17 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Jan 17 20:28:56 2018 New Revision: 322813 URL: http://llvm.org/viewvc/llvm-project?rev=322813&view=rev Log: Fix Scope::dump() The dump function for Scope only has 20 out of the 24 flags. Since it looped until no flags were left, having an unknown flag lead to an infinite

r322816 - Revert rC322769: [RISCV] Propagate -mabi and -march values to GNU assembler.

2018-01-17 Thread Hiroshi Inoue via cfe-commits
Author: inouehrs Date: Wed Jan 17 22:13:25 2018 New Revision: 322816 URL: http://llvm.org/viewvc/llvm-project?rev=322816&view=rev Log: Revert rC322769: [RISCV] Propagate -mabi and -march values to GNU assembler. Temporarily revert rC322769 due to buildbot failurs. Removed: cfe/trunk/test/D

[PATCH] D42229: [cmake] [libcxxabi] Don't print warning when tests are disabled.

2018-01-17 Thread Don Hinton via Phabricator via cfe-commits
hintonda created this revision. hintonda added reviewers: compnerd, bryant, beanz. Herald added a subscriber: mgorny. Herald added a reviewer: EricWF. Herald added a reviewer: EricWF. Don't print, possibly erroneous, warning if LIBCXXABI_INCLUDE_TESTS is false. This patch fixes a problem introduc

Re: [PATCH] D41271: [RISCV] Propagate -mabi and -march values to GNU assembler.

2018-01-17 Thread Yvan Roux via cfe-commits
Hi Ana On 17 January 2018 at 23:14, Ana Pazos via Phabricator via cfe-commits wrote: > apazos added a comment. > > Committed R32276 This commit broke ARM/AArch64 buildbots. riscv-gnutools.c test fails on these boxes. logs are available here: http://lab.llvm.org:8011/builders/clang-cmake-aarch64

<    1   2   3