[PATCH] D47564: [Parse] Use CapturedStmt for @finally on MSVC

2018-06-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D47564#1119874, @smeenai wrote: > In https://reviews.llvm.org/D47564#1118424, @rjmccall wrote: > > > No, it was just a general question. Have you gotten this to a point where > > it's testable? > > > Yup, it's been working fine in my local t

[PATCH] D47672: [Headers] Add _Interlocked*_HLEAcquire/_HLERelease

2018-06-01 Thread Ethan via Phabricator via cfe-commits
ethanhs created this revision. Herald added a subscriber: cfe-commits. Adds MSVC intrinsics for atomic exchange and compare & exchange. Repository: rC Clang https://reviews.llvm.org/D47672 Files: lib/Headers/immintrin.h lib/Headers/intrin.h Index: lib/Headers/intrin.h =

r333815 - Revert "This diff includes changes for supporting the following types."

2018-06-01 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Fri Jun 1 20:27:13 2018 New Revision: 333815 URL: http://llvm.org/viewvc/llvm-project?rev=333815&view=rev Log: Revert "This diff includes changes for supporting the following types." This reverts commit r333814, which fails for a test checking the bit width on ubuntu.

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-06-01 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333814: This diff includes changes for supporting the following types. (authored by leonardchan, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.or

r333814 - This diff includes changes for supporting the following types.

2018-06-01 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Fri Jun 1 19:58:51 2018 New Revision: 333814 URL: http://llvm.org/viewvc/llvm-project?rev=333814&view=rev Log: This diff includes changes for supporting the following types. ``` // Primary fixed point types signed short _Accum s_short_accum; signed _Accum s_accum; sign

[PATCH] D47671: [analyzer] Implement copy elision.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. This patch builds on top of https://reviews.llvm.org/D47616 to elide pre-C++17 elidable constructors during analysis. Th

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-06-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 149596. EricWF edited the summary of this revision. EricWF added a comment. Update the patch with the form suggested in the previous conversation. See the updated summary for a description of the behavior. The Darwin driver no longer passes `-faligned-alloc-u

[PATCH] D47564: [Parse] Use CapturedStmt for @finally on MSVC

2018-06-01 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D47564#1118424, @rjmccall wrote: > In https://reviews.llvm.org/D47564#1118423, @smeenai wrote: > > > In https://reviews.llvm.org/D47564#1118381, @rjmccall wrote: > > > > > That's an interesting idea. I don't see any particular reason not to do

r333810 - [cmake] Support LLD for CLANG_ORDER_FILE

2018-06-01 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Fri Jun 1 18:22:39 2018 New Revision: 333810 URL: http://llvm.org/viewvc/llvm-project?rev=333810&view=rev Log: [cmake] Support LLD for CLANG_ORDER_FILE LLD also supports order files using the `--symbol-ordering-file` option. As the name would suggest, the order file format

[PATCH] D47669: [cmake] Support LLD for CLANG_ORDER_FILE

2018-06-01 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333810: [cmake] Support LLD for CLANG_ORDER_FILE (authored by smeenai, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47669 Files: cfe/trunk/t

[PATCH] D47669: [cmake] Support LLD for CLANG_ORDER_FILE

2018-06-01 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D47669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D47669: [cmake] Support LLD for CLANG_ORDER_FILE

2018-06-01 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added reviewers: beanz, compnerd, phosek. Herald added a subscriber: mgorny. smeenai added a subscriber: alexshap. LLD also supports order files using the `--symbol-ordering-file` option. As the name would suggest, the order file format is slightly different

r333808 - [cmake] Use LLVM's check_linker_flag

2018-06-01 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Fri Jun 1 17:49:54 2018 New Revision: 333808 URL: http://llvm.org/viewvc/llvm-project?rev=333808&view=rev Log: [cmake] Use LLVM's check_linker_flag LLVM already defines this function, so make use of it instead of rolling our own. Modified: cfe/trunk/tools/driver/CMakeL

[PATCH] D47668: [Driver][Fuchsia] Pass LTO flags to linker

2018-06-01 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: mcgrathr, juliehockett. Herald added subscribers: cfe-commits, inglorion. Even though we use lld by default for Fuchsia, we use Gold plugin arguments like all other drivers as lld supports Gold plugin options. Repository: rC Clang https://

[PATCH] D47667: [CFG] [analyzer] Remove unnecessary CXXBindTemporaryExpr from lifetime-extended temporary construction contexts.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. `CXXBindTemporaryExpr ` is used for attaching the destructor of the temporary object to it. If the object is lifetime-e

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-01 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In https://reviews.llvm.org/D47666#1119821, @vitalybuka wrote: > Good practice is to avoid merging changes into a single one. > Here one patch should be "refactoring" and the second for > "loop-proto-fuzzer." We are doing this for several reasons: 1. smaller patch

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-01 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. Good practice is to avoid merging changes into a single one. Here one patch should be "refactoring" and the second for "loop-proto-fuzzer." Comment at: tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp:29 +/* static std::vector CLArgs; --

[PATCH] D47658: [analyzer] Re-enable lifetime extension for temporaries with destructors and bring back static temporaries.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 149586. NoQ added a comment. Remove the outdated FIXME comment. https://reviews.llvm.org/D47658 Files: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp test/Analysis/lifetime-extension.cpp test/Analysis/temporaries-callback-order.cpp Index: test/Analysis/tempor

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-01 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 149585. emmettneyman added a comment. - Took out a debug print statement Repository: rC Clang https://reviews.llvm.org/D47666 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp tools/clang-fuzzer/FuzzerInit

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-01 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: vitalybuka, kcc, morehouse. Herald added subscribers: cfe-commits, mgorny. Refactored LLVMFuzzerInitialize function into its own file. Copied and renamed some files in preparation for new loop-proto-fuzzer. Repository: rC Clang

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-06-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D45015#1119286, @ahatanak wrote: > In https://reviews.llvm.org/D45015#1105388, @rsmith wrote: > > > In https://reviews.llvm.org/D45015#1105372, @vsapsai wrote: > > > > > What when compiler has `__builtin_operator_new`, > > > `__builtin_operator

Re: r333802 - Add Features.def to module map

2018-06-01 Thread Aaron Ballman via cfe-commits
On Fri, Jun 1, 2018 at 6:52 PM, Eric Fiselier via cfe-commits wrote: > Author: ericwf > Date: Fri Jun 1 15:51:59 2018 > New Revision: 333802 > > URL: http://llvm.org/viewvc/llvm-project?rev=333802&view=rev > Log: > Add Features.def to module map Thank you! I didn't know I had missed that. ~Aaro

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-06-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. The new path forward sounds good to me. I'll work on implementing it. Repository: rC Clang https://reviews.llvm.org/D45015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D47393: [clang-format] Disable AlwaysBreakBeforeMultilineStrings in Google style for Objective-C đź“ś

2018-06-01 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Polling the Google Objective-C community to see if anyone objects to this change. So far no concerns have been raised. Repository: rC Clang https://reviews.llvm.org/D47393 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-06-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I think clang should error out or warn when aligned operator or builtin operator new/delete functions are used when they are not available (r306722 should have handled them). I'm also not sure not defining `__cpp_aligned_new` is sufficient. My understanding is that if

r333802 - Add Features.def to module map

2018-06-01 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Jun 1 15:51:59 2018 New Revision: 333802 URL: http://llvm.org/viewvc/llvm-project?rev=333802&view=rev Log: Add Features.def to module map Modified: cfe/trunk/include/clang/module.modulemap Modified: cfe/trunk/include/clang/module.modulemap URL: http://llvm.org/view

[PATCH] D47607: [libcxx] Almost fix some UB in and

2018-06-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D47607#1118464, @EricWF wrote: > One other concern I have is if there will be any performance impact to using > `launder` all the time, but better safe than sorry. In the short-to-medium term, I think we can tackle this by adding an attribute

[PATCH] D47665: Refactored clang-fuzzer in preparation for adding new loop-proto-fuzzer

2018-06-01 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: tools/clang-fuzzer/CMakeLists.txt:17 ExampleClangProtoFuzzer.cpp + FuzzerInitialize.cpp ) this file is missing Comment at: tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp:29 +/* static std:

[PATCH] D47665: Refactored clang-fuzzer in preparation for adding new loop-proto-fuzzer

2018-06-01 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: vitalybuka, kcc, morehouse. Herald added subscribers: cfe-commits, mgorny. Refactored LLVMFuzzerInitialize function into its own file. Copied and renamed files in preparation for new loop-proto-fuzzer. Repository: rC Clang h

[PATCH] D47616: [CFG] [analyzer] Explain copy elision through construction contexts.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/Analysis/CFG.cpp:1320 +auto *MTE = cast(Child); +findConstructionContexts(ConstructionContextLayer::create( + cfg->getBumpVectorContext(), MTE, Layer), NoQ wrote: > geo

[PATCH] D47616: [CFG] [analyzer] Explain copy elision through construction contexts.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 149571. NoQ added a comment. Actually let's use lambdas as well. https://reviews.llvm.org/D47616 Files: include/clang/Analysis/ConstructionContext.h lib/Analysis/CFG.cpp lib/Analysis/ConstructionContext.cpp lib/StaticAnalyzer/Core/ExprEngineCXX.cpp te

[PATCH] D47616: [CFG] [analyzer] Explain copy elision through construction contexts.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 149568. NoQ marked 2 inline comments as done. NoQ added a comment. Actually let's do a separate context kind. The difference in semantics they represent is so drastically different that i think it's worth it. https://reviews.llvm.org/D47616 Files: include/cl

[PATCH] D47616: [CFG] [analyzer] Explain copy elision through construction contexts.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/Analysis/CFG.cpp:1320 +auto *MTE = cast(Child); +findConstructionContexts(ConstructionContextLayer::create( + cfg->getBumpVectorContext(), MTE, Layer), george.karpenkov

[PATCH] D47658: [analyzer] Re-enable lifetime extension for temporaries with destructors and bring back static temporaries.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 149567. NoQ added a comment. Fix comments in the callback test. The test itself is pretty pointless now, because the behavior that it was supposed to test was a workaround for lack of lifetime extension support. https://reviews.llvm.org/D47658 Files: lib/St

[PATCH] D47616: [CFG] [analyzer] Explain copy elision through construction contexts.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Whoops wrong patch. https://reviews.llvm.org/D47616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47616: [CFG] [analyzer] Explain copy elision through construction contexts.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 149566. NoQ added a comment. Fix comments in the callback test. The test itself is pretty pointless now, because the behavior that it was supposed to test was a workaround for lack of lifetime extension support. https://reviews.llvm.org/D47616 Files: lib/St

[PATCH] D47135: [analyzer] A checker for dangling internal buffer pointers in C++

2018-06-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 accepted this revision. xbolva00 added a comment. Looks fine, awesome feature! https://reviews.llvm.org/D47135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-06-01 Thread John McCall via Phabricator via cfe-commits
rjmccall closed this revision. rjmccall added a comment. Landed as r333791. Repository: rC Clang https://reviews.llvm.org/D46042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34796: upporting -f(no)-reorder-functions flag, clang side change

2018-06-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Ping https://reviews.llvm.org/D34796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47658: [analyzer] Re-enable lifetime extension for temporaries with destructors and bring back static temporaries.

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. I don't remember why lifetime extension for temporaries without destructors was disabled. It's clearly less important an

r333791 - Cap "voluntary" vector alignment at 16 for all Darwin platforms.

2018-06-01 Thread John McCall via cfe-commits
Author: rjmccall Date: Fri Jun 1 14:34:26 2018 New Revision: 333791 URL: http://llvm.org/viewvc/llvm-project?rev=333791&view=rev Log: Cap "voluntary" vector alignment at 16 for all Darwin platforms. This fixes two major problems: - We were not capping vector alignment as desired on 32-bit ARM. -

[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

2018-06-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D46013#1119513, @efriedma wrote: > > I'm not sure it's appropriate to impose this as an overhead on all targets. > > You mean the overhead of increasing the size of TypeInfo? That's fair. Yeah. It seems like something that could be pretty

[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

2018-06-01 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > I'm not sure it's appropriate to impose this as an overhead on all targets. You mean the overhead of increasing the size of TypeInfo? That's fair. https://reviews.llvm.org/D46013 ___ cfe-commits mailing list cfe-commits

[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

2018-06-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'm not sure it's appropriate to impose this as an overhead on all targets. https://reviews.llvm.org/D46013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D35110#1117401, @baloghadamsoftware wrote: > Sorry, Artem, but it does not work this way. Even if the symbolic expressions > are constrained to `[-MAX/4..MAX/4]`, after rearrangement the difference > still uses the whole range, thus `m>n` becomes

[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

2018-06-01 Thread Momchil Velikov via Phabricator via cfe-commits
chill marked 2 inline comments as done. chill added a comment. In https://reviews.llvm.org/D46013#1118014, @efriedma wrote: > I'm not sure Apple will want to mess with their ABI like this... adding some > reviewers. Fair enough, I'd rather not touch it :) https://reviews.llvm.org/D46013 _

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-01 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In https://reviews.llvm.org/D47617#1119257, @george.karpenkov wrote: > LGTM with a nit on a test name. Same. In https://reviews.llvm.org/D47617#1119268, @NoQ wrote: > Also does this test need to be z3-specific? We would also not like to crash > here without z3. I had

[PATCH] D47627: [ASTContext] Make getAddrSpaceQualType replace address spaces.

2018-06-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Is there a specific reason to change the implementation instead of changing the documentation? Repository: rC Clang https://reviews.llvm.org/D47627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

2018-06-01 Thread Momchil Velikov via Phabricator via cfe-commits
chill updated this revision to Diff 149536. chill added a comment. Update: - fix only APCS, don't touch other ABIs - misc other https://reviews.llvm.org/D46013 Files: include/clang/AST/ASTContext.h include/clang/AST/RecordLayout.h lib/AST/ASTContext.cpp lib/AST/RecordLayout.cpp lib/A

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-06-01 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D47394#1119056, @Hahnfeld wrote: > Hmm, maybe the scope is much larger: I just tried linking an executable that > references a `declare target` function in a shared library. My assumption was > that this already works, given that `libomptarg

[PATCH] D46911: [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents

2018-06-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 149533. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D46911 Files: include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-06-01 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 149532. malaperle marked 4 inline comments as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44954 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/Index.h clangd

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-06-01 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: unittests/clangd/CodeCompleteTests.cpp:741 +TEST(CompletionTest, Enums) { + EXPECT_THAT(completions(R"cpp( ioeric wrote: > malaperle wrote: > > ioeric wrote: > > > It's not clear to me what the following tests (`Enu

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D47623#1118951, @ilya-biryukov wrote: > In https://reviews.llvm.org/D47623#1118810, @sammccall wrote: > > > - friend decls that are not definitions should be ignored for indexing > > purposes > > > This is not generally true IIUC. A friend decl

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-01 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 149524. mikhail.ramalho added a comment. - Simplified the API even further by constructing a Z3ConstraintManager object directly. - Update isModelFeasible to return a isModelFeasible - Update code with the fix for 1-bit long integer https://reviews.

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 149528. ioeric added a comment. - Remove debug message. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47623 Files: clangd/index/SymbolCollector.cpp clangd/index/SymbolCollector.h unittests/clangd/SymbolCollectorTests.cpp Index: unit

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-06-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi all, I'll be attempting to commit this patch around 6pm PT today unless anyone has any more comments on this specific patch. Any other suggestions regarding potential design changes can be discussed in future patches since this is only the first of many. Reposi

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 149526. ioeric added a comment. - Make canonical decls determinstic. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47623 Files: clangd/index/SymbolCollector.cpp clangd/index/SymbolCollector.h unittests/clangd/SymbolCollectorTests.cpp

r333778 - [X86] Rewrite avx512vbmi unmasked and maskz macro intrinsics to be wrappers around their __builtin function with appropriate arguments rather than just passing arguments to the masked intrin

2018-06-01 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Jun 1 11:26:35 2018 New Revision: 333778 URL: http://llvm.org/viewvc/llvm-project?rev=333778&view=rev Log: [X86] Rewrite avx512vbmi unmasked and maskz macro intrinsics to be wrappers around their __builtin function with appropriate arguments rather than just passing ar

[PATCH] D47613: Mark __c11_atomic_load as const

2018-06-01 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333776: Mark __c11_atomic_load as const (authored by jfb, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47613 Files: libcxx/trunk/include/ato

[libcxx] r333776 - Mark __c11_atomic_load as const

2018-06-01 Thread JF Bastien via cfe-commits
Author: jfb Date: Fri Jun 1 11:02:53 2018 New Revision: 333776 URL: http://llvm.org/viewvc/llvm-project?rev=333776&view=rev Log: Mark __c11_atomic_load as const Summary: C++11 onwards specs the non-member functions atomic_load and atomic_load_explicit as taking the atomic by const (potentially

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-06-01 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. We could leave `disableSourceFileDiagnostics` off until someone finds a use case for it. Repository: rC Clang https://reviews.llvm.org/D47445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @mikhail.ramalho I assume you know it, but just in case, you can mark dependencies in phabricator by adding "parent" revisions. https://reviews.llvm.org/D45517 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D47616: [CFG] [analyzer] Explain copy elision through construction contexts.

2018-06-01 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. There's quite a lot of code duplication here, I think we could do better with that. Great job modeling semantics though! Comment at: lib/Analys

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-06-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D45015#1105388, @rsmith wrote: > In https://reviews.llvm.org/D45015#1105372, @vsapsai wrote: > > > What when compiler has `__builtin_operator_new`, > > `__builtin_operator_delete`? If I build libc++ tests with recent Clang > > which has thes

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. We might as well make a directory for z3-specific tests. Eg., `z3/bool-bit-width.c`. Also does this test need to be z3-specific? We would also not like to crash here without z3. Repository: rC Clang https://reviews.llvm.org/D47617 ___

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Thanks! Repository: rC Clang https://reviews.llvm.org/D47617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D47201#1119249, @tra wrote: > IIUIC, nv_weak is a synonym for weak (why, oh why did they need > it?) > You may need to hunt down and change few other places that deal with the > weak attribute. > E.g.: > https://github.com/llvm-proje

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-01 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. LGTM with a nit on a test name. Comment at: test/Analysis/pr37646.c:1 +// REQUIRES: z3 +// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9

[PATCH] D47070: [CUDA] Upgrade linked bitcode to enable inlining

2018-06-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. IMO overriding TargetTransformInfo::areInlineCompatible to always return true on NVPTX is what we want to do instead of upgrading everything else. AFAICT, on NVPTX there's no reason to prevent inlining due to those attributes -- we'll never generate code, nor will we ever ex

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. IIUIC, nv_weak is a synonym for weak (why, oh why did they need it?) You may need to hunt down and change few other places that deal with the weak attribute. E.g.: https://github.com/llvm-project/llvm-project-20170507/blob/master/clang/lib/AST/Decl.cpp#L4267 https://github.

[PATCH] D47578: Do not enforce absolute path argv0 in windows

2018-06-01 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. It seems like you are trying a bit too hard to keep the original code which is not always a good idea to keep the clarity of the code. So, IIUC, you this function: - returns a full filename of the current executable. That can be written using GetModuleFileName and GetLong

r333775 - [Coverage] Remove a test dependency on the itanium ABI

2018-06-01 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Jun 1 10:11:18 2018 New Revision: 333775 URL: http://llvm.org/viewvc/llvm-project?rev=333775&view=rev Log: [Coverage] Remove a test dependency on the itanium ABI This should address a bot failure: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/

[PATCH] D47267: [UnrollAndJam] Add unroll_and_jam pragma handling

2018-06-01 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. The RFC: https://lists.llvm.org/pipermail/cfe-dev/2018-May/058141.html https://reviews.llvm.org/D47267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. This looks OK, the asymmetry still seems a little odd to me and could be reduced a little. (Please also resolve Ilya's question about references with him, I don't have a strong opinion)

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-06-01 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 149500. juliehockett marked 8 inline comments as done. https://reviews.llvm.org/D43341 Files: clang-doc/BitcodeReader.cpp clang-doc/BitcodeReader.h clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWriter.h clang-doc/CMakeLists.txt clang-doc/Repre

[PATCH] D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

2018-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. @malaperle: would you mind patching this in and checking whether attaching a debugger still works on Mac (this was the reason for the EINTR loop, right?) I want to preserve this but now people other than me are complaining about old clangds hanging around and eating a

[PATCH] D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

2018-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: malaperle, ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, ioeric, klimek. The EINTR loop around getline was added to fix an issue with mac gdb, but seems to loop infinitely in rare cases on linux where the parent editor ex

[PATCH] D45202: [X86] Replacing X86-specific floor and ceil vector intrinsics with generic LLVM intrinsics

2018-06-01 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky updated this revision to Diff 149484. mike.dvoretsky added a comment. Changed the scalar intrinsic lowering to work via extract-insert. https://reviews.llvm.org/D45203 contains tests for folding the resulting IR patterns. https://reviews.llvm.org/D45202 Files: clang/lib/CodeG

[PATCH] D47628: Detect an incompatible VLA pointer assignment

2018-06-01 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/AST/ASTContext.cpp:8588 + Expr *E = VAT->getSizeExpr(); + if (E && VAT->getSizeExpr()->isIntegerConstantExpr(TheInt, *this)) +return std::make_pair(true, TheInt); `E && E->isIntegerCons

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-06-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:223-225 + ExplodedNode *Node = Context.generateNonFatalErrorNode(Context.getState()); + if (!Node) +return; Szelethus wrote: > NoQ wrote: > > Szelethus w

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-06-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Sorry for the limited activity. Unfortunately, I have very little time reviewing patches lately. I think we need to answer the following questions: - Does this change affect the analysis of the constructors of global objects? If so, how? - Do we want to import non-con

[PATCH] D47480: clang-cl: Expose -no-canonical-prefixes

2018-06-01 Thread Nico Weber via Phabricator via cfe-commits
thakis marked 2 inline comments as done. thakis added inline comments. Comment at: test/Driver/cl-options.c:595 +// RUN: -no-canonical-prefixes \ +// RUN: -fno-coverage-mapping \ // RUN: --version \ rnk wrote: > takuto.ikuta wrote: > > Is this relate

[PATCH] D47630: [Sema] Allow creating types with multiple of the same addrspace.

2018-06-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: test/Sema/address_spaces.c:17 int *_AS1 _AS2 *Z; // expected-error {{multiple address spaces specified for type}} + int *_AS1 _AS1 *M; bader wrote: > I think it might be valuable to give a warning or remark to us

r333762 - Remove redundant -fno-coverage-mapping added in r333761 (already added in r333423)

2018-06-01 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Jun 1 08:02:43 2018 New Revision: 333762 URL: http://llvm.org/viewvc/llvm-project?rev=333762&view=rev Log: Remove redundant -fno-coverage-mapping added in r333761 (already added in r333423) Modified: cfe/trunk/test/Driver/cl-options.c Modified: cfe/trunk/test/Driver/

[PATCH] D47480: clang-cl: Expose -no-canonical-prefixes

2018-06-01 Thread Nico Weber via Phabricator via cfe-commits
thakis closed this revision. thakis added a comment. r333761, thanks! https://reviews.llvm.org/D47480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-06-01 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Hmm, maybe the scope is much larger: I just tried linking an executable that references a `declare target` function in a shared library. My assumption was that this already works, given that `libomptarget`'s registration functions can be called multiple times. Am I doi

r333761 - clang-cl: Expose -no-canonical-prefixes

2018-06-01 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Jun 1 07:59:57 2018 New Revision: 333761 URL: http://llvm.org/viewvc/llvm-project?rev=333761&view=rev Log: clang-cl: Expose -no-canonical-prefixes -no-canonical-prefixes is a weird flag: In gcc, it controls whether realpath() is called on the path of the driver binary. It'

[clang-tools-extra] r333758 - [clangd] Compute better estimates for memory usage of the AST

2018-06-01 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Jun 1 07:44:57 2018 New Revision: 333758 URL: http://llvm.org/viewvc/llvm-project?rev=333758&view=rev Log: [clangd] Compute better estimates for memory usage of the AST Also fix the return value of IdleASTs::getUsedBytes(). It was 'bool' instead of 'size_t' *facepalm*

r333757 - [OpenMP] Fix typo in NVPTX linker, NFC.

2018-06-01 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Fri Jun 1 07:43:48 2018 New Revision: 333757 URL: http://llvm.org/viewvc/llvm-project?rev=333757&view=rev Log: [OpenMP] Fix typo in NVPTX linker, NFC. Clang calls "nvlink" for linking multiple object files with OpenMP target functions, so correct this information when prin

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:297 +// If OrigD is an object of a friend declaration, skip it. +if (ASTNode.OrigD->getFriendObjectKind() != +Decl::FriendObjectKind::FOK_None) sammccall wrote: > ioeric wr

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 149465. ioeric added a comment. - Clarify. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47623 Files: clangd/index/SymbolCollector.cpp unittests/clangd/SymbolCollectorTests.cpp Index: unittests/clangd/SymbolCollectorTests.cpp

[PATCH] D47630: [Sema] Allow creating types with multiple of the same addrspace.

2018-06-01 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/Sema/address_spaces.c:17 int *_AS1 _AS2 *Z; // expected-error {{multiple address spaces specified for type}} + int *_AS1 _AS1 *M; I think it might be valuable to give a warning or remark to user. Using the sa

r333752 - Fix unused variable warning from r333718

2018-06-01 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Jun 1 07:16:18 2018 New Revision: 333752 URL: http://llvm.org/viewvc/llvm-project?rev=333752&view=rev Log: Fix unused variable warning from r333718 Modified: cfe/trunk/lib/Lex/ModuleMap.cpp Modified: cfe/trunk/lib/Lex/ModuleMap.cpp URL: http://llvm.org/viewvc/

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-06-01 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:282-290 +def warn_unused_using_declaration : Warning< + "unused using declaration %0">, + InGroup, DefaultIgnore; +def warn_unused_using_directive : Warning< + "unused using direc

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-06-01 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D47394#1118957, @gtbercea wrote: > I'm surprised you now disagree with this technique, when I first introduced > you to this in an e-mail off list you agreed with it. My words were `I agree this is the best solution for NVPTX.` In the sam

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-06-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: libcxx/include/__hash_table:2261 +_NodeHandle +__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract_unique( +key_type const& __key) EricWF wrote: > If I'm not mistaken, `__node_handle_extract_uniqu

[PATCH] D47480: clang-cl: Expose -no-canonical-prefixes

2018-06-01 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta accepted this revision. takuto.ikuta added a comment. I confirmed this CL and https://reviews.llvm.org/D47578 remove absolute path from /showIncludes when include paths are given in relative. https://reviews.llvm.org/D47480 ___ cfe-com

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-06-01 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. > I disagree in this context because this patch currently means that static > archives will only work with NVPTX and there is no clear path how to "fix" > things for other offloading targets. I'll try to work on my proposal over the > next few days (sorry, very busy

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:293 assert(CompletionAllocator && CompletionTUInfo); + // A declaration created for a friend declaration should not be used as the + // canonical declaration in the index. ilya-biryuk

  1   2   >