Re: [PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-08-02 Thread Richard Smith via cfe-commits
On Thu, 2 Aug 2018, 06:10 Martin Storsjö via Phabricator via cfe-commits, < cfe-commits@lists.llvm.org> wrote: > mstorsjo added a comment. > > This change made clang to start trigger failed asserts for me (although > they seem to not be reproducible with all compilers building clang), see >

[PATCH] D50160: [c-index-test] Use correct executable path to discover resource directory.

2018-08-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. vsapsai marked an inline comment as done. Closed by commit rL338741: [c-index-test] Use correct executable path to discover resource directory. (authored by vsapsai, committed by ). Herald added a subscriber: llvm-commits.

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

2018-08-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. All this stuff looks great! Please commit. https://reviews.llvm.org/D49361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r338259 - [analyzer] Add support for more invalidating functions in InnerPointerChecker.

2018-08-02 Thread Alexander Kornienko via cfe-commits
On Mon, Jul 30, 2018 at 5:44 PM Reka Kovacs via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rkovacs > Date: Mon Jul 30 08:43:45 2018 > New Revision: 338259 > > URL: http://llvm.org/viewvc/llvm-project?rev=338259=rev > Log: > [analyzer] Add support for more invalidating functions in

[PATCH] D50189: Fully qualify the renamed symbol if the shortened name is ambiguous.

2018-08-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 158761. ioeric added a comment. - minor update to comment. Repository: rC Clang https://reviews.llvm.org/D50189 Files: lib/Tooling/Core/Lookup.cpp unittests/Tooling/LookupTest.cpp Index: unittests/Tooling/LookupTest.cpp

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-02 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 158760. Szelethus added a comment. Forgot `git add` and `-U`. https://reviews.llvm.org/D49438 Files: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp test/Analysis/cxx-uninitialized-object-inheritance.cpp

[PATCH] D50193: Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa.

2018-08-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, ioeric. Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50193

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-08-02 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. I still don't quite see what you describe; with that change all of the lifetime.end calls pile up just before the enclosing function returns, not after each call to enqueue_kernel. Looking at https://clang.llvm.org/doxygen/EHScopeStack_8h_source.html#l00078 I

r338741 - [c-index-test] Use correct executable path to discover resource directory.

2018-08-02 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Thu Aug 2 10:29:53 2018 New Revision: 338741 URL: http://llvm.org/viewvc/llvm-project?rev=338741=rev Log: [c-index-test] Use correct executable path to discover resource directory. Driver builds resource directory path based on provided executable path. Instead of string

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:173 + int s = getSize((char *) func_ptr); + memcpy(mem, func_ptr, s); +} emmettneyman wrote: > morehouse wrote: > > Why do we need to copy the function somewhere

[PATCH] D50189: Fully qualify the renamed symbol if the shortened name is ambiguous.

2018-08-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: ilya-biryukov, hokein. Herald added a subscriber: cfe-commits. For example, when renaming `a::b::x::foo` to `y::foo` below, replacing `x::foo()` with `y::foo()` can cause ambiguity. In such cases, we simply fully qualify the name with leading

[PATCH] D50189: Fully qualify the renamed symbol if the shortened name is ambiguous.

