[PATCH] D64676: Support __seg_fs and __seg_gs on x86

2019-07-12 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64676/new/ https://reviews.llvm.org/D64676 ___

[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru reopened this revision. sylvestre.ledru added a comment. This revision is now accepted and ready to land. @rnk looks like it is too risky to remove it. What about changing it from #define __VERSION__ "4.2.1 Compatible Clang 7.0.1 (tags/RELEASE_701/final)" to #define __VERSIO

[PATCH] D64687: [clang] Revert "Remove __VERSION__"

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru accepted this revision. sylvestre.ledru added a comment. This revision is now accepted and ready to land. I went ahead and committed your revert in r365992. Thanks! Next time, please remove the clang/ from your patch arc could not apply it: Committing 'D64687: [clang] Revert "R

r365992 - This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784.

2019-07-12 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Fri Jul 12 23:27:35 2019 New Revision: 365992 URL: http://llvm.org/viewvc/llvm-project?rev=365992&view=rev Log: This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784. Some targets such as Python 2.7.16 still use VERSION in their builds. Without VERSION defined, the

[PATCH] D64653: clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target

2019-07-12 Thread James Nagurne via Phabricator via cfe-commits
JamesNagurne added a comment. In D64653#1584155 , @MaskRay wrote: > I committed this for you in rL365981 (it > may have broken a Windows build for a long time. I wanted to fix it soon..). > Thanks! > > > any platform t

[PATCH] D64680: [analyzer] MallocChecker: Prevent Integer Set Library false positives

2019-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D64680#1584130 , @Charusso wrote: > Here is an example of the mentioned use-after-free by pointer-escaping as an > argument: > > https://llvm.org/reports/scan-build/report-DeclBase.cpp-getFromVoidPointer-0-1.html#EndPath Not su

[PATCH] D64613: [clangd] Type hierarchy: don't resolve parents if the client only asked for children

2019-07-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 2 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1238 Optional Result = - getTypeAncestors(*CXXRD, AST.getASTContext(), RPSet); + getTypeAncestors(*CXXRD, AST.getASTContext(), RPSet, ResolveParents)

[PATCH] D64613: [clangd] Type hierarchy: don't resolve parents if the client only asked for children

2019-07-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 209677. nridge added a comment. Address review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64613/new/ https://reviews.llvm.org/D64613 Files: clang-tools-extra/clangd/XRefs.cpp clang-tools-extra/cl

[PATCH] D64614: [clangd] Mark type hierarchy as a supported feature in the docs

2019-07-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/docs/clangd/Features.rst:264 +-++--+ -| Type hierarchy | No | No | +| Type hierarchy

r365989 - Initialize the non-trivial C union bits I added to RecordDeclBitfields

2019-07-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Jul 12 20:59:55 2019 New Revision: 365989 URL: http://llvm.org/viewvc/llvm-project?rev=365989&view=rev Log: Initialize the non-trivial C union bits I added to RecordDeclBitfields in r365985 These bits weren't being initialized in the RecordDecl's constructor, which prob

[PATCH] D64614: [clangd] Mark type hierarchy as a supported feature in the docs

2019-07-12 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clang-tools-extra/docs/clangd/Features.rst:264 +-++--+ -| Type hierarchy | No | No | +| Type hierarchy | No | Ye

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: lld/wasm/Driver.cpp:543 + "__wasm_init_tls", WASM_SYMBOL_VISIBILITY_HIDDEN, + make(I32ArgSignature, "__wasm_init_tls")); + quantum wrote: > aheejin wrote: > > Does this TLS thing work when `Config->Shared == tr

[PATCH] D64614: [clangd] Mark type hierarchy as a supported feature in the docs

2019-07-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/docs/clangd/Features.rst:264 +-++--+ -| Type hierarchy | No | No | +| Type hierarchy

[PATCH] D64308: [clangd] Implement typeHierarchy/resolve for subtypes

2019-07-12 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365986: [clangd] Implement typeHierarchy/resolve for subtypes (authored by nridge, committed by ). Changed prior to commit: https://reviews.llvm.org/D64308?vs=209666&id=209669#toc Repository: rL LLVM

[PATCH] D64614: [clangd] Mark type hierarchy as a supported feature in the docs

2019-07-12 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365987: [clangd] Mark type hierarchy as a supported feature in the docs (authored by nridge, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r365987 - [clangd] Mark type hierarchy as a supported feature in the docs

2019-07-12 Thread Nathan Ridge via cfe-commits
Author: nridge Date: Fri Jul 12 20:24:54 2019 New Revision: 365987 URL: http://llvm.org/viewvc/llvm-project?rev=365987&view=rev Log: [clangd] Mark type hierarchy as a supported feature in the docs Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

[clang-tools-extra] r365986 - [clangd] Implement typeHierarchy/resolve for subtypes

2019-07-12 Thread Nathan Ridge via cfe-commits
Author: nridge Date: Fri Jul 12 20:24:48 2019 New Revision: 365986 URL: http://llvm.org/viewvc/llvm-project?rev=365986&view=rev Log: [clangd] Implement typeHierarchy/resolve for subtypes Summary: This allows the client to resolve subtypes one level at a time. For supertypes, this is not necessar

[PATCH] D64308: [clangd] Implement typeHierarchy/resolve for subtypes

2019-07-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 209666. nridge added a comment. Fix Windows test failure Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64308/new/ https://reviews.llvm.org/D64308 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-to

[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment. The revert is at https://reviews.llvm.org/D64687, which I will commit shortly if there are no objections. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64062/new/ https://reviews.llvm.org/D64062 _

[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment. This revision breaks python 2.7.16 builds, which are still supported by upstream python for a few more months. I'm preparing a revert. The file is getcompiler.c: /* Return the compiler identification, if possible. */ #include "Python.h" #ifndef COMPILER #ifdef __G

Re: r365825 - [clang-shlib] Fix clang-shlib for PRIVATE dependencies

2019-07-12 Thread Shoaib Meenai via cfe-commits
I struggled for a while thinking why PRIVATE might be useful in a target_link_libraries call for a shared library, and then I found https://cmake.org/pipermail/cmake/2016-May/063400.html. The relevant bit is: If you were paying careful attention, you would have noticed that when A links in B as

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added inline comments. Comment at: lld/test/wasm/data-segments.ll:7 ; RUN: wasm-ld -no-gc-sections --no-entry --shared-memory --max-memory=131072 %t.atomics.o -o %t.atomics.wasm -; RUN: obj2yaml %t.atomics.wasm | FileCheck %s --check-prefix ACTIVE +; RUN: obj2yaml %t.at

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365985: [Sema] Diagnose default-initialization, destruction, and copying of (authored by ahatanak, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to c

r365985 - [Sema] Diagnose default-initialization, destruction, and copying of

2019-07-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Jul 12 18:47:15 2019 New Revision: 365985 URL: http://llvm.org/viewvc/llvm-project?rev=365985&view=rev Log: [Sema] Diagnose default-initialization, destruction, and copying of non-trivial C union types This patch diagnoses uses of non-trivial C unions and structs/unions

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum added inline comments. Comment at: lld/test/wasm/data-segments.ll:7 ; RUN: wasm-ld -no-gc-sections --no-entry --shared-memory --max-memory=131072 %t.atomics.o -o %t.atomics.wasm -; RUN: obj2yaml %t.atomics.wasm | FileCheck %s --check-prefix ACTIVE +; RUN: obj2yaml %t.at

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum updated this revision to Diff 209658. quantum marked 14 inline comments as done. quantum added a comment. Change per review feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64537/new/ https://reviews.llvm.org/D64537 Files: clang/i

[PATCH] D64653: clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target

2019-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I committed this for you in rL365981 (it may have broken a Windows build for a long time. I wanted to fix it soon..). Thanks! % clang -target x86_64-windows -fsanitize=vptr -fno-rtti fsanitize.c '-###' clang-9: error: unsupported

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added inline comments. Comment at: lld/test/wasm/data-segments.ll:7 ; RUN: wasm-ld -no-gc-sections --no-entry --shared-memory --max-memory=131072 %t.atomics.o -o %t.atomics.wasm -; RUN: obj2yaml %t.atomics.wasm | FileCheck %s --check-prefix ACTIVE +; RUN: obj2yaml %t.at

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp:1 +// RUN: %clang_cc1 -emit-obj --std=c++17 -fcxx-exceptions -fexceptions %s +// PR40771: check that this input does not crash or assert This will run the ba

r365981 - clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target

2019-07-12 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Jul 12 17:47:58 2019 New Revision: 365981 URL: http://llvm.org/viewvc/llvm-project?rev=365981&view=rev Log: clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target The default implementation of getSupportedSanitizers isn't able to turn on the vptr sanitiz

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum updated this revision to Diff 209656. quantum added a comment. Use signed LEB128 for `i32.const`. Basically, do what D64612 did. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64537/new/ https://reviews.llv

Buildbot numbers for the week of 06/23/2019 - 06/29/2019

2019-07-12 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 06/23/2019 - 06/29/2019. 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

Buildbot numbers for the week of 06/30/2019 - 07/6/2019

2019-07-12 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the last week of 06/30/2019 - 07/6/2019. 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 gree

Buildbot numbers for the week of 05/26/2019 - 06/01/2019

2019-07-12 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 05/26/2019 - 06/01/2019. 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

Buildbot numbers for the week of 06/2/2019 - 06/8/2019

2019-07-12 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 06/2/2019 - 06/8/2019. 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 r

[PATCH] D64680: [analyzer] MallocChecker: Prevent Integer Set Library false positives

2019-07-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Here is an example of the mentioned use-after-free by pointer-escaping as an argument: https://llvm.org/reports/scan-build/report-DeclBase.cpp-getFromVoidPointer-0-1.html#EndPath CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64680/new/ https://reviews.llvm.org

[PATCH] D64653: clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target

2019-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Sorry, I accidentally updated this one by mistake. vptr is not always available. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64653/new/ https://re

[PATCH] D64680: [analyzer] MallocChecker: Prevent Integer Set Library false positives

2019-07-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 209654. Charusso marked 2 inline comments as done. Charusso added a comment. - Fix. - Move the logic to `free()` for better matching. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64680/new/ https://reviews.llvm.org/D64680 Files: clang/lib/Stati

[PATCH] D64680: [analyzer] MallocChecker: Prevent Integer Set Library false positives

2019-07-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D64680#1584076 , @NoQ wrote: > Change of plans: let's suppress the warning when our `free()` is done within > the function that has `__isl_take` in its definition. So, like, ascend the > chain of location contexts and check y

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan added a comment. In D64666#1583792 , @xbolva00 wrote: > In D64666#1583667 , @ziangwan wrote: > > > In D64666#1583633 , @xbolva00 > > wrote: > > > > > You can check

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum added a comment. In D64537#1584069 , @dschuff wrote: > Oh, btw, any reason these have to be passive segments? Why can't we just make > them active segments and let the VM initialize them for us? These need to be passive segments so that we can i

[PATCH] D64610: [clang] allow -fthinlto-index= without -x ir

2019-07-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. LGTM with the comment fix from @MaskRay Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64610/new/ https://reviews.llvm.org/D64610 ___ cfe-com

[PATCH] D64680: [analyzer] MallocChecker: Prevent Integer Set Library false positives

2019-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Oh damn, i just realized that this way we track much more pointers than before, because we cannot restrict ourselves to pointers that have been explicitly malloc()ed during analysis. After all, we don't need to see the allocation site to diagnose use-after-free. I'm afraid

[PATCH] D64610: [clang] allow -fthinlto-index= without -x ir

2019-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2123 + + // If running with -thinlto-index=, extensions that normally identify + // native object files actually identify LLVM bitcode files. `-fthinlto-index=` Repository:

r365976 - [DirectoryWatcher][test][NFC] Add information to test failure reports

2019-07-12 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Jul 12 17:09:04 2019 New Revision: 365976 URL: http://llvm.org/viewvc/llvm-project?rev=365976&view=rev Log: [DirectoryWatcher][test][NFC] Add information to test failure reports Modified: cfe/trunk/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp Modified: cfe/tr

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Oh, btw, any reason these have to be passive segments? Why can't we just make them active segments and let the VM initialize them for us? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64537/new/ https://reviews.llvm.org/D6

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D64675#1584016 , @jfb wrote: > I would keep single stores because it's pretty silly codegen to copy from a > global for that. > > I would also verify that `-O0` isn't affected too badly by this change. I will. And maybe I'

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. If there's any chance this TLS ABI could be useful for WASI (I don't know if there's been any WASI work on threads yet, but it seems like there's no reason it couldn't be), then we should start a doc in tool-conventions for it. If not then we should get it behind the em

[PATCH] D64610: [clang] allow -fthinlto-index= without -x ir

2019-07-12 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. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64610/new/ https://reviews.llvm.org/D64610 ___ cfe-c

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209644. Nathan-Huckleberry added a comment. - Add warning-free test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/ https://reviews.llvm.org/D64678 Files: clang/lib/Sema/SemaDecl.cp

[PATCH] D64676: Support __seg_fs and __seg_gs on x86

2019-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 209645. jfb added a comment. - Fix test order Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64676/new/ https://reviews.llvm.org/D64676 Files: clang/docs/LanguageExtensions.rst clang/lib/Basic/Targets/X86.cpp

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for the patch. Minor nits looking for test cases that should have no warning (like the two examples provided in the bug). Comment at: clang/test/Sema/warn-uninitialized-statement-expression.c:7 + int i = ({ +int z = i; // expected-w

[PATCH] D64680: [analyzer] MallocChecker: Prevent Integer Set Library false positives

2019-07-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Integer Set Library using retain-count based allocation which i

[PATCH] D64655: [Clang][Driver] don't error for unsupported as options for -no-integrated-as

2019-07-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Sorry, I missed this thread (and the other one) yesterday. Thanks for sorting out my mess; I'll think about what I want to do for the reland. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64655/new/ https://reviews.llvm.org

Re: r365724 - clang-cl: Remove -O0 option

2019-07-12 Thread Nico Weber via cfe-commits
Looks like you didn't add UNSUPPORTED and went for the right fix immediately in https://reviews.llvm.org/D64587. Thanks for taking care of this! On Thu, Jul 11, 2019 at 4:04 PM Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > This seems to have caused a libfuzzer test to fail

r365975 - Re-land [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

2019-07-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jul 12 16:38:31 2019 New Revision: 365975 URL: http://llvm.org/viewvc/llvm-project?rev=365975&view=rev Log: Re-land [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands. Use //net/dir like other test cases for windows compatibility Modif

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I would keep single stores because it's pretty silly codegen to copy from a global for that. I would also verify that `-O0` isn't affected too badly by this change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64675/new/ htt

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 209638. vitalybuka added a comment. Remove single store Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64675/new/ https://reviews.llvm.org/D64675 Files: clang/lib/CodeGen/CGDecl.cpp Index: clang/lib/Code

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. That's interesting. If `MemCpyOpt` has picked up the slack and clang can be simpler here, then let's remove clang's "intelligence". I do want to make sure that it handles all the cases this handles though, and does indeed generate great code on both x86-64 and ARM64. I thin

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209637. Nathan-Huckleberry added a comment. - Fixed style Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/ https://reviews.llvm.org/D64678 Files: clang/lib/Sema/SemaDecl.cpp clang/test/S

[PATCH] D64671: New clang-tidy check: misc-init-local-variables

2019-07-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/InitLocalVariablesCheck.cpp:8 +//===--===// +#include "InitLocalVariablesCheck.h" +#include "clang/AST/ASTContext.h" ---

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209636. Nathan-Huckleberry added a comment. - Adding fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/ https://reviews.llvm.org/D64678 Files: clang/lib/Sema/SemaDecl.cpp clang/test/Se

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Do not automatically self references of structs in statement expression as warnings. Instead wait for uninitialized cfg analysis. https://bugs.llvm.org/show_bug.cgi?id=42604 Repositor

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209634. Nathan-Huckleberry added a comment. - Forgot to fix list.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 Files: clang-tools-extra/docs/clang-t

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63753/new/ https://reviews.llvm.org/D63753 ___ cfe-com

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209632. Nathan-Huckleberry added a comment. - Added script for generation of docs based off Checkers.td - Updated to match newly standardized anchor urls - Add auto redirect and remove alpha checkers Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64656/new/ https://reviews.llvm.org/D64656 ___

[PATCH] D64676: Support __seg_fs and __seg_gs on x86

2019-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. Herald added subscribers: cfe-commits, dexonsmith, jkorous. Herald added a project: clang. GCC supports named address spaces macros: https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html clang does as well with address spaces: https://clang.llvm.org/docs/L

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Øystein Dale via Phabricator via cfe-commits
oydale updated this revision to Diff 209627. oydale added a comment. Minimized test case further, removed misleading CHECK from comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64656/new/ https://reviews.llvm.org/D64656 Files: clang/lib/Cod

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added reviewers: glider, jfb. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Not rely a review, but removing this code I see slight improvements in binary size on CTMark. Looks like with "ptr" patches MemCpyOptPass is

[PATCH] D64646: [OPENMP]Add support for analysis of if clauses.

2019-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks great! Thank you for improving the tests even further. Comment at: test/Analysis/cfg-openmp.cpp:58-67 #pragma omp distribute simd for (int i = 0; i < 10; ++i) argc =

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 209626. ahatanak added a comment. In Type.h, move method declarations down and mention that the predicates imply the associated basic non-triviality predicates. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63753/new/ https

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 209622. ahatanak marked 3 inline comments as done. ahatanak added a comment. Improve comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63753/new/ https://reviews.llvm.org/D63753 Files: include/clang/AST/Decl.h inc

r365969 - NFC: utils/perf-training: Python 3 compatibility for lit.cfg

2019-07-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Jul 12 15:29:44 2019 New Revision: 365969 URL: http://llvm.org/viewvc/llvm-project?rev=365969&view=rev Log: NFC: utils/perf-training: Python 3 compatibility for lit.cfg The output of subprocess.check_output is now bytes. We need to decode it. Modified: cfe/trunk/ut

r365968 - [DirectoryWatcher][NFC] Silence warnings in release build

2019-07-12 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Jul 12 15:25:17 2019 New Revision: 365968 URL: http://llvm.org/viewvc/llvm-project?rev=365968&view=rev Log: [DirectoryWatcher][NFC] Silence warnings in release build Modified: cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp cfe/trunk/unittests/Dir

[PATCH] D64600: [ObjC] Add an attribute that "clamps" signed char BOOLs to {0,1}

2019-07-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3279 +def ObjCClampingBool : TypeAttr { + let Spellings = [Clang<"objc_clamping_bool">]; + let Subjects = SubjectList<[TypedefName]>; erik.pilkington wrote: > aaron.ballman wrote: >

[PATCH] D64669: [clang-doc] Fix failing tests on Windows

2019-07-12 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365967: [clang-doc] Fix failing tests on Windows (authored by juliehockett, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D64671: New clang-tidy check: misc-init-local-variables

2019-07-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. This certainly needs more tests: macros, `-x C`, ??? Comment at: clang-tools-extra/clang-tidy/misc/InitLocalVariablesCheck.cpp:26-29 + if(!MatchedDecl->isLocalVarDecl()) +return; + if(MatchedDecl->hasInit()) +return; Can ma

[clang-tools-extra] r365967 - [clang-doc] Fix failing tests on Windows

2019-07-12 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Fri Jul 12 15:19:02 2019 New Revision: 365967 URL: http://llvm.org/viewvc/llvm-project?rev=365967&view=rev Log: [clang-doc] Fix failing tests on Windows Tests on Windows were failing due to path separator differences. '/' was being used as separator in the expected outp

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3245 +def warn_impcast_integer_float_precision : Warning< + "implicit conversion from %0 to %1 may loses integer precision">, + InGroup, DefaultIgnore; ziangwan

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, just a few minor comment requests now. Comment at: include/clang/AST/DeclBase.h:1453 +/// copy. +uint64_t HasNonTrivialToPrimitiveCopyCUnion : 1; + Please include in these comments that these imply the associated basic

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:11430 +SmallString<32> PrettyTargetValue; +TargetFloatValue.toString(PrettyTargetValue, + TargetPrecision); Can you check my older patch + tests + discussion? I

r365966 - [DirectoryWatcher][linux] Fix use of uninitialized value

2019-07-12 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Jul 12 15:11:43 2019 New Revision: 365966 URL: http://llvm.org/viewvc/llvm-project?rev=365966&view=rev Log: [DirectoryWatcher][linux] Fix use of uninitialized value Modified: cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp Modified: cfe/trunk/lib/Dir

[PATCH] D64672: [X86] Prevent passing vectors of __int128 as in llvm IR

2019-07-12 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: eli.friedman, RKSimon, spatel, rnk. As far as I can tell, gcc passes 256/512 bit vectors __int128 in memory. And passes a vector of 1 _int128 in an xmm register. The backend considers as an illegal type and will scalarize any argu

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D64666#1583667 , @ziangwan wrote: > In D64666#1583633 , @xbolva00 wrote: > > > You can check also https://reviews.llvm.org/D52835. I hit there issue which > > I didn't know how to solve

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Øystein Dale via Phabricator via cfe-commits
oydale marked an inline comment as done. oydale added inline comments. Comment at: clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp:2 +// RUN: %clang_cc1 -emit-obj --std=c++17 -fcxx-exceptions -fexceptions -O1 %s +// CHECK no crash + rjmccall wrote

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan marked 2 inline comments as done. ziangwan added inline comments. Comment at: clang/test/Sema/implicit-float-conversion.c:29 + double e = 0.0; + double f = i + e; +} etalvala wrote: > should this also test the case of: > ` > long g = L; > l

