[PATCH] D36441: Add Support for Reference Counting of Parameters on the Callee Side in RetainCountChecker

2017-08-07 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:3960-3971 + for (unsigned idx = 0, e = FD->getNumParams(); idx != e; ++idx) { +const ParmVarDecl *Param = FD->getParamDecl(idx); +SymbolRef Sym =

[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

2017-08-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D35056#834705, @rnk wrote: > In https://reviews.llvm.org/D35056#834689, @rsmith wrote: > > > I also removed some incorrect assumptions from the Win64 ABI code; this > > changed the behavior of one testcase from uncopyable-args.cpp > >

[PATCH] D36441: Add Support for Reference Counting of Parameters on the Callee Side in RetainCountChecker

2017-08-07 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 added inline comments. Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:2521-2523 + deriveAllocLocation(Ctx, sym); + if (!AllocBinding) +deriveParamLocation(Ctx, sym); I'm not sure what difference it will make if I change the

[PATCH] D36441: Add Support for Reference Counting of Parameters on the Callee Side in RetainCountChecker

2017-08-07 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 created this revision. Herald added a subscriber: eraman. Current RetainCountChecker performs reference counting of function arguments/parameters only on the caller side and not on the callee side. This patch aims to add support for reference counting on the callee-side for objects

[PATCH] D35670: [StaticAnalyzer] Handle LoopExit CFGElement in the analyzer

2017-08-07 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added inline comments. Comment at: include/clang/Analysis/ProgramPoint.h:658 +class LoopExit : public ProgramPoint { +public: Can you add a comment explaining what meaning of this program point is. Comment at:

[PATCH] D36423: [libc++] Introsort based sorting function

2017-08-07 Thread Ben Craig via Phabricator via cfe-commits
bcraig added a comment. alternatively, you could report the comparison of the old code vs. the new code with an existing benchmark, like benchmarks/algorithms.bench.cpp https://reviews.llvm.org/D36423 ___ cfe-commits mailing list

[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

2017-08-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D35056#834689, @rsmith wrote: > I also removed some incorrect assumptions from the Win64 ABI code; this > changed the behavior of one testcase from uncopyable-args.cpp > (`implicitly_deleted_copy_ctor::A` is now passed indirect). That's

r310332 - Fix openmp-offload.c test on Windows

2017-08-07 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Aug 7 18:36:16 2017 New Revision: 310332 URL: http://llvm.org/viewvc/llvm-project?rev=310332=rev Log: Fix openmp-offload.c test on Windows Modified: cfe/trunk/test/Driver/openmp-offload.c Modified: cfe/trunk/test/Driver/openmp-offload.c URL:

r310331 - [codeview] Fix class name formatting

2017-08-07 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Aug 7 18:33:53 2017 New Revision: 310331 URL: http://llvm.org/viewvc/llvm-project?rev=310331=rev Log: [codeview] Fix class name formatting In particular, removes spaces between template arguments of class templates to better match VS type visualizers. Modified:

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-07 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/tools/clang-fuzzer/cxx_proto.proto:17 +syntax = "proto2"; +//option cc_api_version = 2; + >> //option cc_api_version = 2; Please remove Comment at:

[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

2017-08-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 110115. rsmith edited the summary of this revision. rsmith added a comment. Herald added a subscriber: klimek. Remove added calls to `DeclareImplicit*` and `ShouldDeleteSpecialMember`. In their place, figure out whether an implicit special member would be

[libcxxabi] r310329 - [libc++abi] Use proper calling convention for TLS destructor

2017-08-07 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Mon Aug 7 17:54:33 2017 New Revision: 310329 URL: http://llvm.org/viewvc/llvm-project?rev=310329=rev Log: [libc++abi] Use proper calling convention for TLS destructor This is needed when using Windows threading. Modified: libcxxabi/trunk/src/cxa_exception_storage.cpp

[libunwind] r310327 - [CMake] Allow overriding lib dir suffix independently from LLVM

2017-08-07 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Aug 7 17:37:59 2017 New Revision: 310327 URL: http://llvm.org/viewvc/llvm-project?rev=310327=rev Log: [CMake] Allow overriding lib dir suffix independently from LLVM This matches the options already supported by libc++ and libc++abi. Differential Revision:

[PATCH] D35796: [analyzer] Misused polymorphic object checker

2017-08-07 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. This looks like a useful checker! Have you run this on large codebases yet? Does it find bugs? What kind of false positives do you see? Do you have a sense of what additional work would it take to bring this out of alpha and have it turned on by default? Other than

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-07 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. Why do we need LLVM_ENABLE_RTTI=ON here? https://reviews.llvm.org/D36324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36437: [clang] Get rid of "%T" expansions

2017-08-07 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. Seems reasonable to me. Repository: rL LLVM https://reviews.llvm.org/D36437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36437: [clang] Get rid of "%T" expansions

2017-08-07 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek created this revision. kubamracek added a project: clang. Herald added subscribers: mehdi_amini, klimek. The `%T` lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a

[PATCH] D36427: [libcxxabi][demangler] Improve representation of substitutions/templates

2017-08-07 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Oh, also found a couple of things you should likely split into prep commits to simplify this patch. Comment at: src/cxa_demangle.cpp:1575-1577 -sub_type names; -template_param_type subs; -Vector template_param; - Why

[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

2017-08-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. As requested by Vassil, I'm going to upload another version of this that avoids declaring implicit special members so frequently. https://reviews.llvm.org/D35056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36427: [libcxxabi][demangler] Improve representation of substitutions/templates

2017-08-07 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a comment. This revision now requires changes to proceed. This looks like a great improvement. I've littered the patch with nit-picks, but my main concern is that there aren't any unit tests for the new data structures. I wonder

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-07 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 110111. morehouse added a comment. - Build protobuf-mutator with same build type as current build. - Remove unnecessary options from clang-proto-fuzzer. - Expand macro. https://reviews.llvm.org/D36324 Files: clang/CMakeLists.txt

[PATCH] D34324: [clang-format] let PointerAlignment dictate spacing of function ref qualifiers

2017-08-07 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes added a comment. @djasper bump, any thoughts on this? https://reviews.llvm.org/D34324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36423: [libc++] Introsort based sorting function

2017-08-07 Thread Ben Craig via Phabricator via cfe-commits
bcraig added a comment. This patch needs benchmarks that demonstrate the performance changes. https://reviews.llvm.org/D36423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310318: This adds the argument --dump-ir to clang-import-test, which allows (authored by spyffe). Changed prior to commit: https://reviews.llvm.org/D36429?vs=110095=110104#toc Repository: rL LLVM

r310318 - This adds the argument --dump-ir to clang-import-test, which allows

2017-08-07 Thread Sean Callanan via cfe-commits
Author: spyffe Date: Mon Aug 7 15:27:30 2017 New Revision: 310318 URL: http://llvm.org/viewvc/llvm-project?rev=310318=rev Log: This adds the argument --dump-ir to clang-import-test, which allows viewing of the final IR. This is useful for confirming that structure layout was correct. I've

[PATCH] D36019: [clang-format] Fix bug with ENAS_DontAlign and empty lines

2017-08-07 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes added a comment. Thanks. Can you commit this when you get a chance? I don't have permissions. https://reviews.llvm.org/D36019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

2017-08-07 Thread Lang Hames via Phabricator via cfe-commits
lhames accepted this revision. lhames added a comment. This revision is now accepted and ready to land. LGTM! Comment at: tools/clang-import-test/clang-import-test.cpp:301-303 + if (ShouldDumpIR) { +CG.GetModule()->print(llvm::outs(), nullptr); + } LLVM

Re: [PATCH] D36386: [clang] Remove unit test which uses reverse-iterate and fix a PointerLikeTypeTrait specialization

2017-08-07 Thread David Blaikie via cfe-commits
On Mon, Aug 7, 2017 at 12:08 PM Mandeep Singh Grang via Phabricator < revi...@reviews.llvm.org> wrote: > mgrang added a comment. > > This patch does 3 things: > > 1. Get rid of the unit test objc-modern-metadata-visibility2.mm because > this test check uses flag -reverse-iterate. This flag will

[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 110095. spyffe added a comment. Eliminate sensitive dependence on `sizeof(int)`. `bool` should still be rendered as `i1` though. https://reviews.llvm.org/D36429 Files: test/Import/local-struct/Inputs/Callee.cpp test/Import/local-struct/test.cpp

[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 110093. spyffe added a comment. Added a passing test for a global struct, so we have something that'll fail if the IR dumping breaks. https://reviews.llvm.org/D36429 Files: test/Import/local-struct/Inputs/Callee.cpp test/Import/local-struct/test.cpp

[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
spyffe created this revision. This adds the argument `--dump-ir` to `clang-import-test`, which allows viewing of the final IR. This is useful for confirming that structure layout was correct. I've added an XFAILed test that exercises this, checking that a struct defined inside a function

[PATCH] D34158: For Linux/gnu compatibility, preinclude if the file is available

2017-08-07 Thread Fedor Sergeev via Phabricator via cfe-commits
fedor.sergeev added a comment. In https://reviews.llvm.org/D34158#834298, @mibintc wrote: > In fact I did have trouble writing the new test case to pass with the > gnu/Linux toolchain. In the file lib/Driver/ToolChains/Linux.cpp function > AddGnuIncludeArgs checks if GCCInstallation.isValid().

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-07 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a reviewer: bogner. kcc added a comment. +bogner@ FYI Comment at: clang/tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp:25 + +static void MaybePrint(const std::string ) { + static const char *env = getenv("CXXFUZZ_PRINT"); this is debug code, not

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-07 Thread Erik Uhlmann via Phabricator via cfe-commits
euhlmann added inline comments. Comment at: lib/Format/UnwrappedLineParser.h:238 + unsigned PPIndentLevel; + FormatToken *PPMaybeIncludeGuard; djasper wrote: > I think this should almost always be PPBranchLevel. Probably the different > case is the #else

[PATCH] D36159: clang-format: [JS] handle single lines comments ending in `\\`.

2017-08-07 Thread Martin Probst via Phabricator via cfe-commits
mprobst added a comment. Friendly ping. https://reviews.llvm.org/D36159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36359: [clang-format] Put '/**' and '*/' on own lines in jsdocs ending in comment pragmas

2017-08-07 Thread Martin Probst via Phabricator via cfe-commits
mprobst added inline comments. Comment at: lib/Format/BreakableToken.cpp:688 + if (DelimitersOnNewline) { +StringRef TrimmedContent = Content.back().substr(TailOffset).rtrim(Blanks); +if (!TrimmedContent.empty()) { Can you add a comment on what this is

[PATCH] D36411: Restore previous structure ABI for bitfields with 'packed' attribute for PS4 targets

2017-08-07 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a comment. An ABI change was introduced in r254596 that modified structure layouts when the 'packed' attribute was used on one-byte bitfields. Since the PS4 target needs to maintain backwards compatibility for all structure layouts, this change reintroduces the old behavior for

[PATCH] D36105: [AArch64] Ignore stdcall and similar on aarch64/windows

2017-08-07 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310303: [AArch64] Ignore stdcall and similar on aarch64/windows (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D36105?vs=108977=110082#toc Repository: rL LLVM

r310303 - [AArch64] Ignore stdcall and similar on aarch64/windows

2017-08-07 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Mon Aug 7 13:52:04 2017 New Revision: 310303 URL: http://llvm.org/viewvc/llvm-project?rev=310303=rev Log: [AArch64] Ignore stdcall and similar on aarch64/windows This is similar to what's done on arm and x86_64, where these calling conventions are silently ignored, as in

Re: r310158 - [ODRHash] Treat some non-templated classes as templated.

2017-08-07 Thread Hans Wennborg via cfe-commits
On Fri, Aug 4, 2017 at 5:54 PM, Richard Trieu via cfe-commits wrote: > Author: rtrieu > Date: Fri Aug 4 17:54:19 2017 > New Revision: 310158 > > URL: http://llvm.org/viewvc/llvm-project?rev=310158=rev > Log: > [ODRHash] Treat some non-templated classes as templated. >

[PATCH] D36427: [libcxxabi][demangler] Improve representation of substitutions/templates

2017-08-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. This patch changes the demangler so that it represents substitutions/templates more linearly. Previously, substitions were represented by a `vector>` and template parameter substitutions by a `vector>>`! I wrote a

[PATCH] D27214: [ObjC] Encode type arguments in property information string constants

2017-08-07 Thread Greg Parker via Phabricator via cfe-commits
gparker42 added a comment. This won't work. The property attribute string consists of comma-separated fields. The encoding used here embeds commas into the type value, which will break parsing of the attribute string. You'll need to use a separator other than a comma. Repository: rL LLVM

r310299 - Mark static variables static; NFC.

2017-08-07 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Aug 7 13:26:33 2017 New Revision: 310299 URL: http://llvm.org/viewvc/llvm-project?rev=310299=rev Log: Mark static variables static; NFC. Modified: cfe/trunk/lib/AST/Decl.cpp Modified: cfe/trunk/lib/AST/Decl.cpp URL:

Re: r310191 - [X86] Enable isel to use the PAUSE instruction even when SSE2 is disabled. Clang part

2017-08-07 Thread Hans Wennborg via cfe-commits
On Sat, Aug 5, 2017 at 4:35 PM, Craig Topper via cfe-commits wrote: > Author: ctopper > Date: Sat Aug 5 16:35:54 2017 > New Revision: 310191 > > URL: http://llvm.org/viewvc/llvm-project?rev=310191=rev > Log: > [X86] Enable isel to use the PAUSE instruction even when

[PATCH] D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module.

2017-08-07 Thread Yan Wang via Phabricator via cfe-commits
yawanng added a comment. In https://reviews.llvm.org/D35372#834238, @hokein wrote: > Looks good to me, a few nits. Thanks for improving it continuously. > > I'd hold it for a while to see whether @alexfh has further comments before > submitting it. Thank you for the reviewing :-)

[PATCH] D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module.

2017-08-07 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 110065. yawanng marked 4 inline comments as done. https://reviews.llvm.org/D35372 Files: clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/CloexecCheck.cpp clang-tidy/android/CloexecCheck.h

[libcxx] r310290 - [libc++] Don't hardcode namespace in manual mangling

2017-08-07 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Mon Aug 7 12:59:58 2017 New Revision: 310290 URL: http://llvm.org/viewvc/llvm-project?rev=310290=rev Log: [libc++] Don't hardcode namespace in manual mangling libc++'s inline namespace can change depending on the ABI version. Instead of hardcoding __1 in the manual

[PATCH] D36171: AMDGPU: Use direct struct returns

2017-08-07 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7555 + if (NumRegsLeft > 0) +NumRegsLeft -= (Size + 31) / 32; + Won't NumRegsLeft wrap if size==64 and NumRegsLeft == 1 potentially causing an assert later?

[PATCH] D34624: extra test modifications for D34158

2017-08-07 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 110059. mibintc added a comment. Updating this patch to latest revision of tools/extra https://reviews.llvm.org/D34624 Files: test/clang-tidy/llvm-include-order.cpp test/pp-trace/pp-trace-conditional.cpp test/pp-trace/pp-trace-ident.cpp

[PATCH] D34158: For Linux/gnu compatibility, preinclude if the file is available

2017-08-07 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 110055. mibintc added a comment. In the last review, it was deemed less controversial if I move these updates back into the gnu/Linux tool chain. This revision is responding to that feedback. I also simplified the test case. I tested on Linux with

Re: [libcxx] r309838 - Fix PR33727: std::basic_stringbuf only works with DefaultConstructible allocators. Thanks to Jonathan Wakely for the report and suggested fix

2017-08-07 Thread Hans Wennborg via cfe-commits
On Wed, Aug 2, 2017 at 10:31 AM, Marshall Clow via cfe-commits wrote: > Author: marshall > Date: Wed Aug 2 10:31:09 2017 > New Revision: 309838 > > URL: http://llvm.org/viewvc/llvm-project?rev=309838=rev > Log: > Fix PR33727: std::basic_stringbuf only works with

Re: [libcxx] r309851 - Fix shadowing warning

2017-08-07 Thread Hans Wennborg via cfe-commits
On Wed, Aug 2, 2017 at 11:21 AM, Marshall Clow via cfe-commits wrote: > Author: marshall > Date: Wed Aug 2 11:21:34 2017 > New Revision: 309851 > > URL: http://llvm.org/viewvc/llvm-project?rev=309851=rev > Log: > Fix shadowing warning Merged to 5.0 in r310288.

Re: [libcxx] r309296 - Implement P0739R0: 'Some improvements to class template argument deduction integration into the standard library' This is an API change (not ABI change) due to a late change in

2017-08-07 Thread Hans Wennborg via cfe-commits
On Thu, Jul 27, 2017 at 10:44 AM, Marshall Clow via cfe-commits wrote: > Author: marshall > Date: Thu Jul 27 10:44:03 2017 > New Revision: 309296 > > URL: http://llvm.org/viewvc/llvm-project?rev=309296=rev > Log: > Implement P0739R0: 'Some improvements to class

[libcxx] r310288 - Merging r309851:

2017-08-07 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Aug 7 12:49:31 2017 New Revision: 310288 URL: http://llvm.org/viewvc/llvm-project?rev=310288=rev Log: Merging r309851: r309851 | marshall | 2017-08-02 11:21:34 -0700 (Wed, 02 Aug 2017) | 1 line Fix

[libcxx] r310287 - Merging r309838:

2017-08-07 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Aug 7 12:49:04 2017 New Revision: 310287 URL: http://llvm.org/viewvc/llvm-project?rev=310287=rev Log: Merging r309838: r309838 | marshall | 2017-08-02 10:31:09 -0700 (Wed, 02 Aug 2017) | 1 line Fix

[libcxx] r310286 - Merging r309296 and r309307:

2017-08-07 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Aug 7 12:48:12 2017 New Revision: 310286 URL: http://llvm.org/viewvc/llvm-project?rev=310286=rev Log: Merging r309296 and r309307: r309296 | marshall | 2017-07-27 10:44:03 -0700 (Thu, 27 Jul 2017) | 1

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-08-07 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 110056. gtbercea added a comment. Add -no-canonical-prefixes to tests. https://reviews.llvm.org/D29654 Files: lib/Driver/Driver.cpp lib/Driver/ToolChains/Clang.cpp lib/Driver/ToolChains/CommonArgs.cpp lib/Driver/ToolChains/CommonArgs.h

[PATCH] D36423: [libc++] Introsort based sorting function

2017-08-07 Thread DIVYA SHANMUGHAN via Phabricator via cfe-commits
DIVYA created this revision. The sorting algorithm currently employed in libc+ library uses quicksort with tail recursion elimination, as a result of which the worst case complexity turns out to be O(N^2). This patch reduces the worst case time complexity, by employing Introsort algorithm.

[PATCH] D36105: [AArch64] Ignore stdcall and similar on aarch64/windows

2017-08-07 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 https://reviews.llvm.org/D36105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36237: Reland "Thread Safety Analysis: fix assert_capability.", add warnings

2017-08-07 Thread Josh Gao via Phabricator via cfe-commits
jmgao updated this revision to Diff 110054. jmgao added a comment. Reword warnings. https://reviews.llvm.org/D36237 Files: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td lib/Analysis/ThreadSafety.cpp lib/Sema/SemaDeclAttr.cpp test/Sema/attr-capabilities.c

r310282 - Non-functional change. Fix previous patch D34784.

2017-08-07 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Mon Aug 7 11:43:37 2017 New Revision: 310282 URL: http://llvm.org/viewvc/llvm-project?rev=310282=rev Log: Non-functional change. Fix previous patch D34784. Modified: cfe/trunk/lib/Driver/Compilation.cpp Modified: cfe/trunk/lib/Driver/Compilation.cpp URL:

[PATCH] D36386: [clang] Remove unit test which uses reverse-iterate and fix a PointerLikeTypeTrait specialization

2017-08-07 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. This patch does 3 things: 1. Get rid of the unit test objc-modern-metadata-visibility2.mm because this test check uses flag -reverse-iterate. This flag will be removed in https://reviews.llvm.org/D35043. 2. https://reviews.llvm.org/D35043 gets rid of the empty base

[PATCH] D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module.

2017-08-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. Looks good to me, a few nits. Thanks for improving it continuously. I'd hold it for a while to see whether @alexfh has further comments before submitting it. Comment at: clang-tidy/android/CloexecCheck.h:28 +/// prevent

Re: [PATCH] D24933: Enable configuration files in clang

2017-08-07 Thread Serge Pavlov via cfe-commits
2017-08-07 1:46 GMT+07:00 Richard Smith : > On 6 August 2017 at 11:15, Serge Pavlov via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> 2017-08-06 6:43 GMT+07:00 Hal Finkel : >> >>> On 07/24/2017 10:18 AM, Serge Pavlov wrote: >>> >>> I am thinking

[PATCH] D36105: [AArch64] Ignore stdcall and similar on aarch64/windows

2017-08-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D36105#834225, @mgrang wrote: > In https://reviews.llvm.org/D36105#834007, @mstorsjo wrote: > > > Ping @mgrang, can you check the above with MSVC? I'd like to move forward > > with this in one form or another. > > > Yes, I checked with MSVC

[PATCH] D36237: Reland "Thread Safety Analysis: fix assert_capability.", add warnings

2017-08-07 Thread Delesley Hutchins via Phabricator via cfe-commits
delesley added a comment. Overall looks good. However, I would change the wording on the warning to the following. The terms "free function" and "instance method" may be confusing to some people. Also, warn_thread_attribute_noargs_static_method should not mention the capability attribute,

[PATCH] D36105: [AArch64] Ignore stdcall and similar on aarch64/windows

2017-08-07 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D36105#834007, @mstorsjo wrote: > Ping @mgrang, can you check the above with MSVC? I'd like to move forward > with this in one form or another. Yes, I checked with MSVC for ARM64 and it compiles without any warnings. cl foo.c -c /W3

Re: [PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-07 Thread Gheorghe-Teod Bercea via cfe-commits
I am aware of the failure, I am attempting to push a fix as we speak!Thanks for the patience.--DoruFrom:        Aleksey Shlyapnikov via Phabricator To:        gheorghe-teod.ber...@ibm.com, hfin...@anl.gov, hahnf...@itc.rwth-aachen.de, cber...@us.ibm.com,

r310278 - Add some missing -no-canonical-prefixes.

2017-08-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Aug 7 11:31:01 2017 New Revision: 310278 URL: http://llvm.org/viewvc/llvm-project?rev=310278=rev Log: Add some missing -no-canonical-prefixes. Modified: cfe/trunk/test/Driver/openmp-offload.c Modified: cfe/trunk/test/Driver/openmp-offload.c URL:

[PATCH] D35847: clang-format: Fix left pointer alignment after delctype/typeof

2017-08-07 Thread Erik Uhlmann via Phabricator via cfe-commits
euhlmann marked 2 inline comments as done. euhlmann added a comment. I resolved the formatting issues. I apologize for not paying closer attention to formatting earlier. I don't have commit access, so if this change looks good now, could someone with access please commit?

[PATCH] D35847: clang-format: Fix left pointer alignment after delctype/typeof

2017-08-07 Thread Erik Uhlmann via Phabricator via cfe-commits
euhlmann updated this revision to Diff 110032. euhlmann added a comment. Ran clang-format over changes and corrected formatting https://reviews.llvm.org/D35847 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-07 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
alekseyshl added a comment. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/7010 is unhappy about this change, please fix. https://reviews.llvm.org/D34784 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-08-07 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added a comment. I don't have commit rights yet so I would be grateful for help in this matter :) Comment at: lib/Lex/Lexer.cpp:469-477 +if (!isVerticalWhitespace(LexStart[0])) + continue; - const char *LexStart = StrData; - while (LexStart != BufStart) {

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-08-07 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 110029. idlecode added a comment. Redability fix in `findBeginningOfLine` https://reviews.llvm.org/D30748 Files: include/clang/Lex/Lexer.h lib/Lex/Lexer.cpp unittests/Lex/LexerTest.cpp Index: unittests/Lex/LexerTest.cpp

[PATCH] D36413: Use "foo-12345.o.tmp" instead of "foo.o-12345" as temporary file name.

2017-08-07 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. This helps some tools that do things based on the output's extension. For example, we got reports from users on Windows that have a tool that scan a build output dir (but skip .obj files). The tool would keep the "foo.obj-12345" file open, and then when clang

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36327#833891, @yaxunl wrote: > In https://reviews.llvm.org/D36327#833653, @bader wrote: > > > Hi Sam, > > > > What do you think about implementing this optimization in target specific > > optimization pass? Since size/alignment is saved as

Re: [PATCH] D36386: [clang] Remove unit test which uses reverse-iterate and fix a PointerLikeTypeTrait specialization

2017-08-07 Thread David Blaikie via cfe-commits
Not sure I understand the context for these changes - could you describe the motivation(s) in more detail? On Sun, Aug 6, 2017 at 10:39 PM Mandeep Singh Grang via Phabricator < revi...@reviews.llvm.org> wrote: > mgrang created this revision. > > This patch is in response to

[PATCH] D36171: AMDGPU: Use direct struct returns

2017-08-07 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping https://reviews.llvm.org/D36171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36105: [AArch64] Ignore stdcall and similar on aarch64/windows

2017-08-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @mgrang, can you check the above with MSVC? I'd like to move forward with this in one form or another. https://reviews.llvm.org/D36105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. There is an issue with taking an address of captured variables, because captures can be put in different locations depending on the vendor implementation (and therefore they are passed as generic AS pointer to the block). The physical location for the captures

[PATCH] D36407: [Sema] Extend -Wenum-compare to handle mixed enum comparisons in switch statements

2017-08-07 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs created this revision. `-Wenum-compare` warns if two values with different enumeration types are compared in expressions with binary operators. This patch extends this diagnostic so that comparisons of mixed enumeration types are recognized in switch statements as well. Example:

[PATCH] D36261: [clangd] Use multiple working threads in clangd.

2017-08-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.h:121-122 +public: + /// Returns the number of threads to use when shouldRunsynchronously() is + /// false. Must not be called if shouldRunsynchronously() is true. + unsigned getThreadsCount();

[PATCH] D36398: [clangd] Check if CompileCommand has changed on forceReparse.

2017-08-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnitStore.cpp:45 + .first; +Result.RemovedFile = nullptr; + } else if (!compileCommandsAreEqual(It->second->getCompileCommand(), klimek wrote: > Just say RemovedFile = nullptr in the

[PATCH] D36398: [clangd] Check if CompileCommand has changed on forceReparse.

2017-08-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 110016. ilya-biryukov added a comment. - Moved assignment `RemoveFile = nullptr` around a bit. - Added a comment to recreateFileIfCompileCommandChanged. https://reviews.llvm.org/D36398 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h

[PATCH] D36397: [clangd] Fixed a data race.

2017-08-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D36397#833890, @ilya-biryukov wrote: > In https://reviews.llvm.org/D36397#833883, @klimek wrote: > > > Tests? > > > TSAN does not catch this (as it's a logical error) and it requires a rather > bizarre timing of file reparses to trigger. > I

r310263 - [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-07 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Mon Aug 7 08:39:11 2017 New Revision: 310263 URL: http://llvm.org/viewvc/llvm-project?rev=310263=rev Log: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading Summary: OpenMP has the ability to offload target regions to devices

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D36327#833653, @bader wrote: > Hi Sam, > > What do you think about implementing this optimization in target specific > optimization pass? Since size/alignment is saved as function parameter in > LLVM IR, the optimization can be done in target

[PATCH] D36397: [clangd] Fixed a data race.

2017-08-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D36397#833883, @klimek wrote: > Tests? TSAN does not catch this (as it's a logical error) and it requires a rather bizarre timing of file reparses to trigger. I couldn't come up with an example that would reproduce this.

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-08-07 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 110007. gtbercea added a comment. Fix test comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/Compilation.cpp

[PATCH] D36397: [clangd] Fixed a data race.

2017-08-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Tests? https://reviews.llvm.org/D36397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36398: [clangd] Check if CompileCommand has changed on forceReparse.

2017-08-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clangd/ClangdUnitStore.cpp:45 + .first; +Result.RemovedFile = nullptr; + } else if (!compileCommandsAreEqual(It->second->getCompileCommand(), Just say RemovedFile = nullptr in the struct?

[PATCH] D36398: [clangd] Check if CompileCommand has changed on forceReparse.

2017-08-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. https://reviews.llvm.org/D36398 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ClangdUnitStore.cpp clangd/ClangdUnitStore.h Index: clangd/ClangdUnitStore.h === ---

[PATCH] D36397: [clangd] Fixed a data race.

2017-08-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Calling addDocument after removeDocument could have resulted in an invalid program state (AST and Preamble for the valid document could have been incorrectly removed). This commit also includes an improved CppFile::cancelRebuild implementation that allows to

[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

2017-08-07 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. I've just found a regression in my change. in case I have std::string(/*complete here*/) I need to investigate that case because I thought it's covered by !isa(FD) ... https://reviews.llvm.org/D36390 ___ cfe-commits mailing

[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

2017-08-07 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 109980. yvvan added a comment. Yes, I missed to include one file in this diff where it's used https://reviews.llvm.org/D36390 Files: include/clang/Sema/Sema.h lib/Sema/SemaCodeComplete.cpp lib/Sema/SemaOverload.cpp test/Index/complete-call.cpp

[PATCH] D36187: [clang-diff] Use the relative name for NamedDecls

2017-08-07 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added a comment. There's some similar code in tools/clang/lib/Tooling/Core/Lookup.cpp, it might make sense to share it. Otherwise this looks good. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:391 + if (!ContextPrefix.empty() && + Val.substr(0,

[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

2017-08-07 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added inline comments. Comment at: include/clang/Sema/Sema.h:2681 + bool PartialOverloading = false, + bool ExtraFirstArgument = false); void AddMethodCandidate(DeclAccessPair FoundDecl, Shouldn't this be

[PATCH] D35355: Fix templated type alias completion when using global completion cache

2017-08-07 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 109968. yvvan added a comment. Add unit-test for the case fixed in this review https://reviews.llvm.org/D35355 Files: lib/Frontend/ASTUnit.cpp lib/Parse/ParseTemplate.cpp test/Index/code-completion.cpp Index: test/Index/code-completion.cpp

r310245 - Enable LLVM asan support for NetBSD/i386

2017-08-07 Thread Kamil Rytarowski via cfe-commits
Author: kamil Date: Mon Aug 7 03:57:03 2017 New Revision: 310245 URL: http://llvm.org/viewvc/llvm-project?rev=310245=rev Log: Enable LLVM asan support for NetBSD/i386 Summary: Verified to work and useful to run check-asan, as this target tests 32-bit and 64-bit execution. Sponsored by

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-07 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Hi Sam, What do you think about implementing this optimization in target specific optimization pass? Since size/alignment is saved as function parameter in LLVM IR, the optimization can be done in target specific components w/o adding additional conditions to generic

  1   2   >