[PATCH] D47111: : Implement monotonic_buffer_resource.

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 154050. Quuxplusone marked 2 inline comments as done. Quuxplusone added a comment. Massive changes based on Eric's feedback. Moved constructors and destructors of `monotonic_buffer_resource` into the header so they can be completely inlined. Renamed

[PATCH] D47111: : Implement monotonic_buffer_resource.

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone marked 7 inline comments as done. Quuxplusone added a comment. > I'll take a pass at the tests tomorrow. Some pointers in general: > > - Tests should be named after the component they test, not how they're > testing it. > - All the tests for a single component should be in the same

[PATCH] D48753: [libcxx] Use custom allocator's `construct` in C++03 when available.

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp:60 + + void construct(pointer p, const value_type& val) + { Per my comments on D48342, I think it would be fun to add a

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: libcxx/include/memory:1479 +struct __has_construct_missing +: false_type +{ vsapsai wrote: > Quuxplusone wrote: > > vsapsai wrote: > > > vsapsai wrote: > > > > vsapsai wrote: > > > > > erik.pilkington wrote: > >

[PATCH] D47111: : Implement monotonic_buffer_resource.

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D47111#1114284, @Quuxplusone wrote: > Refactor to remove unused fields from the header structs. > > Before this change, `sizeof(monotonic_buffer_resource) == 56` and the > overhead per allocated chunk was `40` bytes. > After this change,

[PATCH] D48894: [AST] Rename some Redeclarable functions to reduce confusion

2018-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 154044. MaskRay added a comment. Rename `Next` to `Link` as per rsmith Repository: rC Clang https://reviews.llvm.org/D48894 Files: include/clang/AST/Redeclarable.h Index: include/clang/AST/Redeclarable.h

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: src/experimental/memory_resource.cpp:48 +#ifdef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION +if (__size != 0 && !is_aligned_to(result, __align)) { +_VSTD::__libcpp_deallocate(result, __align); Quuxplusone

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 154041. Quuxplusone added a comment. Updated to no longer check "size != 0". Also rolled in some drive-by cosmetic refactoring that I'd done later in my branch: these functions aren't in a public header and don't need to be uglified. Repository: rCXX

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: src/experimental/memory_resource.cpp:29 +static bool is_aligned_to(void *ptr, size_t align) +{ +void *p2 = ptr; EricWF wrote: > Wait, can't this be written `reinterpret_cast(ptr) % align == 0`? Yes on sane

r336240 - PR33924: merge local declarations that have linkage of some kind within

2018-07-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 3 19:25:38 2018 New Revision: 336240 URL: http://llvm.org/viewvc/llvm-project?rev=336240=rev Log: PR33924: merge local declarations that have linkage of some kind within merged function definitions; also merge functions with deduced return types. This seems like two

[PATCH] D48908: [clang-doc] Pass over function-internal declarations

2018-07-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-doc/Mapper.cpp:32 + // Skip function-internal decls. + if (const auto *F = D->getParentFunctionOrMethod()) +return true; Type is not easily deducible, so please don't use auto.

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. Actually, I spotted a couple of issues. Requesting changes. Comment at: src/experimental/memory_resource.cpp:29 +static bool is_aligned_to(void *ptr, size_t align)

[PATCH] D48909: [clang-doc] Update BitcodeReader to use llvm::Error

2018-07-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:13 #include "llvm/ADT/Optional.h" #include "llvm/Support/raw_ostream.h" Please include Support/Error.h and utility Comment at:

[PATCH] D48894: [AST] Rename some Redeclarable functions to reduce confusion

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Redeclarable.h:106 -mutable llvm::PointerUnion Next; +mutable llvm::PointerUnion Prev; I think this is still a confusing name, because it points either to the previous declaration or to the

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. I'll add a test when I commit this. Repository: rCXX libc++ https://reviews.llvm.org/D47344 ___ cfe-commits mailing list

[PATCH] D48734: [Sema] Consider all format_arg attributes.

2018-07-03 Thread Michael Kruse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336239: [Sema] Consider all format_arg attributes. (authored by Meinersbur, committed by ). Changed prior to commit: https://reviews.llvm.org/D48734?vs=153643=154038#toc Repository: rC Clang

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, much appreciated. A couple more style changes that I noticed and this will be LGTM, although you should also make sure you have Bevin Hansson's approval. Comment at: include/clang/AST/ASTContext.h:33 #include "clang/Basic/AddressSpaces.h"

[PATCH] D48909: [clang-doc] Update BitcodeReader to use llvm::Error

2018-07-03 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: ioeric, lebedev.ri. juliehockett added a project: clang-tools-extra. Replace booleans with the more descriptive llvm::Error or llvm::Expected https://reviews.llvm.org/D48909 Files: clang-tools-extra/clang-doc/BitcodeReader.cpp

[PATCH] D48908: [clang-doc] Pass over function-internal declarations

2018-07-03 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: ioeric, lebedev.ri. juliehockett added a project: clang-tools-extra. Things declared internally to functions shouldn't be documented, and so bail early if encountered. https://reviews.llvm.org/D48908 Files:

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-07-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: libcxx/include/memory:1479 +struct __has_construct_missing +: false_type +{ Quuxplusone wrote: > vsapsai wrote: > > vsapsai wrote: > > > vsapsai wrote: > > > > erik.pilkington wrote: > > > > > vsapsai wrote: > > > >

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 154020. leonardchan marked 2 inline comments as done. leonardchan added a comment. - Renamed `fixedPointSemantics` to `FixedPointSemantics` and hid the members behind getters Repository: rC Clang https://reviews.llvm.org/D48661 Files:

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-07-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 154021. vsapsai added a comment. - Proper support for custom allocators without `construct`. https://reviews.llvm.org/D48342 Files: libcxx/include/memory libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-03 Thread Andrew Comminos via Phabricator via cfe-commits
acomminos planned changes to this revision. acomminos added a comment. Ah yes, thanks for pointing this out. Some additional logic is going to be necessary to handle capture initializers correctly- I'll look into exposing full source ranges in LambdaCapture to make this more consistent across

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9051 def err_implied_coroutine_type_not_found : Error< "%0 type was not found; include before defining " "a coroutine">; Maybe we should also remove the "%0 type was not

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9053 "a coroutine">; +def note_coroutine_types_for_traits_here : Note< + "the coroutine traits class template is being instantiated using the return " modocache wrote: >

[PATCH] D48753: [libcxx] Use custom allocator's `construct` in C++03 when available.

2018-07-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 154018. vsapsai added a comment. - Clean up functionality not required by the Standard. https://reviews.llvm.org/D48753 Files: libcxx/include/memory libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp Index:

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9053 "a coroutine">; +def note_coroutine_types_for_traits_here : Note< + "the coroutine traits class template is being instantiated using the return " GorNishanov wrote:

[PATCH] D48617: [Builtins][Attributes][X86] Tag all X86 builtins with their required vector width. Add a min_vector_width function attribute and tag all x86 instrinsics with it.

2018-07-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from a new round of minor doc nits, I think this is looking good. One remaining question I have is whether the attribute should diagnose an argument for a width that's not

[PATCH] D48687: [clangd] Avoid duplicates in findDefinitions response

2018-07-03 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. An update, I traced the difference in behavior to the difference in how `RealFileSystem` and `InMemoryFileSystem` return `Status`es. I uploaded a patch to change `InMemoryFileSystem` to work like `RealFileSystem`: https://reviews.llvm.org/D48903 With this patch applied

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-03 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 154010. simark added a comment. Update commit message Repository: rC Clang https://reviews.llvm.org/D48903 Files: lib/Basic/VirtualFileSystem.cpp Index: lib/Basic/VirtualFileSystem.cpp

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9053 "a coroutine">; +def note_coroutine_types_for_traits_here : Note< + "the coroutine traits class template is being instantiated using the return " I am wondering

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-03 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added subscribers: cfe-commits, ioeric, ilya-biryukov. InMemoryFileSystem::status behaves differently than RealFileSystem::status. The Name contained in the Status returned by RealFileSystem::status will be the path as requested by the caller, whereas

[PATCH] D48734: [Sema] Consider all format_arg attributes.

2018-07-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D48734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 154005. EricWF marked 2 inline comments as done. EricWF added a comment. Address main review comments. The `TransformTraitType` is now built early, and the `DeclSpec` refers to it and not the list of argument types. Additionally, the mangling formulation `u

[PATCH] D44143: [clang-tidy] Create properly seeded random generator check

2018-07-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This still LGTM; do you need someone to commit on your behalf? https://reviews.llvm.org/D44143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48322: [Sema] Discarded statment should be an evaluatable context

2018-07-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336233: [Sema] Discarded statment should be an evaluatable context. (authored by epilk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r336233 - [Sema] Discarded statment should be an evaluatable context.

2018-07-03 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Jul 3 15:15:36 2018 New Revision: 336233 URL: http://llvm.org/viewvc/llvm-project?rev=336233=rev Log: [Sema] Discarded statment should be an evaluatable context. The constexpr evaluator was erroring out because these templates weren't defined. Despite being used in a

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 13 inline comments as done. EricWF added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:3250-3251 - mangleType(T->getBaseType()); + for (auto Ty : T->getArgs()) +mangleType(Ty); } rsmith wrote: > EricWF wrote: > > EricWF wrote: > >

[PATCH] D48322: [Sema] Discarded statment should be an evaluatable context

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D48322#1150316, @erik.pilkington wrote: > Is this what you were concerned about? Yes, exactly. Thank you for checking. Repository: rC Clang

[PATCH] D48880: [Sema] Fix crash in getConstructorName.

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks fine, but please put the test case somewhere more appropriate (under SemaCXX, for instance). Comment at: lib/Sema/SemaExprCXX.cpp:117 } assert(InjectedClassName && "couldn't find injected class name"); We would be able to

[PATCH] D48395: Added PublicOnly flag

2018-07-03 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tools-extra/clang-doc/Serialize.cpp:322-324 + if(PublicOnly && ! isPublic(D->getAccess(), D->getLinkageInternal())){ +return ""; + } anniecherk wrote: > juliehockett wrote: > > Since this is the same

r336231 - Factor out Clang's desired 8MB stack size constant from the various

2018-07-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 3 14:34:13 2018 New Revision: 336231 URL: http://llvm.org/viewvc/llvm-project?rev=336231=rev Log: Factor out Clang's desired 8MB stack size constant from the various places we hardcode it. Added: cfe/trunk/include/clang/Basic/Stack.h Modified:

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-03 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added inline comments. Comment at: test/FixIt/fixit-unused-lambda-capture.cpp:31 + // CHECK: [=,] { return i; }; +} This needs tests for: * capture initializers `[c = foo()] {};` * Capturing this `[this] {};` * Capturing *this `[*this] {};` * VLA

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-03 Thread Andrew Comminos via Phabricator via cfe-commits
acomminos updated this revision to Diff 153968. acomminos retitled this revision from "[Sema] Add fixit for -Wno-unused-lambda-capture" to "[Sema] Add fixit for unused lambda captures". acomminos edited the summary of this revision. acomminos changed the visibility from "Custom Policy" to "Public

[clang-tools-extra] r336228 - [clangd] Replace UniqueFunction with llvm::unique_function.

2018-07-03 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Jul 3 13:59:33 2018 New Revision: 336228 URL: http://llvm.org/viewvc/llvm-project?rev=336228=rev Log: [clangd] Replace UniqueFunction with llvm::unique_function. One implementation of this ought to be enough for everyone. Modified:

[PATCH] D48896: [libcxx][c++17] P0083R5: Splicing Maps and Sets Part 2: merge

2018-07-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: EricWF, mclow.lists. Herald added subscribers: dexonsmith, ldionne, christof. This was originally part of https://reviews.llvm.org/D46845, but I decided to split it out to clean up the diff. From that patch's description: >

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

2018-07-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 153964. erik.pilkington added a comment. Herald added a subscriber: dexonsmith. Split this up. I'm moving the `merge` stuff to a follow-up, that makes this diff a lot easier to read. https://reviews.llvm.org/D46845 Files:

Re: r336225 - Fix allocation of Nullability attribute.

2018-07-03 Thread Aaron Ballman via cfe-commits
On Tue, Jul 3, 2018 at 4:30 PM, Erich Keane via cfe-commits wrote: > Author: erichkeane > Date: Tue Jul 3 13:30:34 2018 > New Revision: 336225 > > URL: http://llvm.org/viewvc/llvm-project?rev=336225=rev > Log: > Fix allocation of Nullability attribute. > > Existing code always allocates for on

r336225 - Fix allocation of Nullability attribute.

2018-07-03 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Jul 3 13:30:34 2018 New Revision: 336225 URL: http://llvm.org/viewvc/llvm-project?rev=336225=rev Log: Fix allocation of Nullability attribute. Existing code always allocates for on the declarator's attribute pool, but sometimes adds it to the declspec. This patch

[PATCH] D48894: [AST] Rename some Redeclarable functions to reduce confusion

2018-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: rsmith, akyrtzi, Eugene.Zelenko. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D48894 Files: include/clang/AST/Redeclarable.h Index: include/clang/AST/Redeclarable.h

[PATCH] D48886: VS 2017 clang integration

2018-07-03 Thread David Tarditi via Phabricator via cfe-commits
dtarditi added a subscriber: hans. dtarditi added a comment. It's great to see your work on Visual Studio extension integration via VSIX. I'm happy to try out your change. I have a few questions: 1. How am I supposed to try this out? Given that actually building a VSIX installer isn't

RE: r334650 - Implement constexpr __builtin_*_overflow

2018-07-03 Thread Keane, Erich via cfe-commits
Yikes! Thanks for the heads up! I’ll start looking into this. Thanks for letting me know. From: Evgenii Stepanov [mailto:eugeni.stepa...@gmail.com] Sent: Tuesday, July 3, 2018 12:59 PM To: Keane, Erich Cc: cfe-commits Subject: Re: r334650 - Implement constexpr __builtin_*_overflow Hi, with

Re: r334650 - Implement constexpr __builtin_*_overflow

2018-07-03 Thread Evgenii Stepanov via cfe-commits
Discovered by MemorySanitizer, btw. On Tue, Jul 3, 2018 at 12:59 PM, Evgenii Stepanov wrote: > Hi, > > with this change, the following compiles to "ret i32 undef": > > int main(int argc, char **argv) { > > constexpr int x = 1; > > constexpr int y = 2; > > int z; > > > >

Re: r334650 - Implement constexpr __builtin_*_overflow

2018-07-03 Thread Evgenii Stepanov via cfe-commits
Hi, with this change, the following compiles to "ret i32 undef": int main(int argc, char **argv) { constexpr int x = 1; constexpr int y = 2; int z; __builtin_sadd_overflow(x, y, ); return z; } On Wed, Jun 13, 2018 at 1:43 PM, Erich Keane via cfe-commits <

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 153956. modocache added a comment. Oops, apologies, I included a line I shouldn't have in the previous diff. Repository: rC Clang https://reviews.llvm.org/D48863 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCoroutine.cpp

[PATCH] D48687: [clangd] Avoid duplicates in findDefinitions response

2018-07-03 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D48687#1150960, @hokein wrote: > After taking a look closely, I figured why there are two candidates here -- > one is from AST (the one with ".." path); the other one is from dynamic > index, the deduplication failed because of the different

[PATCH] D48249: [analyzer] Add stubs for argument construction contexts for arguments of C++ constructors and Objective-C messages.

2018-07-03 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. Minor nit: request for code reuse. Comment at: lib/Analysis/CFG.cpp:694 +std::is_same::value || +

r336219 - Fix crash in clang.

2018-07-03 Thread Zachary Turner via cfe-commits
Author: zturner Date: Tue Jul 3 11:12:39 2018 New Revision: 336219 URL: http://llvm.org/viewvc/llvm-project?rev=336219=rev Log: Fix crash in clang. This happened during a recent refactor. toStringRefArray() returns a vector, which was being implicitly converted to an ArrayRef, and then the

[PATCH] D48395: Added PublicOnly flag

2018-07-03 Thread Annie Cherkaev via Phabricator via cfe-commits
anniecherk marked 11 inline comments as done. anniecherk added inline comments. Comment at: clang-tools-extra/clang-doc/Serialize.cpp:322-324 + if(PublicOnly && ! isPublic(D->getAccess(), D->getLinkageInternal())){ +return ""; + } juliehockett wrote: >

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-07-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. LGTM, but I'd like Richard to sign off, too. Repository: rC Clang https://reviews.llvm.org/D45898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

RE: [clang-tools-extra] r336177 - [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-03 Thread via cfe-commits
Hi Sam, This commit is causing failures on windows buildbots. Testing Time: 211.19s Failing Tests (1): Extra Tools Unit Tests :: clangd/Checking/./ClangdTests.exe/FileDistanceTests.URI Example build:

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/FixedPoint.h:31 + SatNoPadding, +}; + leonardchan wrote: > ebevhan wrote: > > rjmccall wrote: > > > I figured you'd want this to be a struct which include the scale, width, > > > signed-ness, and

[PATCH] D48886: VS 2017 clang integration

2018-07-03 Thread David Tarditi via Phabricator via cfe-commits
dtarditi created this revision. dtarditi added a reviewer: hans. Herald added subscribers: delcypher, mgorny. Add support for integrating clang as a platform toolset for Visual Studio 2017. In prior versions of Visual Studio, MSBuild was installed separately in its own known directory location

[PATCH] D46919: [libclang] Deprecate CXPrintingPolicy_IncludeTagDefinition

2018-07-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 153930. jdenny added a comment. Ping. Rebased. https://reviews.llvm.org/D46919 Files: include/clang-c/Index.h include/clang/AST/PrettyPrinter.h lib/AST/DeclPrinter.cpp lib/AST/TypePrinter.cpp tools/c-index-test/c-index-test.c Index:

[PATCH] D48687: [clangd] Avoid duplicates in findDefinitions response

2018-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. After taking a look closely, I figured why there are two candidates here -- one is from AST (the one with ".." path); the other one is from dynamic index, the deduplication failed because of the different paths :( I think the fixing way is to normalize the file path

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Basic/FixedPoint.cpp:40 + if (DstWidth > Val.getBitWidth()) +Val = Val.extend(DstWidth); + if (Upscaling) ebevhan wrote: > It should be possible to replace this with `extOrTrunc` and move it below the >

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 153924. leonardchan marked 7 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clang/AST/ASTContext.h include/clang/Basic/FixedPoint.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp

[PATCH] D48773: [ASTImporter] Fix import of objects with anonymous types

2018-07-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:2085 } + } else { +if (!IsStructuralMatch(D, FoundRecord, false)) martong wrote: > a_sidorin wrote: > > Is it possible to use the added code for the entire

[PATCH] D48854: Use ExprMutationAnalyzer in performance-for-range-copy

2018-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

2018-07-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. //bugprone// seems to be proper category for this check. Comment at: clang-tidy/misc/IncorrectPointerCastCheck.cpp:35 + const ASTContext = *Result.Context; + const CStyleCastExpr *CastExpr = + Result.Nodes.getNodeAs("cast");

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-07-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/bugprone/BugproneTidyModule.cpp:84 +CheckFactories.registerCheck( +"bugprone-io-functions-misused"); CheckFactories.registerCheck( This name reads a bit awkwardly because usually

[PATCH] D48773: [ASTImporter] Fix import of objects with anonymous types

2018-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:2085 } + } else { +if (!IsStructuralMatch(D, FoundRecord, false)) a_sidorin wrote: > Is it possible to use the added code for the entire condition `if (auto >

[clang-tools-extra] r336203 - [clangd] Use default format style and fallback style. NFC

2018-07-03 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Jul 3 07:51:23 2018 New Revision: 336203 URL: http://llvm.org/viewvc/llvm-project?rev=336203=rev Log: [clangd] Use default format style and fallback style. NFC Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified:

[PATCH] D48773: [ASTImporter] Fix import of objects with anonymous types

2018-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 153917. martong marked an inline comment as done. martong added a comment. Remove redundant code and use only StructurlaEquivalence Repository: rC Clang https://reviews.llvm.org/D48773 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp

r336202 - [Driver] Add PPC64 as supported for Scudo

2018-07-03 Thread Kostya Kortchinsky via cfe-commits
Author: cryptoad Date: Tue Jul 3 07:39:29 2018 New Revision: 336202 URL: http://llvm.org/viewvc/llvm-project?rev=336202=rev Log: [Driver] Add PPC64 as supported for Scudo Summary: Scudo works on PPC64 as is, so mark the architecture as supported for it. This will also require a change to

[PATCH] D48833: [Driver] Add PPC64 as supported for Scudo

2018-07-03 Thread Kostya Kortchinsky via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336202: [Driver] Add PPC64 as supported for Scudo (authored by cryptoad, committed by ). Changed prior to commit: https://reviews.llvm.org/D48833?vs=153727=153915#toc Repository: rC Clang

[PATCH] D48694: [libc++abi] Limit libc++ header search to specified paths

2018-07-03 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In https://reviews.llvm.org/D48694#1148718, @EricWF wrote: > As an aside, libc++abi should really live in the libc++ repository. That way > it would always have the correct headers available. But every time I pitch > that idea I get a ton of push back. FWIW, I think

[PATCH] D48881: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder.

2018-07-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, MaskRay. For example, template parameter might not be resolved in a broken TU, which can result in wrong USR/SymbolID. Repository: rCTE Clang Tools Extra

[PATCH] D48880: [Sema] Fix crash in getConstructorName.

2018-07-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: bkramer, rsmith. Can happen when getConstructorName is called on invalid decls, specifically the ones that do not have the injected class name. Repository: rC Clang https://reviews.llvm.org/D48880 Files:

[PATCH] D47537: [clang-tools-extra] Cleanup documentation routine

2018-07-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm. Thanks for doing this! https://reviews.llvm.org/D47537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D48427: [Analyzer] Fix for D47417 to make the tests pass

2018-07-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 153907. baloghadamsoftware added a comment. Instead of marking the container alive, now we defer deletion of the container data until all its iterators are cleaned up. https://reviews.llvm.org/D48427 Files:

[PATCH] D48831: alpha.unix.cstring.OutOfBounds checker enable/disable fix

2018-07-03 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp marked 2 inline comments as done. dkrupp added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:311 +if (!Filter.CheckCStringOutOfBounds) + return StOutBound; NoQ wrote: > Could we preserve the other portion of the

[PATCH] D48831: alpha.unix.cstring.OutOfBounds checker enable/disable fix

2018-07-03 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp updated this revision to Diff 153905. dkrupp added a comment. The patch has been updated. Changes: -The analysis path is cut if overvlow is detected even if CStringOutOfBounds is disabled The assert(Filter.CheckCStringOutOfBounds || Filter.CheckCStringNullArg); cannot be put back,

[PATCH] D48854: Use ExprMutationAnalyzer in performance-for-range-copy

2018-07-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/performance-for-range-copy.cpp:120 +struct Point { + ~Point() {} I feel that `const` methods should be added as a test as well. Repository: rCTE Clang Tools Extra

[PATCH] D48873: [AST] Use llvm::TrailingObjects in clang::CXXTryStmt

2018-07-03 Thread Bruno Ricci via Phabricator via cfe-commits
bricci created this revision. bricci added a reviewer: rsmith. bricci added a project: clang. Herald added a subscriber: cfe-commits. Use TrailingObjects for CXXTryStmt instead of hand-rolling it. This hides the reinterpret_casts and make it more consistent with the other classes. Repository:

[PATCH] D48721: Patch to fix pragma metadata for do-while loops

2018-07-03 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added a comment. In https://reviews.llvm.org/D48721#1150361, @hfinkel wrote: > In https://reviews.llvm.org/D48721#1150333, @bjope wrote: > > > Is the fault that the metadata only should be put on the back edge, not the > > branch in the preheader? > > > Yea. Our past thinking has been

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-07-03 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. Herald added a subscriber: mikhail.ramalho. Hi, could you please take a look at this issue? https://reviews.llvm.org/D35068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 153888. lichray added a comment. Install the header file Repository: rCXX libc++ https://reviews.llvm.org/D41458 Files: .gitignore include/CMakeLists.txt include/charconv include/module.modulemap src/charconv.cpp

[PATCH] D48722: [ASTImporter] Update isUsed flag at Decl import.

2018-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > I have a strong feeling of duplication with attribute and flags merging move > in https://reviews.llvm.org/D47632. Maybe it is better to be resolved in that > review by using the same code for attr/flag merging for both newly-created > and mapped decls? Ok, then

[PATCH] D45045: [DebugInfo] Generate debug information for labels.

2018-07-03 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D45045#1150525, @HsiangKai wrote: > In https://reviews.llvm.org/D45045#1114280, @HsiangKai wrote: > > > In https://reviews.llvm.org/D45045#1092697, @hans wrote: > > > > > This broke the Chromium build. I've uploaded a reproducer at > > >

[PATCH] D47358: : Implement {un, }synchronized_pool_resource.

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 153882. Herald added subscribers: ldionne, christof. Repository: rCXX libc++ https://reviews.llvm.org/D47358 Files: include/experimental/memory_resource src/experimental/memory_resource.cpp

[PATCH] D47111: : Implement monotonic_buffer_resource.

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 153881. Repository: rCXX libc++ https://reviews.llvm.org/D47111 Files: include/experimental/memory_resource src/experimental/memory_resource.cpp

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-07-03 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:627 } +if(Style.BraceWrapping.BeforeLambdaBody && Current->is(TT_LambdaLSquare)) { +++Left->BlockParameterCount; Wawha wrote: > klimek wrote: > > Why do we want to increase

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: include/clang/Basic/FixedPoint.h:67 + // Convert this number to match the semantics provided. + void convert(const struct fixedPointSemantics ); + If this class is supposed to be used like APInt and APSInt, perhaps

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-07-03 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:627 } +if(Style.BraceWrapping.BeforeLambdaBody && Current->is(TT_LambdaLSquare)) { +++Left->BlockParameterCount; klimek wrote: > Why do we want to increase the parameter

[PATCH] D48441: [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-03 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336177: [clangd] Incorporate transitive #includes into code complete proximity scoring. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[clang-tools-extra] r336177 - [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-03 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jul 3 01:09:29 2018 New Revision: 336177 URL: http://llvm.org/viewvc/llvm-project?rev=336177=rev Log: [clangd] Incorporate transitive #includes into code complete proximity scoring. Summary: We now compute a distance from the main file to the symbol header, which is

[PATCH] D48827: [clang-format ]Extend IncludeCategories regex documentation

2018-07-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir requested changes to this revision. krasimir added a comment. This revision now requires changes to proceed. This file is automatically generated from `Format.h` using `clang/docs/tools/dump_format_style.py`. Please update. Repository: rC Clang https://reviews.llvm.org/D48827

[PATCH] D48441: [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Performance on a transitively big file. Stress test - global scope completion with index turned off. Benchmarking codeComplete() call 100x per trial, trials randomly ordered. Before this patch (427ms 421ms 430ms) After this patch (418ms 420ms 417ms) So it seems this is

[PATCH] D45045: [DebugInfo] Generate debug information for labels.

2018-07-03 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai added a comment. In https://reviews.llvm.org/D45045#1114280, @HsiangKai wrote: > In https://reviews.llvm.org/D45045#1092697, @hans wrote: > > > This broke the Chromium build. I've uploaded a reproducer at > > https://bugs.chromium.org/p/chromium/issues/detail?id=841170#c1 > > > > I'm

  1   2   >