[PATCH] D64671: New clang-tidy check: misc-init-local-variables

2019-07-12 Thread Jussi Pakkanen via Phabricator via cfe-commits
jpakkane created this revision. jpakkane added a reviewer: alexfh. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. This checks finds all primitive type local variables (integers, doubles, pointers) that are declared without an initial value. Includes fixit functiona

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh, I see you've already answered that. I think it's fine to just leave this testing debug output if generated optimized output doesn't affect it; the bulk of our regression testing is with assertions-enabled compilers anyway. Repository: rG LLVM Github Monorepo C

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan marked 6 inline comments as done. ziangwan added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3245 +def warn_impcast_integer_float_precision : Warning< + "implicit conversion from %0 to %1 may loses integer precision">, + InGroup, Defau

[PATCH] D64669: [clang-doc] Fix failing tests on Windows

2019-07-12 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett accepted this revision. juliehockett added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64669/new/ https://reviews.llvm.org/D64669 ___ cfe-commits mailing list c

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp:2 +// RUN: %clang_cc1 -emit-obj --std=c++17 -fcxx-exceptions -fexceptions -O1 %s +// CHECK no crash + oydale wrote: > lebedev.ri wrote: > > Either add miss

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan updated this revision to Diff 209611. ziangwan added a comment. Fix spelling / comment / naming issues. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Driver/ToolCha

