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

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > Like, make a new `CallEvent` sub-class called, say, `CXXNewAllocatorCall` Oh, we already have it (`CXXAllocatorCall`). https://reviews.llvm.org/D41406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

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

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. But still, i guess, it is also easier for checker authors to discover a checker callback (it's right there in the `CheckerDocumentation`, which is short enough to read fully) than to discover a `CallEvent` sub-class (which was so hard that i never discovered it until like n

[PATCH] D41807: [cmake] Delete redundant install command for clang-refactor.

2018-01-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D41807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D41885: [libcxxabi][demangler] Improve handling of variadic templates

2018-01-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: EricWF, mclow.lists, dexonsmith. This patch fixes some longstanding bugs in the demangler to do with it's handling of variadic templates. Currently the demangler handles variadic templates by expanding them into the Names s

[PATCH] D41885: [libcxxabi][demangler] Improve handling of variadic templates

2018-01-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: src/cxa_demangle.cpp:130 - // Offset of position in buffer, used for building stream_string_view. - typedef unsigned StreamPosition; - This caching API is being removed because it is no longer valid: if a node

[PATCH] D41887: [libcxxabi][demangler] Clean up and llvm-ify the expression parser

2018-01-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: EricWF, mclow.lists, dexonsmith. As of https://reviews.llvm.org/D41885, every parse_* function now either returns a single Node* or fails. I'm using this new rule to clean up the parsing for the demangler, and also update it

r322136 - Reland "Emit Function IDs table for Control Flow Guard"

2018-01-09 Thread Adrian McCarthy via cfe-commits
Author: amccarth Date: Tue Jan 9 15:49:30 2018 New Revision: 322136 URL: http://llvm.org/viewvc/llvm-project?rev=322136&view=rev Log: Reland "Emit Function IDs table for Control Flow Guard" Adds option /guard:cf to clang-cl and -cfguard to cc1 to emit function IDs of functions that have their ad

[PATCH] D41889: [libcxxabi][demangler] Clean up and llvm-ify the type parser

2018-01-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: EricWF, mclow.lists, dexonsmith. As of https://reviews.llvm.org/D41885, every parse_* function now either returns a single Node* or fails. I'm using this new rule to clean up the parsing for the demangler, and also update it

[libcxx] r322144 - [libcxx] [test] Improve MSVC portability.

2018-01-09 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Tue Jan 9 16:39:46 2018 New Revision: 322144 URL: http://llvm.org/viewvc/llvm-project?rev=322144&view=rev Log: [libcxx] [test] Improve MSVC portability. test/support/msvc_stdlib_force_include.hpp When testing MSVC's STL with C1XX, simulate a couple more compiler feature-te

[PATCH] D41213: [libcxx] [test] Improve MSVC portability.

2018-01-09 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT closed this revision. STL_MSFT added a comment. Thanks, I've checked this in as-is. I would support an LWG issue to change the Standardese here. https://reviews.llvm.org/D41213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D41807: [cmake] Delete redundant install command for clang-refactor.

2018-01-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322147: [cmake] Delete redundant install command for clang-refactor. (authored by dhinton, committed by ). Changed prior to commit: https://reviews.llvm.org/D41807?vs=128864&id=129192#toc Repository:

r322147 - [cmake] Delete redundant install command for clang-refactor.

2018-01-09 Thread Don Hinton via cfe-commits
Author: dhinton Date: Tue Jan 9 17:00:28 2018 New Revision: 322147 URL: http://llvm.org/viewvc/llvm-project?rev=322147&view=rev Log: [cmake] Delete redundant install command for clang-refactor. Summary: Install targets for clang tools are controlled by CLANG_BUILD_TOOLS, and when OFF, cmake issu

[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D40677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r322149 - [analyzer] suppress nullability inference from a macro when result is used in another macro

2018-01-09 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Jan 9 17:22:14 2018 New Revision: 322149 URL: http://llvm.org/viewvc/llvm-project?rev=322149&view=rev Log: [analyzer] suppress nullability inference from a macro when result is used in another macro The current code used to not suppress the report, if the dere

[PATCH] D41749: [analyzer] suppress nullability inference from a macro when result is used in another macro

2018-01-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322149: [analyzer] suppress nullability inference from a macro when result is used in… (authored by george.karpenkov, committed by ). Changed prior to commit: https://reviews.llvm.org/D41749?vs=128688&i

r322150 - [analyzer] [NFC] minor FindLastStoreBRVisitor refactoring

2018-01-09 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Jan 9 17:30:31 2018 New Revision: 322150 URL: http://llvm.org/viewvc/llvm-project?rev=322150&view=rev Log: [analyzer] [NFC] minor FindLastStoreBRVisitor refactoring Differential Revision: https://reviews.llvm.org/D41790 Modified: cfe/trunk/lib/StaticAnalyz

r322151 - [analyzer] [NFC] Minor refactoring of trackNullOrUndefValue

2018-01-09 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Jan 9 17:30:32 2018 New Revision: 322151 URL: http://llvm.org/viewvc/llvm-project?rev=322151&view=rev Log: [analyzer] [NFC] Minor refactoring of trackNullOrUndefValue Simple refactoring attempt: factor out some code, remove some repetition, use auto where appro

[PATCH] D41751: [analyzer] [NFC] Minor refactoring of trackNullOrUndefValue

2018-01-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322151: [analyzer] [NFC] Minor refactoring of trackNullOrUndefValue (authored by george.karpenkov, committed by ). Repository: rC Clang https://reviews.llvm.org/D41751 Files: lib/StaticAnalyzer/Core

[PATCH] D41790: [analyzer] [NFC] minor FindLastStoreBRVisitor refactoring

2018-01-09 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322150: [analyzer] [NFC] minor FindLastStoreBRVisitor refactoring (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org

Re: r310427 - Sema: disable implicit conversion from _Complex to real types in C++.

2018-01-09 Thread Richard Smith via cfe-commits
On 8 August 2017 at 16:18, Tim Northover via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: tnorthover > Date: Tue Aug 8 16:18:05 2017 > New Revision: 310427 > > URL: http://llvm.org/viewvc/llvm-project?rev=310427&view=rev > Log: > Sema: disable implicit conversion from _Complex to re

[PATCH] D41706: [Driver] Update default sanitizer blacklist location

2018-01-09 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322154: [Driver] Update default sanitizer blacklist location (authored by phosek, committed by ). Repository: rC Clang https://reviews.llvm.org/D41706 Files: lib/Driver/SanitizerArgs.cpp test/Driv

r322154 - [Driver] Update default sanitizer blacklist location

2018-01-09 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jan 9 18:12:24 2018 New Revision: 322154 URL: http://llvm.org/viewvc/llvm-project?rev=322154&view=rev Log: [Driver] Update default sanitizer blacklist location This is related to moving the sanitizer blacklists to share/ subdirectory. Differential Revision: https://revi

[PATCH] D41546: [clang-tidy] Adding Fuchsia checker for statically constructed objects

2018-01-09 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 129208. juliehockett marked 5 inline comments as done. juliehockett added a comment. Updating matcher to catch dynamically initialized constructors and fixing comments. https://reviews.llvm.org/D41546 Files: clang-tidy/fuchsia/CMakeLists.txt clang

r322155 - Revert "[Driver] Update default sanitizer blacklist location"

2018-01-09 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jan 9 18:24:09 2018 New Revision: 322155 URL: http://llvm.org/viewvc/llvm-project?rev=322155&view=rev Log: Revert "[Driver] Update default sanitizer blacklist location" This reverts commit r322154 because it broke sanitizer bots. Added: cfe/trunk/test/Driver/Inputs/

Re: r321855 - Reapply r321781: [Modules] Allow modules specified by -fmodule-map-file to shadow implicitly found ones

2018-01-09 Thread Bruno Cardoso Lopes via cfe-commits
Hi Eric, On Mon, Jan 8, 2018 at 9:31 PM, Eric Fiselier wrote: > I haven't done a ton of investigation yet, but I suspect this commit is > responsible for breaking my LLVM module selfhost build, which uses libc++ as > the STL, and builds LLD (No bots appear to test this configuration). > > The err

Re: r321855 - Reapply r321781: [Modules] Allow modules specified by -fmodule-map-file to shadow implicitly found ones

2018-01-09 Thread Richard Smith via cfe-commits
On 9 January 2018 at 18:46, Bruno Cardoso Lopes via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Eric, > > On Mon, Jan 8, 2018 at 9:31 PM, Eric Fiselier wrote: > > I haven't done a ton of investigation yet, but I suspect this commit is > > responsible for breaking my LLVM module selfhost

[PATCH] D40560: [analyzer] Get construction into `operator new` running in simple cases.

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 129210. NoQ added a comment. That thing didn't immediately work, because there are a lot of other places where we need to put the value, not just the Store, before entering the constructor - such as our constructor call events for checker callbacks. It'd be har

[PATCH] D40939: [analyzer] NFC: Avoid element regions of void type.

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 129211. NoQ added a comment. Rebase. https://reviews.llvm.org/D40939 Files: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h lib/StaticAnalyzer/Core/ExprEngine.cpp lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp Index: lib/StaticAnalyzer/Core/S

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 129212. NoQ added a comment. In https://reviews.llvm.org/D41250#959755, @NoQ wrote: > > I also noticed that `evalCast` from `void *` to `T *` is uncomfortable to > > use because sometimes it transforms `&SymRegion{$x}` into `&element{T, > > 0S32b, SymRegion{$x}

[PATCH] D41266: [analyzer] With c++-allocator-inlining, fix memory space for operator new pointers.

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 129213. NoQ added a comment. Rebase. Address the comment. In https://reviews.llvm.org/D41266#959763, @NoQ wrote: > Remove the redundant cast that is done in `c++-allocator-inlining` mode when > modeling array new. After rebase it started causing two identical e

[PATCH] D41266: [analyzer] With c++-allocator-inlining, fix memory space for operator new pointers.

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:477 +bool ExprEngine::isStandardGlobalOperatorNewFunction(const CXXNewExpr *CNE) { + const FunctionDecl *FD = CNE->getOperatorNew(); + if (FD && !isa(FD) && !FD->isVariadic()) { dc

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

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Core/CheckerManager.h:311 + ExprEngine &Eng, + bool wasInlined = false); + dcoughlin wrote: > Does 'wasInlined' really need to ha

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

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 129214. NoQ marked 6 inline comments as done. NoQ added a comment. Address review comments. Stick to the callback approach for now. https://reviews.llvm.org/D41406 Files: include/clang/StaticAnalyzer/Core/Checker.h include/clang/StaticAnalyzer/Core/CheckerM

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

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 129215. NoQ marked an inline comment as done. NoQ added a comment. Fix the comment. https://reviews.llvm.org/D41800 Files: include/clang/Analysis/ProgramPoint.h lib/StaticAnalyzer/Core/CheckerManager.cpp lib/StaticAnalyzer/Core/CoreEngine.cpp lib/Static

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

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/Analysis/ProgramPoint.h:592 + friend class ProgramPoint; + PostAllocatorCall() {} + static bool isKind(const ProgramPoint &Location) { xazax.hun wrote: > Maybe `= default` is getting more canonical within LL

[PATCH] D41795: [analyzer] Inline destructors for non-array deletes.

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ abandoned this revision. NoQ added a comment. > because the new behavior of operator new is to return an ElementRegion > surrounding the void pointer The new behavior was reverted in https://reviews.llvm.org/D41250#971888 so this patch is no longer useful. Repository: rC Clang https://

[PATCH] D41796: [analyzer] Fix extent modeling for casted operator new values.

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ abandoned this revision. NoQ added a comment. > is not quite intended (but not addressed yet) https://reviews.llvm.org/D41250#971888 addresses the issue. > However, if the operator is inlined It isn't. Because if it is inlined, `MallocChecker` bails out immediately and doesn't try to model

[PATCH] D41799: [analyzer] PtrArithChecker: Update to use check::NewAllocator

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ planned changes to this revision. NoQ added a comment. https://reviews.llvm.org/D41250#971888 reverts the change in how casts work, and the checker doesn't really need the casted value, because it only tracks the pointer. This still leaves us with the problem of `PostStmt` being called twi

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

2018-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D41406#970985, @xazax.hun wrote: > Do you have a plan for the new false negatives when `c++-allocator-inlining` > is on? Should the user mark allocation functions with attributes? Not immediately - the immediate plan is to simply believe that we

<    1   2