2018-08-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Tooling/Core/Lookup.cpp:137 + StringRef TrimmedQName = QName.substr(2); + for (auto I = UseNamespaces.begin(), E = UseNamespaces.end(); I != E; ++I) { +const NamespaceDecl *NS = *I; maybe use

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: kcc, morehouse. Herald added subscribers: cfe-commits, mgorny. Added corpus of arrays to use as inputs for the functions. Check that the two functions modify the inputted arrays in the same way. Repository: rC Clang

[PATCH] D50170: [libcxxabi] Fix test_exception_address_alignment test for ARM

2018-08-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. That certainly ***looks*** more correct to me. Repository: rCXXA libc++abi https://reviews.llvm.org/D50170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:173 + int s = getSize((char *) func_ptr); + memcpy(mem, func_ptr, s); +} Why do we need to copy the function somewhere else? Looks very error-prone and

r338732 - [analyzer] Make RegionVector use const reference

2018-08-02 Thread Fangrui Song via cfe-commits
Author: maskray Date: Thu Aug 2 09:29:36 2018 New Revision: 338732 URL: http://llvm.org/viewvc/llvm-project?rev=338732=rev Log: [analyzer] Make RegionVector use const reference Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp Modified:

[libcxxabi] r338747 - [itanium demangler] Support dot suffixes on block invocation functions

2018-08-02 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Thu Aug 2 10:45:01 2018 New Revision: 338747 URL: http://llvm.org/viewvc/llvm-project?rev=338747=rev Log: [itanium demangler] Support dot suffixes on block invocation functions rdar://32378759 Modified: libcxxabi/trunk/src/cxa_demangle.cpp

r338753 - [analyzer] Forward arguments in registerChecker to avoid accidental copies

2018-08-02 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Aug 2 11:17:01 2018 New Revision: 338753 URL: http://llvm.org/viewvc/llvm-project?rev=338753=rev Log: [analyzer] Forward arguments in registerChecker to avoid accidental copies Differential Revision: https://reviews.llvm.org/D50108 Modified:

r338754 - AMDGPU: Fix missing declaration of queue ptr builtin

2018-08-02 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Thu Aug 2 11:24:55 2018 New Revision: 338754 URL: http://llvm.org/viewvc/llvm-project?rev=338754=rev Log: AMDGPU: Fix missing declaration of queue ptr builtin Modified: cfe/trunk/include/clang/Basic/BuiltinsAMDGPU.def cfe/trunk/test/CodeGenOpenCL/builtins-amdgcn.cl

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 158774. ahatanak marked 3 inline comments as done. ahatanak added a comment. Address review comments. Repository: rC Clang https://reviews.llvm.org/D50152 Files: lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGBlocks.h lib/CodeGen/CGNonTrivialStruct.cpp

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1638 +switch (E.Kind) { +case BlockCaptureEntityKind::CXXRecord: { + Name += "c"; rjmccall wrote: > I forget whether this case has already filtered out trivial >

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D50104#1185920, @scott.linder wrote: > I still don't quite see what you describe; with that change all of the > lifetime.end calls pile up just before the enclosing function returns, not > after each call to enqueue_kernel. Looking at >

[PATCH] D47618: __c11_atomic_load's _Atomic can be const

2018-08-02 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338743: __c11_atomic_loads _Atomic can be const (authored by jfb, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47618 Files:

r338743 - __c11_atomic_load's _Atomic can be const

2018-08-02 Thread JF Bastien via cfe-commits
Author: jfb Date: Thu Aug 2 10:35:46 2018 New Revision: 338743 URL: http://llvm.org/viewvc/llvm-project?rev=338743=rev Log: __c11_atomic_load's _Atomic can be const Summary: C++11 onwards specs the non-member functions atomic_load and atomic_load_explicit as taking the atomic by const

[PATCH] D50163: [AST] Remove the static_assert check in ObjCMethodDecl::ObjCMethodDecl

2018-08-02 Thread Bruno Ricci via Phabricator via cfe-commits
bricci added a comment. The static_assert itself cannot be in the bitfield since the whole point is to avoid including Basic/IdentifierTable.h just for this. I originally put the static_assert in ObjCMethodDecl and everything worked fine when tested with GCC but I then saw just after you

[PATCH] D49811: [analyzer] Obtain a ReturnStmt from a CFGAutomaticObjDtor

2018-08-02 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. We could also print something about the ReturnStmt, like source location or pretty print of its expressions so we can check that we picked the right one in case we have multiple. But consider this as an optional task if you have

[PATCH] D48341: [clang-doc] Refactoring mapper to map by scope

2018-08-02 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett marked 2 inline comments as done. juliehockett added inline comments. Comment at: clang-tools-extra/test/clang-doc/bc-linkage.cpp:106 +// CHECK-0-NEXT: +// CHECK-0-NEXT: +// CHECK-0-NEXT:blob data = 'InnerClass' ioeric wrote: > juliehockett

[PATCH] D50160: [c-index-test] Use correct executable path to discover resource directory.

2018-08-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review! Repository: rL LLVM https://reviews.llvm.org/D50160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:173 + int s = getSize((char *) func_ptr); + memcpy(mem, func_ptr, s); +} morehouse wrote: > Why do we need to copy the function somewhere else? Looks very

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 158800. emmettneyman added a comment. Replaced hardcoded numbers with variables Repository: rC Clang https://reviews.llvm.org/D50194 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp

r338749 - Work around more GCC miscompiles exposed by r338464.

2018-08-02 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Thu Aug 2 11:12:08 2018 New Revision: 338749 URL: http://llvm.org/viewvc/llvm-project?rev=338749=rev Log: Work around more GCC miscompiles exposed by r338464. This is the same fix as in r338478, for another occurrance of the same pattern from r338464. See

[PATCH] D50179: [AArch64][ARM] Context sensitive meaning of option "crypto"

2018-08-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Driver/ToolChains/Arch/AArch64.cpp:200 + // + // TODO: implement this logic in TargetParser. + Yes, this logic should be in TargetParser, not here. Trying to rewrite the target features afterwards is messy at

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/AttrDocs.td:3489 + +``noderef`` is currently only supported for C style pointers and arrays and not usable for +references or Objective-C pointers. I would drop the "C style" and just say it's

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: compiler-explorer-llvm-commit.sh:1 +# This is the commit of LLVM that we're currently based on. +git reset --hard 1fa19f68007cd126a04448093c171f40e556087e Rakete wrote: > What's this file? A mistake? Yeah, it's

[PATCH] D49403: More aggressively complete RecordTypes with Function Pointers

2018-08-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Hi - sorry about the stalled opaque pointer types effort. For my money - ideally - if someone comes across a bug caused by incorrect pointee types, ideally that would be fixed by adjusting whatever piece of code was depending on that pointee type being correct to not

[PATCH] D49911: Summary:Add clang::reinitializes attribute

2018-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. The attribute itself is looking reasonable aside from some minor nits, but this should not be committed until the clang-tidy functionality is approved (since it has no utility

[PATCH] D48100: Append new attributes to the end of an AttributeList.

2018-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. I am still okay with this, and agree that the ordering issues are a separate thing to tackle. Repository: rC Clang https://reviews.llvm.org/D48100 ___ cfe-commits mailing list

r338766 - Fix assertion failure when emitting code for a merged lambda.

2018-08-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 2 13:30:52 2018 New Revision: 338766 URL: http://llvm.org/viewvc/llvm-project?rev=338766=rev Log: Fix assertion failure when emitting code for a merged lambda. Modified: cfe/trunk/lib/AST/DeclCXX.cpp cfe/trunk/test/Modules/merge-lambdas.cpp Modified:

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:6187 +Record->dropAttr(); + } else if (Record->needsImplicitMoveConstructor() && + Record->defaultedMoveConstructorIsDeleted()) { Rakete wrote: > Quuxplusone

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:6174 + Record->hasAttr() && + !isTemplateInstantiation(Record->getTemplateSpecializationKind())) { +if (Record->getDefinition() && !Record->isDependentContext() && The call to

[PATCH] D49403: More aggressively complete RecordTypes with Function Pointers

2018-08-02 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. I hope I'm not coming across as too argumentative here. I don't really have strong feelings about this function pointer type patch and ultimately I see that you are right, but the objections you are raising here would equally apply to what I'm working on with

[PATCH] D50199: [MinGW] Predefine UNICODE if -municode is specified during compilation

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, compnerd, pcc, pirama. Repository: rC Clang https://reviews.llvm.org/D50199 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td lib/Basic/Targets.cpp lib/Driver/ToolChains/Clang.cpp

[PATCH] D50135: [libunwind] [CMake] Allow building standalone without any llvm-config available

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: CMakeLists.txt:363 -add_subdirectory(test) +if (EXISTS ${LLVM_CMAKE_PATH}) + add_subdirectory(test) phosek wrote: > libcxx seems to be using a different condition: `IS_DIRECTORY >

[PATCH] D50199: [MinGW] Predefine UNICODE if -municode is specified during compilation

2018-08-02 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. In https://reviews.llvm.org/D50199#1186164, @rnk wrote: > Does this do anything other than -DUNICODE? Maybe just translate it at the > driver level and skip the -cc1 flag? It seems odd to include predefined macros at the driver, which AFAIK is just a bridge to the

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-02 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. > Dereferencing is disabled by default Great! Thank you! > but I haven't seen the current version of the checker crash due to pointer > chasing. @NoQ saw quite a few crashes during evaluation, right? > This might be a little nit-picking, but I don't think

[PATCH] D50205: [libc++] Add availability markup for aligned new/delete

2018-08-02 Thread Louis Dionne via Phabricator via cfe-commits
ldionne created this revision. ldionne added reviewers: EricWF, vsapsai. Herald added subscribers: cfe-commits, dexonsmith, christof. The aligned allocation and deallocation functions were added in the dylib in Mac OSX 10.13. This commit does two things: first, it adds availability markup to

[PATCH] D50199: [MinGW] Predefine UNICODE if -municode is specified during compilation

2018-08-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Does this do anything other than -DUNICODE? Maybe just translate it at the driver level and skip the -cc1 flag? Repository: rC Clang https://reviews.llvm.org/D50199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50199: [MinGW] Predefine UNICODE if -municode is specified during compilation

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 158827. mstorsjo added a comment. Simplified the patch to just handle the flag within the driver, without making it a flag to cc1. https://reviews.llvm.org/D50199 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/mingw.cpp Index:

[PATCH] D46822: [RISCV] Add driver for riscv32-unknown-elf baremetal target

2018-08-02 Thread Simon Cook via Phabricator via cfe-commits
simoncook added a comment. It seems the ability to link objects has been broken by this change. As an example from our nightly tests: Executing on host: riscv32-unknown-elf-clang /data/jenkins/workspace/riscv32-llvm-gcc/gcc-tests/gcc/testsuite/gcc.c-torture/execute/20080502-1.c

r338775 - [analyzer] Add a safety check to InnerPointerChecker.

2018-08-02 Thread Reka Kovacs via cfe-commits
Author: rkovacs Date: Thu Aug 2 15:19:57 2018 New Revision: 338775 URL: http://llvm.org/viewvc/llvm-project?rev=338775=rev Log: [analyzer] Add a safety check to InnerPointerChecker. Do not crash if the CXXRecordDecl of an object is not available. Modified:

[PATCH] D49811: [analyzer] Obtain a ReturnStmt from a CFGAutomaticObjDtor

2018-08-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338777: [analyzer] Obtain a ReturnStmt from a CFGAutomaticObjDtor. (authored by rkovacs, committed by ). Repository: rC Clang https://reviews.llvm.org/D49811 Files:

r338777 - [analyzer] Obtain a ReturnStmt from a CFGAutomaticObjDtor.

2018-08-02 Thread Reka Kovacs via cfe-commits
Author: rkovacs Date: Thu Aug 2 15:31:03 2018 New Revision: 338777 URL: http://llvm.org/viewvc/llvm-project?rev=338777=rev Log: [analyzer] Obtain a ReturnStmt from a CFGAutomaticObjDtor. The CoreEngine only gives us a ReturnStmt if the last element in the CFGBlock is a CFGStmt, otherwise the

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

2018-08-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338780: [analyzer] Detect pointers escaped after ReturnStmt execution in MallocChecker. (authored by rkovacs, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r338780 - [analyzer] Detect pointers escaped after ReturnStmt execution in MallocChecker.

2018-08-02 Thread Reka Kovacs via cfe-commits
Author: rkovacs Date: Thu Aug 2 16:02:08 2018 New Revision: 338780 URL: http://llvm.org/viewvc/llvm-project?rev=338780=rev Log: [analyzer] Detect pointers escaped after ReturnStmt execution in MallocChecker. Objects local to a function are destroyed right after the statement returning (part of)

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-08-02 Thread Scott Linder via Phabricator via cfe-commits
scott.linder updated this revision to Diff 158816. scott.linder added a comment. Emit lifetime intrinsics for the sizes temp, and update test https://reviews.llvm.org/D50104 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGenOpenCL/cl20-device-side-enqueue.cl

[PATCH] D50110: Handle shared release attributes correctly

2018-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/SemaCXX/warn-thread-safety-analysis.cpp:4081-4085 + void unlockExclusive() EXCLUSIVE_UNLOCK_FUNCTION(mu_) { +mu_.Unlock(); + } + + void unlockShared() SHARED_UNLOCK_FUNCTION(mu_) { Nothing calls either

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-02 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Great! The comment should be updated though. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:32 +// `-analyzer-config \

Re: r338259 - [analyzer] Add support for more invalidating functions in InnerPointerChecker.

2018-08-02 Thread Réka Nikolett Kovács via cfe-commits
Thanks for the notice. Have you managed to get the repro? I haven't succeeded in constructing one yet, but I've committed a check for the CXXRecordDecl. I hope that fixes the crashes. Alexander Kornienko ezt írta (időpont: 2018. aug. 2., Cs, 11:07): > > > On Mon, Jul 30, 2018 at 5:44 PM Reka

[PATCH] D50205: [libc++] Add availability markup for aligned new/delete

2018-08-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I just wanted to make sure that this doesn't have the same problem as https://reviews.llvm.org/D34556. Is that correct? The patch was reverted in r306859. https://reviews.llvm.org/D34574#791158 explains why the approach taken in the patch was wrong. Repository:

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1638 +switch (E.Kind) { +case BlockCaptureEntityKind::CXXRecord: { + Name += "c"; ahatanak wrote: > rjmccall wrote: > > I forget whether this case has already filtered out trivial

Re: r338749 - Work around more GCC miscompiles exposed by r338464.

2018-08-02 Thread Martin Storsjö via cfe-commits
Hans, I think this commit should be merged to the 7.0 release branch; the first half of the GCC workaround made it in before the branch happened, but there was another identical case missing. // Martin On Thu, 2 Aug 2018, Martin Storsjo via cfe-commits wrote: Author: mstorsjo Date: Thu

Re: [PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-08-02 Thread Martin Storsjö via cfe-commits
On Thu, 2 Aug 2018, Richard Smith via cfe-commits wrote: On Thu, 2 Aug 2018, 06:10 Martin Storsjö via Phabricator via cfe-commits, wrote: mstorsjo added a comment. This change made clang to start trigger failed asserts for me (although they seem to not be reproducible with

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:6187 +Record->dropAttr(); + } else if (Record->needsImplicitMoveConstructor() && + Record->defaultedMoveConstructorIsDeleted()) { Quuxplusone wrote: > Rakete

[PATCH] D50199: [MinGW] Predefine UNICODE if -municode is specified during compilation

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D50199#1186164, @rnk wrote: > Does this do anything other than -DUNICODE? Maybe just translate it at the > driver level and skip the -cc1 flag? Yes, that also works. Initially I looked at where to place that in

[PATCH] D50135: [libunwind] [CMake] Allow building standalone without any llvm-config available

2018-08-02 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: CMakeLists.txt:363 -add_subdirectory(test) +if (EXISTS ${LLVM_CMAKE_PATH}) + add_subdirectory(test) libcxx seems to be using a different condition: `IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test"`, should this be

Re: r338749 - Work around more GCC miscompiles exposed by r338464.

2018-08-02 Thread Richard Smith via cfe-commits
(+Hans) +1 On Thu, 2 Aug 2018 at 11:37, Martin Storsjö via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hans, > > I think this commit should be merged to the 7.0 release branch; the first > half of the GCC workaround made it in before the branch happened, but > there was another identical

[PATCH] D49396: [WebAssembly] Support for atomic.wait / atomic.wake builtins

2018-08-02 Thread Heejin Ahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338771: [WebAssembly] Support for atomic.wait / atomic.wake builtins (authored by aheejin, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49396

[PATCH] D50199: [MinGW] Predefine UNICODE if -municode is specified during compilation

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D50199#1186282, @cdavis5x wrote: > I actually believe this is supposed to have one other effect: it sets the > entry point to `wmainCRTStartup()`/`wWinMainCRTStartup()`, making the user > entry point `wmain()`/`wWinMain()`, which take wide

r338771 - [WebAssembly] Support for atomic.wait / atomic.wake builtins

2018-08-02 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Thu Aug 2 14:44:40 2018 New Revision: 338771 URL: http://llvm.org/viewvc/llvm-project?rev=338771=rev Log: [WebAssembly] Support for atomic.wait / atomic.wake builtins Summary: Add support for atomic.wait / atomic.wake builtins based on the Wasm thread proposal. Reviewers:

scan-build/ccc-analyzer @file support

2018-08-02 Thread Alex Coffin via cfe-commits
The attached patch adds support for @files to ccc-analyzer (which is used by scan-build). This feature is a commonly accepted compiler option that clang, gcc, and cl.exe (microsoft's compiler) all already support. This will allow scan-build to support it too (assuming that the perl version of

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 158822. Quuxplusone marked 20 inline comments as done. Quuxplusone added a comment. Further removal of dead code based on @Rakete's feedback. Repository: rC Clang https://reviews.llvm.org/D50119 Files: docs/LanguageExtensions.rst

[PATCH] D50199: [MinGW] Predefine UNICODE if -municode is specified during compilation

2018-08-02 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x added a comment. Are you sure this shouldn't also define `_UNICODE`? //looks// Hmm... GCC doesn't define it. I wonder if we should anyway. A user who set `-municode` may also be using ``, and thus may want those macros set to their Unicode counterparts. I actually believe this is

[PATCH] D50102: [clang-tidy] Use ExprMutationAnalyzer in performance-unnecessary-value-param

2018-08-02 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 158856. shuaiwang marked 2 inline comments as done. shuaiwang added a comment. Update comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50102 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp

[PATCH] D50102: [clang-tidy] Use ExprMutationAnalyzer in performance-unnecessary-value-param

2018-08-02 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added inline comments. Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:108 return; + if (const auto *Ctor = dyn_cast(Function)) { +for (const auto *Init : Ctor->inits()) { hokein wrote: > Is this a new fix or a special case

[PATCH] D50003: Sema: Fix explicit address space cast involving void pointers

2018-08-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaCast.cpp:1050 + SrcType->getAs()->getPointeeType().getAddressSpace() != + DestType->getAs()->getPointeeType().getAddressSpace(); +} yaxunl wrote: > rjmccall wrote: > > yaxunl wrote: >

r338756 - [analyzer] Fix tests.

2018-08-02 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Aug 2 11:41:25 2018 New Revision: 338756 URL: http://llvm.org/viewvc/llvm-project?rev=338756=rev Log: [analyzer] Fix tests. Modified: cfe/trunk/test/Analysis/analyzer-config.c cfe/trunk/test/Analysis/analyzer-config.cpp Modified:

[PATCH] D50216: Pass IsInherited when merging attribute lists [RFC]

2018-08-02 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur created this revision. Herald added subscribers: cfe-commits, eraman. Attempt to solve the the diagnostic marker order ('note: previous declaration here' pointing to a source location before the main error marker) from https://reviews.llvm.org/D48100. The approach is to pass a

r338808 - [libclang 3/8] Add support for AttributedType

2018-08-02 Thread Michael Wu via cfe-commits
Author: mwu Date: Thu Aug 2 21:21:25 2018 New Revision: 338808 URL: http://llvm.org/viewvc/llvm-project?rev=338808=rev Log: [libclang 3/8] Add support for AttributedType Summary: This patch adds support to the libclang API for identifying AttributedTypes in CXTypes and reading the modified

[PATCH] D49081: [libclang 3/8] Add support for AttributedType

2018-08-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338808: [libclang 3/8] Add support for AttributedType (authored by mwu, committed by ). Changed prior to commit: https://reviews.llvm.org/D49081?vs=154609=158909#toc Repository: rC Clang

r338810 - [CodeGen] Emit parallel_loop_access for each loop in the loop stack.

2018-08-02 Thread Michael Kruse via cfe-commits
Author: meinersbur Date: Thu Aug 2 21:42:52 2018 New Revision: 338810 URL: http://llvm.org/viewvc/llvm-project?rev=338810=rev Log: [CodeGen] Emit parallel_loop_access for each loop in the loop stack. Summary: Emit !llvm.mem.parallel_loop_access metadata for memory accesses even if the parallel

[PATCH] D48808: [CodeGen] Emit parallel_loop_access for each loop in the loop stack.

2018-08-02 Thread Michael Kruse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338810: [CodeGen] Emit parallel_loop_access for each loop in the loop stack. (authored by Meinersbur, committed by ). Changed prior to commit: https://reviews.llvm.org/D48808?vs=155288=158912#toc

[PATCH] D49127: [libclang 5/8] Add support for ObjC attributes without args

2018-08-02 Thread Michael Wu via Phabricator via cfe-commits
michaelwu added a comment. Some of the CHECKs in the test will be reordered to pass, but it's still the same test. Repository: rC Clang https://reviews.llvm.org/D49127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r338816 - [libclang 7/8] Add support for getting property setter and getter names

2018-08-02 Thread Michael Wu via cfe-commits
Author: mwu Date: Thu Aug 2 22:38:29 2018 New Revision: 338816 URL: http://llvm.org/viewvc/llvm-project?rev=338816=rev Log: [libclang 7/8] Add support for getting property setter and getter names Summary: This allows libclang to access the actual names of property setters and getters without

[PATCH] D49634: [libclang 7/8] Add support for getting property setter and getter names

2018-08-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338816: [libclang 7/8] Add support for getting property setter and getter names (authored by mwu, committed by ). Changed prior to commit: https://reviews.llvm.org/D49634?vs=156691=158919#toc

[PATCH] D50135: [libunwind] [CMake] Allow building standalone without any llvm-config available

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338819: [CMake] Allow building standalone without any llvm-config available (authored by mstorsjo, committed by ). Herald added subscribers: llvm-commits, christof. Changed prior to commit:

[libunwind] r338819 - [CMake] Allow building standalone without any llvm-config available

2018-08-02 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Thu Aug 2 22:51:31 2018 New Revision: 338819 URL: http://llvm.org/viewvc/llvm-project?rev=338819=rev Log: [CMake] Allow building standalone without any llvm-config available This is the same as libcxxabi/libcxx do. Differential Revision: https://reviews.llvm.org/D50135

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-08-02 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer updated this revision to Diff 158870. bviyer added a comment. Simplified the case a bit more as requested by Erik. I also induced some errors in the test so that if someone symbolic-linked clang to /bin/true, the test will fail. Repository: rC Clang https://reviews.llvm.org/D50122

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-08-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone marked an inline comment as done. Quuxplusone added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:6091 + for (auto *F : Record->fields()) { +if (F->isMutable()) { Rakete wrote: > Can you move this in `ActOnFields`? That way we

[PATCH] D49066: [libclang 2/8] Add support for ObjCTypeParam

2018-08-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338807: [libclang 2/8] Add support for ObjCTypeParam (authored by mwu, committed by ). Repository: rC Clang https://reviews.llvm.org/D49066 Files: include/clang-c/Index.h test/Index/print-type.m

r338807 - [libclang 2/8] Add support for ObjCTypeParam

2018-08-02 Thread Michael Wu via cfe-commits
Author: mwu Date: Thu Aug 2 21:02:40 2018 New Revision: 338807 URL: http://llvm.org/viewvc/llvm-project?rev=338807=rev Log: [libclang 2/8] Add support for ObjCTypeParam Summary: This patch adds support to the libclang API for identifying ObjCTypeParams in CXTypes. This patch depends on D49063

[PATCH] D49631: [libclang 6/8] Add support for reading implicit attributes

2018-08-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338815: [libclang 6/8] Add support for reading implicit attributes (authored by mwu, committed by ). Changed prior to commit: https://reviews.llvm.org/D49631?vs=15=158918#toc Repository: rC

r338815 - [libclang 6/8] Add support for reading implicit attributes

2018-08-02 Thread Michael Wu via cfe-commits
Author: mwu Date: Thu Aug 2 22:20:23 2018 New Revision: 338815 URL: http://llvm.org/viewvc/llvm-project?rev=338815=rev Log: [libclang 6/8] Add support for reading implicit attributes Summary: Having access to implicit attributes is sometimes useful so users of libclang don't have to duplicate

Buildbot numbers for the week of 7/22/2018 - 7/28/2018

2018-08-02 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the last week of 7/22/2018 - 7/28/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from

Buildbot numbers for the week of 7/15/2018 - 7/21/2018

2018-08-02 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 7/15/2018 - 7/21/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to

[PATCH] D50208: [clang-doc] Fix unique_ptr error on bots

2018-08-02 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 158872. https://reviews.llvm.org/D50208 Files: clang-tools-extra/clang-doc/Serialize.cpp Index: clang-tools-extra/clang-doc/Serialize.cpp === ---

r338800 - Append new attributes to the end of an AttributeList.

2018-08-02 Thread Michael Kruse via cfe-commits
Author: meinersbur Date: Thu Aug 2 18:21:16 2018 New Revision: 338800 URL: http://llvm.org/viewvc/llvm-project?rev=338800=rev Log: Append new attributes to the end of an AttributeList. Recommit of r335084 after revert in r335516. ... instead of prepending it at the beginning (the original

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks! https://reviews.llvm.org/D50104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r338803 - Make my new test harness work w/c++03

2018-08-02 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Aug 2 19:58:16 2018 New Revision: 338803 URL: http://llvm.org/viewvc/llvm-project?rev=338803=rev Log: Make my new test harness work w/c++03 Modified: libcxx/trunk/test/support/test_comparisons.h Modified: libcxx/trunk/test/support/test_comparisons.h URL:

[PATCH] D50218: [OpenMP] Encode offload target triples into comdat key for offload initialization code

2018-08-02 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev created this revision. sdmitriev added reviewers: ABataev, hfinkel. Herald added subscribers: cfe-commits, mgrang, guansong. Encoding offload target triples onto comdat group key for offload initialization code guarantees that it will be executed once per each unique combination of

r338809 - [libclang 4/8] Add the clang_Type_getNullability() API

2018-08-02 Thread Michael Wu via cfe-commits
Author: mwu Date: Thu Aug 2 21:38:04 2018 New Revision: 338809 URL: http://llvm.org/viewvc/llvm-project?rev=338809=rev Log: [libclang 4/8] Add the clang_Type_getNullability() API Summary: This patch adds a clang-c API for querying the nullability of an AttributedType. The test here also tests

  1   2   >