[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Thanks @rnk :) Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64062/new/ https://reviews.llvm.org/D64062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D64669: [clang-doc] Fix failing tests on Windows

2019-07-12 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran created this revision. DiegoAstiazaran added reviewers: juliehockett, jakehehrlich, lebedev.ri. DiegoAstiazaran added a project: clang-tools-extra. Tests on Windows were failing due to path separator differences. '/' was being used as separator in the expected output, paths in exp

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Øystein Dale via Phabricator via cfe-commits
oydale marked 2 inline comments as done. oydale added inline comments. Comment at: clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp:1 +// RUN: %clang_cc1 -emit-obj --std=c++17 -fcxx-exceptions -fexceptions -O1 %s +// CHECK no crash lebedev.ri wrote

[PATCH] D64600: [ObjC] Add an attribute that "clamps" signed char BOOLs to {0,1}

2019-07-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3279 +def ObjCClampingBool : TypeAttr { + let Spellings = [Clang<"objc_clamping_bool">]; + let Subjects = SubjectList<[TypedefName]>; aaron.ballman wrote: > Is there a desire f

[PATCH] D64600: [ObjC] Add an attribute that "clamps" signed char BOOLs to {0,1}

2019-07-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 209603. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64600/new/ https://reviews.llvm.org/D64600 Files: clang/include/clang/Basic/

[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365962: Remove __VERSION__ (authored by sylvestre, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D64062?vs=2094

r365962 - Remove __VERSION__

2019-07-12 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Fri Jul 12 14:45:08 2019 New Revision: 365962 URL: http://llvm.org/viewvc/llvm-project?rev=365962&view=rev Log: Remove __VERSION__ Summary: It has been introduced in 2011 for gcc compat: https://github.com/llvm-mirror/clang/commit/ad1a4c6e89594e704775ddb6b036ac982fd68cad i

  1   2   3   >