[PATCH] D42517: [clangd] RFC: Pass Context implicitly using TLS.

2018-01-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, klimek. This is mostly to show what it would look like. I think it's pretty nice! The lit tests pass, but the unit tests don't build because I ripped out some

[PATCH] D42219: [analyzer] Enable c++-allocator-inlining by default?

2018-01-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I committed this for now, but i'm totally open for post-commit review and reacting on any "unknown unknowns" that may be found. Repository: rL LLVM https://reviews.llvm.org/D42219 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D42508: AST: support protocol conformances on id/class/interfaces in MS ABI

2018-01-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 131379. compnerd marked an inline comment as done. compnerd added a comment. scope the template back references and add a comment. https://reviews.llvm.org/D42508 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenObjCXX/msabi-protocol-conformance.mm Ind

[libcxxabi] r323397 - [libc++abi] Fix unused function when building with LIBCXXABI_SILENT_TERMINATE

2018-01-24 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Wed Jan 24 17:38:43 2018 New Revision: 323397 URL: http://llvm.org/viewvc/llvm-project?rev=323397&view=rev Log: [libc++abi] Fix unused function when building with LIBCXXABI_SILENT_TERMINATE This fixes: src/cxa_default_handlers.cpp:25:13: error: unused function 'demangling_termi

[PATCH] D40259: [libcxx] LWG2993: reference_wrapper

2018-01-24 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 after addressing inline comments. Do you have commit access? If not, I'll commit once updated. Comment at: test/std/utilities/function.objects/refwrap/refwrap.const/ty

[PATCH] D42508: AST: support protocol conformances on id/class/interfaces in MS ABI

2018-01-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The basic idea here seems fine to me; I'll leave David to review the details. Repository: rC Clang https://reviews.llvm.org/D42508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D42508: AST: support protocol conformances on id/class/interfaces in MS ABI

2018-01-24 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:2459-2465 + if (T->isObjCId()) +mangleSourceName("objc_object"); + else if (T->isObjCClass()) +mangleSourceName("objc_class"); + else +mangleSourceName(T->getInterface()->getName()); +

Re: [libcxx] r323380 - [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Richard Trieu via cfe-commits
Thanks, Eric. On Wed, Jan 24, 2018 at 3:11 PM, Eric Fiselier wrote: > Sorry for the breakage. Fixed in r323389. > > On Wed, Jan 24, 2018 at 4:08 PM, Eric Fiselier wrote: > >> Looking. >> >> On Wed, Jan 24, 2018 at 3:52 PM, Richard Trieu wrote: >> >>> Hi Eric, >>> >>> I am getting a build failu

[PATCH] D42513: [CUDA] Added partial support for CUDA-9.1

2018-01-24 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: jlebar, jholewinski. Herald added subscribers: hintonda, mgorny, sanjoy. Clang can use CUDA-9.1 now, though new builtins (__hmma_m32n8k16*) are not implemented yet. The major change is that headers in CUDA-9.1 went through substantial changes that

[PATCH] D42490: [cmake] Set cmake policy CMP0068 to suppress warnings on OSX

2018-01-24 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. It turns out that policies don't survive a call to `cmake_minimum_required()`, so we need to rethink how llvm, et al, handles policies, e.g.: - move `cmake_minimum_required()` inside the `if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )` branch. - move all `cma

[libcxx] r323390 - Fix PR35564 - std::list splice/erase incorrectly throw in debug mode.

2018-01-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jan 24 16:02:48 2018 New Revision: 323390 URL: http://llvm.org/viewvc/llvm-project?rev=323390&view=rev Log: Fix PR35564 - std::list splice/erase incorrectly throw in debug mode. There was a bug in the implementation of splice where the container sizes were updated before

[PATCH] D41539: [CodeGen] Decorate aggregate accesses with TBAA tags

2018-01-24 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. Okay, that works, thanks! LGTM. https://reviews.llvm.org/D41539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D42357: Under limitation of allocated buffer, inplace_merge() does NOT take usage of partial allocated buffer but applies native rotate directly.

2018-01-24 Thread WeiChungChang via Phabricator via cfe-commits
WeiChungChang added a comment. Here gives the comparison after fix. F5783231: o1.png It is better now but still slower; also, one could notice the standard variance (each round the execution time is unstable even the input is uniform) The problem will be sho

[PATCH] D42464: add prefix with '_' support for property name. Corresponding apple dev doc: https://developer.apple.com/library/content/qa/qa1908/_index.html

2018-01-24 Thread Yan Zhang via Phabricator via cfe-commits
Wizard marked 7 inline comments as done. Wizard added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:120 + auto RegexExp = llvm::Regex( + llvm::StringRef(validPropertyNameRegex(Acronyms).replace(0, 2, "^"))); + return RegexExp.match(llvm::StringR

[PATCH] D42464: add prefix with '_' support for property name. Corresponding apple dev doc: https://developer.apple.com/library/content/qa/qa1908/_index.html

2018-01-24 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 131368. Wizard marked an inline comment as done. Wizard added a comment. check for class extentsion Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42464 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp docs/clang-tidy/checks/objc-prop

[PATCH] D42510: [libcxx] Always allow temporary binding when __reference_binds_to_temporary doesn't exist

2018-01-24 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: EricWF, rsmith. Herald added a subscriber: sanjoy. This is a follow-up to https://reviews.llvm.org/D41977. https://reviews.llvm.org/D42510 Files: libcxx/include/tuple Index: libcxx/include/tuple

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. Created https://reviews.llvm.org/D42510 for discussion. I'm not sure if it's a good idea, though. Repository: rCXX libc++ https://reviews.llvm.org/D41977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

Re: [PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Eric Fiselier via cfe-commits
Yes, it should. That was a silly mistake, and should already have been fixed in trunk. ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. `__can_bind_reference()` doesn't return anything when __reference_binds_to_temporary doesn't exist. This causes builds break with old compilers. Should it just return true if __reference_binds_to_temporary doesn't exist? Repository: rCXX libc++ https://reviews.llvm

[libcxx] r323389 - Fix missing return in __tuple_leaf::__can_bind_reference when __reference_binds_to_temporary added in r323380.

2018-01-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jan 24 15:10:02 2018 New Revision: 323389 URL: http://llvm.org/viewvc/llvm-project?rev=323389&view=rev Log: Fix missing return in __tuple_leaf::__can_bind_reference when __reference_binds_to_temporary added in r323380. Modified: libcxx/trunk/include/tuple Modified:

[PATCH] D42467: FreeBSD needs also execinfo

2018-01-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323387: FreeBSD needs also execinfo (in sanitizers) (authored by kamil, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42467?vs=131359&id=131

Re: [libcxx] r323380 - [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Eric Fiselier via cfe-commits
Sorry for the breakage. Fixed in r323389. On Wed, Jan 24, 2018 at 4:08 PM, Eric Fiselier wrote: > Looking. > > On Wed, Jan 24, 2018 at 3:52 PM, Richard Trieu wrote: > >> Hi Eric, >> >> I am getting a build failure after this revision: >> >> llvm/projects/libcxx/include/tuple:175:27: error: no r

r323387 - FreeBSD needs also execinfo (in sanitizers)

2018-01-24 Thread Kamil Rytarowski via cfe-commits
Author: kamil Date: Wed Jan 24 15:08:49 2018 New Revision: 323387 URL: http://llvm.org/viewvc/llvm-project?rev=323387&view=rev Log: FreeBSD needs also execinfo (in sanitizers) Summary: As NetBSD, FreeBSD needs execinfo for backtrace's matters. Patch by: David CARLIER. Reviewers: joerg, vitalybu

Re: [libcxx] r323380 - [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Eric Fiselier via cfe-commits
Looking. On Wed, Jan 24, 2018 at 3:52 PM, Richard Trieu wrote: > Hi Eric, > > I am getting a build failure after this revision: > > llvm/projects/libcxx/include/tuple:175:27: error: no return statement in > constexpr function > static constexpr bool __can_bind_reference() { >

[PATCH] D42508: AST: support protocol conformances on id/class/interfaces in MS ABI

2018-01-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: rjmccall, rnk. Herald added a subscriber: cfe-commits. Add support for mangling ObjC protocol conformances in MS ABI as if they are COM interfaces. By diverging from the itanium mangling of `objc_protocol` prefixed names, this approach a

Re: [libcxx] r323380 - [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Richard Trieu via cfe-commits
Hi Eric, I am getting a build failure after this revision: llvm/projects/libcxx/include/tuple:175:27: error: no return statement in constexpr function static constexpr bool __can_bind_reference() { ^ 1 error generated. It looks like if the #if in __can_bind_referenc

[libcxx] r323385 - Implement LWG2783: stack::emplace() and queue::emplace() should return decltype(auto)

2018-01-24 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jan 24 14:42:25 2018 New Revision: 323385 URL: http://llvm.org/viewvc/llvm-project?rev=323385&view=rev Log: Implement LWG2783: stack::emplace() and queue::emplace() should return decltype(auto) Modified: libcxx/trunk/include/queue libcxx/trunk/include/stack

[PATCH] D42467: FreeBSD needs also execinfo, libutil and libkvm

2018-01-24 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 131359. devnexen edited the summary of this revision. Repository: rC Clang https://reviews.llvm.org/D42467 Files: lib/Driver/ToolChains/CommonArgs.cpp Index: lib/Driver/ToolChains/CommonArgs.cpp

[PATCH] D42467: FreeBSD needs also execinfo, libutil and libkvm

2018-01-24 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. In https://reviews.llvm.org/D42467#987140, @krytarowski wrote: > I propose to skip now `-lkvm` and `-lutil` for FreeBSD. I'm researching now > an option to rebuild these libraries against sanitizers and so stop teaching > the world how to handle its API. > > Please kee

[PATCH] D42467: FreeBSD needs also execinfo, libutil and libkvm

2018-01-24 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 131358. Repository: rC Clang https://reviews.llvm.org/D42467 Files: lib/Driver/ToolChains/CommonArgs.cpp Index: lib/Driver/ToolChains/CommonArgs.cpp === --- lib/Driver/ToolChains/CommonAr

[PATCH] D42467: FreeBSD needs also execinfo, libutil and libkvm

2018-01-24 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. I propose to skip now `-lkvm` and `-lutil` for FreeBSD. I'm researching now an option to rebuild these libraries against sanitizers and so stop teaching the world how to handle its API. Please keep these patches locally for now. Repository: rC Clang https://rev

[PATCH] D42467: FreeBSD needs also execinfo, libutil and libkvm

2018-01-24 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 131356. Repository: rC Clang https://reviews.llvm.org/D42467 Files: lib/Driver/ToolChains/CommonArgs.cpp Index: lib/Driver/ToolChains/CommonArgs.cpp === --- lib/Driver/ToolChains/CommonAr

[PATCH] D41820: [coroutines] Pass coro func args to promise ctor

2018-01-24 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Great, thanks for the reviews! Repository: rC Clang https://reviews.llvm.org/D41820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42396: [analyzer] Do not attempt to get the pointee of void* .

2018-01-24 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323382: [analyzer] Do not attempt to get the pointee of void* (authored by alexshap, committed by ). Changed prior to commit: https://reviews.llvm.org/D42396?vs=130979&id=131352#toc Repository: rL LL

[PATCH] D41820: [coroutines] Pass coro func args to promise ctor

2018-01-24 Thread Brian Gesiak via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323381: [coroutines] Pass coro func args to promise ctor (authored by modocache, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D41820 Files: c

[PATCH] D41820: [coroutines] Pass coro func args to promise ctor

2018-01-24 Thread Brian Gesiak via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323381: [coroutines] Pass coro func args to promise ctor (authored by modocache, committed by ). Changed prior to commit: https://reviews.llvm.org/D41820?vs=129785&id=131351#toc Repository: rC Clang

r323382 - [analyzer] Do not attempt to get the pointee of void*

2018-01-24 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Wed Jan 24 14:17:30 2018 New Revision: 323382 URL: http://llvm.org/viewvc/llvm-project?rev=323382&view=rev Log: [analyzer] Do not attempt to get the pointee of void* Do not attempt to get the pointee of void* while generating a bug report (otherwise it will trigger an asse

r323381 - [coroutines] Pass coro func args to promise ctor

2018-01-24 Thread Brian Gesiak via cfe-commits
Author: modocache Date: Wed Jan 24 14:15:42 2018 New Revision: 323381 URL: http://llvm.org/viewvc/llvm-project?rev=323381&view=rev Log: [coroutines] Pass coro func args to promise ctor Summary: Use corutine function arguments to initialize a promise type, but only if the promise type defines a co

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 131348. EricWF added a comment. - Improve diagnostic as per @rsmiths suggestion. https://reviews.llvm.org/D41977 Files: include/tuple test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp test/libcxx/utilities/tuple/tuple.tuple/di

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX323380: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding… (authored by EricWF, committed by ). Repository: rCXX libc++ https://reviews.llvm.org/D41977 Files: include/

[libcxx] r323380 - [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jan 24 14:14:01 2018 New Revision: 323380 URL: http://llvm.org/viewvc/llvm-project?rev=323380&view=rev Log: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple. Summary: See https://bugs.llvm.org/show_bug.cgi?id=20855 Libc++ goes

[PATCH] D42396: [analyzer] Do not attempt to get the pointee of void* .

2018-01-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yeah, i guess that'd work as well :) Repository: rL LLVM https://reviews.llvm.org/D42396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D42500: [clang-format] Fixes indentation of inner text proto messages

2018-01-24 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good Repository: rC Clang https://reviews.llvm.org/D42500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D42221: [analyzer] NFC: See if existing C++ tests work with custom operator new().

2018-01-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323376: [analyzer] NFC: Run many existing C++ tests with a custom operator new(). (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D42221 Files: test/Analysis/In

r323376 - [analyzer] NFC: Run many existing C++ tests with a custom operator new().

2018-01-24 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 24 13:24:10 2018 New Revision: 323376 URL: http://llvm.org/viewvc/llvm-project?rev=323376&view=rev Log: [analyzer] NFC: Run many existing C++ tests with a custom operator new(). In order to provide more test coverage for inlined operator new(), add more run-lines t

[PATCH] D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object.

2018-01-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 131334. EricWF edited the summary of this revision. EricWF added a comment. - Use a better formulation for detecting when the Gro should be an NRVO variable. https://reviews.llvm.org/D42343 Files: lib/Sema/SemaCoroutine.cpp test/CodeGenCoroutines/coro-a

[PATCH] D42301: [ASTImporter] Support LambdaExprs and improve template support

2018-01-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D42301#986583, @a.sidorin wrote: > I'd rather create a separate patch - this one is already large enough. Is it > OK? Yeah, that is fine by me. Repository: rC Clang https://reviews.llvm.org/D42301 __

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 131335. sammccall added a comment. Remove obsolete typedef Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42499 Files: clangd/ClangdUnit.cpp clangd/Context.h clangd/Function.h clangd/JSONRPCDispatcher.cpp clangd/Trace.cpp clan

[PATCH] D42500: [clang-format] Fixes indentation of inner text proto messages

2018-01-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: djasper. Herald added a subscriber: klimek. Consider the text proto: message { sub { key: value } } Previously the first `{` was TT_Unknown, which caused the inner message to be indented by the continuation width. This didn't hap

[PATCH] D42219: [analyzer] Enable c++-allocator-inlining by default?

2018-01-24 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL323373: [analyzer] Enable c++-allocator-inlining by default. (authored by dergachev, committed by ). Herald added a subscr

r323373 - [analyzer] Enable c++-allocator-inlining by default.

2018-01-24 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 24 12:59:40 2018 New Revision: 323373 URL: http://llvm.org/viewvc/llvm-project?rev=323373&view=rev Log: [analyzer] Enable c++-allocator-inlining by default. This allows the analyzer to analyze ("inline") custom operator new() calls and, even more importantly, inlin

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, klimek. This is probably the right behavior for distributed tracers, and makes unpaired begin-end events impossible without requiring Spans to be bound to a thr

[PATCH] D42192: [analyzer] Assume that the allocated value is non-null before construction, not after.

2018-01-24 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL323370: [analyzer] Assume that the allocated value is non-null before construction. (authored by dergachev, committed by )

r323370 - [analyzer] Assume that the allocated value is non-null before construction.

2018-01-24 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 24 12:32:26 2018 New Revision: 323370 URL: http://llvm.org/viewvc/llvm-project?rev=323370&view=rev Log: [analyzer] Assume that the allocated value is non-null before construction. I.e. not after. In the c++-allocator-inlining=true mode, we need to make the assumpti

[PATCH] D42498: [ExprConstant] Fix crash when initialize an indirect field with another field.

2018-01-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rsmith, efriedma. When indirect field is initialized with another field, you have MemberExpr with CXXThisExpr that corresponds to the field's immediate anonymous parent. But 'this' was referring to the non-anonymous parent. So when we were bu

[PATCH] D42497: clang-cl: Simplify handling of /arch: flag.

2018-01-24 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rnk. Herald added subscribers: fedor.sergeev, kristof.beyls, sdardis, emaste, aemerson. r213083 initially implemented /arch: support by mapping it to CPU features. Then r241077 additionally mapped it to CPU, which made the feature flags red

r323368 - Revert r323051 "[cmake] Use CLANG_BINARY_DIR to determine the build directory."

2018-01-24 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Wed Jan 24 11:26:50 2018 New Revision: 323368 URL: http://llvm.org/viewvc/llvm-project?rev=323368&view=rev Log: Revert r323051 "[cmake] Use CLANG_BINARY_DIR to determine the build directory." This broke swift builds. Thanks for the post-commit review of Chris Bieneman and

[PATCH] D42457: [analyzer] Don't communicate evaluation failures through memregion hierarchy.

2018-01-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:572 +bool IsConstructorWithImproperlyModeledTargetRegion : 1; +bool IsArrayConstructorOrDestructor : 1; + }; george.karpenkov wrote: > OK my C++ knowledge

[PATCH] D42457: [analyzer] Don't communicate evaluation failures through memregion hierarchy.

2018-01-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 131321. NoQ marked 8 inline comments as done. NoQ added a comment. Address comments. https://reviews.llvm.org/D42457 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h lib/StaticAnalyzer/Core/ExprEngineCXX.cpp lib/StaticAnalyzer/Core/Expr

[PATCH] D42464: add prefix with '_' support for property name. Corresponding apple dev doc: https://developer.apple.com/library/content/qa/qa1908/_index.html

2018-01-24 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:102 +bool hasCategoryPropertyPrefix(const llvm::StringRef &PropertyName) { + for (size_t i = 0; i < PropertyName.size() - 1; ++i) { +if (PropertyName[i] == '_') { benhamil

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/modernize-use-uncaught-exceptions.cpp:64 + // CHECK-MESSAGES: [[@LINE-1]]:10: warning: 'std::uncaught_exception' is deprecated, use 'std::uncaught_exceptions' instead + // CHECK-FIXES: foo = &uncaught_exceptions;

[PATCH] D42455: Don't create hidden dllimport global values

2018-01-24 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola closed this revision. espindola added a comment. 323361 https://reviews.llvm.org/D42455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r323362 - IRGen: Emit an inline implementation of __builtin_wmemcmp on MSVCRT platforms.

2018-01-24 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Wed Jan 24 10:59:58 2018 New Revision: 323362 URL: http://llvm.org/viewvc/llvm-project?rev=323362&view=rev Log: IRGen: Emit an inline implementation of __builtin_wmemcmp on MSVCRT platforms. The MSVC runtime library does not provide a definition of wmemcmp, so we need an inline

r323361 - Don't create hidden dllimport global values.

2018-01-24 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Wed Jan 24 10:58:32 2018 New Revision: 323361 URL: http://llvm.org/viewvc/llvm-project?rev=323361&view=rev Log: Don't create hidden dllimport global values. Hidden visibility is almost the opposite of dllimport. We were producing them before (dllimport wins in the existing ll

r323360 - [Hexagon] Accept lowercase b in -hvx-length=64b and -hvx-length=128b

2018-01-24 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Wed Jan 24 10:42:19 2018 New Revision: 323360 URL: http://llvm.org/viewvc/llvm-project?rev=323360&view=rev Log: [Hexagon] Accept lowercase b in -hvx-length=64b and -hvx-length=128b Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp cfe/trunk/test/Driver/hexagon-h

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-01-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. George's style comments are usually super spot-on. Please feel free to improve my code. Also it was only written as a proof-of-concept because i failed to explain my approach with natural language, so it definitely needs polishing. I'd let you know when i disagree with anyt

Re: [analyzer] Add support for __builtin_constant_p to BuiltinFunctionChecker

2018-01-24 Thread George Karpenkov via cfe-commits
Hi Felix, If you would like to get the patch reviewed and committed the best way is to create a review in phabricator (http://reviews.llvm.org) and add Devin Coughlin, me, and Artem Dergachev as reviewers. > On Jan 16, 2018, at 7:30 PM, Vedant Kumar wrote: > > + Devin and George > >> On Jan

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-24 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Herald added a subscriber: hintonda. Comment at: test/clang-tidy/modernize-use-uncaught-exceptions.cpp:64 + // CHECK-MESSAGES: [[@LINE-1]]:10: warning: 'std::uncaught_exception' is deprecated, use 'std::uncaught_exceptions' instead + // CHECK-F

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2018-01-24 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 131305. simark added a comment. Move implementation of setCompileCommandsDir to .cpp Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D39571 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/Clang

[clang-tools-extra] r323350 - [clangd] add test for r323347 CodeComplete behavior we rely on

2018-01-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jan 24 09:53:32 2018 New Revision: 323350 URL: http://llvm.org/viewvc/llvm-project?rev=323350&view=rev Log: [clangd] add test for r323347 CodeComplete behavior we rely on Modified: clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp Modified: clang-tool

[PATCH] D42428: [CodeComplete] only respect LoadExternal hint at namespace/tu scope

2018-01-24 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323347: [CodeComplete] only respect LoadExternal hint at namespace/tu scope (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org

r323347 - [CodeComplete] only respect LoadExternal hint at namespace/tu scope

2018-01-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jan 24 09:50:20 2018 New Revision: 323347 URL: http://llvm.org/viewvc/llvm-project?rev=323347&view=rev Log: [CodeComplete] only respect LoadExternal hint at namespace/tu scope Reviewers: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.ll

[PATCH] D42452: [CUDA] Disable PGO and coverage instrumentation in NVPTX.

2018-01-24 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323345: [CUDA] Disable PGO and coverage instrumentation in NVPTX. (authored by tra, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42452?vs=1

[PATCH] D42452: [CUDA] Disable PGO and coverage instrumentation in NVPTX.

2018-01-24 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323345: [CUDA] Disable PGO and coverage instrumentation in NVPTX. (authored by tra, committed by ). Changed prior to commit: https://reviews.llvm.org/D42452?vs=131170&id=131298#toc Repository: rC Cla

r323345 - [CUDA] Disable PGO and coverage instrumentation in NVPTX.

2018-01-24 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Jan 24 09:41:02 2018 New Revision: 323345 URL: http://llvm.org/viewvc/llvm-project?rev=323345&view=rev Log: [CUDA] Disable PGO and coverage instrumentation in NVPTX. NVPTX does not have runtime support necessary for profiling to work and even call arc collection is prohibiti

[PATCH] D42464: add prefix with '_' support for property name. Corresponding apple dev doc: https://developer.apple.com/library/content/qa/qa1908/_index.html

2018-01-24 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:52 /// FIXME: provide fix for snake_case to snakeCase -FixItHint generateFixItHint(const ObjCPropertyDecl *Decl) { - if (isupper(Decl->getName()[0])) { -auto NewName = Decl->getName(

[PATCH] D42493: [clang-format] Fix ObjC message arguments formatting.

2018-01-24 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak created this revision. Herald added subscribers: cfe-commits, klimek. jolesiak edited the summary of this revision. Fixes formatting of ObjC message arguments when inline block is a first argument. Having inline block as a first when method has multiple parameters is discouraged by Apple

[PATCH] D42491: [clangd] Disable typo correction when doing code completion.

2018-01-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: ioeric, jkorous-apple, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42491 Files: clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTests.cpp Index: unittests/clangd/

[PATCH] D42490: [cmake] Set cmake policy CMP0068 to suppress warnings on OSX

2018-01-24 Thread Don Hinton via Phabricator via cfe-commits
hintonda created this revision. hintonda added reviewers: beanz, compnerd, phosek, EricWF. Herald added subscribers: cfe-commits, mgorny. Set cmake policy CMP0068=NEW, if available -- depends on https://reviews.llvm.org/D42463 which also adds target property "BUILD_WITH_INSTALL_NAME_DIR On" to ma

[PATCH] D42466: [Sema] Allow disabling typo correction when doing code completion.

2018-01-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein abandoned this revision. hokein added inline comments. Comment at: lib/Sema/Sema.cpp:143 ArgumentPackSubstitutionIndex(-1), CurrentInstantiationScope(nullptr), - DisableTypoCorrection(false), TyposCorrected(0), AnalysisWarnings(*this), + DisableTypoCorrect

[PATCH] D42301: [ASTImporter] Support LambdaExprs and improve template support

2018-01-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. In https://reviews.llvm.org/D42301#984695, @xazax.hun wrote: > High level note: `clang::TypeAliasDecl` has the same issue as > `CXXRecordDecl`, so templated versions should not be added to the > DeclContext. Could you add that just for the sake of completeness? I'd

[PATCH] D42301: [ASTImporter] Support LambdaExprs and improve template support

2018-01-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 131279. a.sidorin added a comment. Addressed review comments Repository: rC Clang https://reviews.llvm.org/D42301 Files: lib/AST/ASTImporter.cpp lib/AST/ASTStructuralEquivalence.cpp lib/AST/ExternalASTMerger.cpp test/ASTMerge/class-template/Inp

[PATCH] D42455: Don't create hidden dllimport global values

2018-01-24 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/D42455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2018-01-24 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/ClangdLSPServer.cpp:302 +// FIXME: This function needs to be properly tested. +void ClangdLSPServer::onChangeConfiguration( ilya-biryukov wrote: > Are you planning to to address this FIXME before checking the cod

[PATCH] D42484: [clangd] Limit completion results.

2018-01-24 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. Thank you! Comment at: clangd/tool/ClangdMain.cpp:128 +static llvm::cl::opt LimitCompletionResult( +"limit-completion-results", +llvm::cl::desc("Limit the numbe

[PATCH] D42484: [clangd] Limit completion results.

2018-01-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ioeric, jkorous-apple, ilya-biryukov, klimek. - truncate symbols from static/dynamic index to the limited number (which would save lots of cost in constructing the merged symbols). - add an CLI option all

Re: r323330 - clang-cl: Parse /permissive-, /Bt, Bt+ (PR32672)

2018-01-24 Thread Nico Weber via cfe-commits
(see also this thread for some prior discussion on /permissive-: https://marc.info/?t=14930460853&r=1&w=2 Ignoring seems like a good thing to do for now.) On Wed, Jan 24, 2018 at 10:18 AM, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: hans > Date: Wed Jan 24 07:

Re: r323008 - [Lex] Fix crash on code completion in comment in included file.

2018-01-24 Thread Hans Wennborg via cfe-commits
Merged to 6.0 in r32 as requested in PR36043. Richard, please complain if you don't agree. On Sat, Jan 20, 2018 at 12:41 AM, Volodymyr Sapsai via cfe-commits wrote: > Author: vsapsai > Date: Fri Jan 19 15:41:47 2018 > New Revision: 323008 > > URL: http://llvm.org/viewvc/llvm-project?rev=32300

Re: r323008 - [Lex] Fix crash on code completion in comment in included file.

2018-01-24 Thread Hans Wennborg via cfe-commits
On Wed, Jan 24, 2018 at 4:30 PM, Hans Wennborg wrote: > Merged to 6.0 in r32 as requested in PR36043. Richard, please > complain if you don't agree. Actually cc'ing Richard this time. > > On Sat, Jan 20, 2018 at 12:41 AM, Volodymyr Sapsai via cfe-commits > wrote: >> Author: vsapsai >> Date:

[PATCH] D42480: [clangd] Provide a helper to report estimated memory usage per-file

2018-01-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: sammccall, ioeric, hokein. Herald added subscribers: jkorous-apple, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42480 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ClangdUnit.cpp

r323330 - clang-cl: Parse /permissive-, /Bt, Bt+ (PR32672)

2018-01-24 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Jan 24 07:18:12 2018 New Revision: 323330 URL: http://llvm.org/viewvc/llvm-project?rev=323330&view=rev Log: clang-cl: Parse /permissive-, /Bt, Bt+ (PR32672) Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td cfe/trunk/test/Driver/cl-options.c Modified: cfe

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-01-24 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Thank you for your comments. Since the original author of this particular code is Artem, I think he will answer your questions. https://reviews.llvm.org/D41938 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D41539: [CodeGen] Decorate aggregate accesses with TBAA tags

2018-01-24 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 131257. kosarev added a comment. The copying functions changed to take LValues. It seems Address-taking versions are not very useful so we don't bother with overloading. https://reviews.llvm.org/D41539 Files: lib/CodeGen/CGAtomic.cpp lib/CodeGen/CGCall

[PATCH] D42466: [Sema] Allow disabling typo correction when doing code completion.

2018-01-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Sema/Sema.cpp:143 ArgumentPackSubstitutionIndex(-1), CurrentInstantiationScope(nullptr), - DisableTypoCorrection(false), TyposCorrected(0), AnalysisWarnings(*this), + DisableTypoCorrection( + CodeCompl

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-01-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I also propose to try correcting in both directions, i.e. here's how completion completion could work with this feature: struct X { int foobarbaz; }; void test() { X var; X* ptr; std::unique_ptr uptr; var->foobar // replace with var.foo

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-01-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for not taking a look for a long time. I think that would be a very useful feature to have. Here are a few comments (also see the inline comments) - Please add tests - How would the clients know how to correct dot to arrow? It'd be cool if code completion re

[PATCH] D42474: [DO NOT SUBMIT] Provide results with '.' to '->' corrections in completion

2018-01-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Herald added a subscriber: cfe-commits. Not intended to be submitted, this is a suggestion on how to make the code in https://reviews.llvm.org/D41537 easier. Repository: rC Clang https://reviews.llvm.org/D42474 Files: include/clang/Sema/Sema.h lib/Par

[PATCH] D42335: [ASTImporter] Supporting CXXOperatorCallExpr, SizeOfPackExpr, DependentTemplateSpecializationType, DependentSizedArray, CXXTypeidExpr importing.

2018-01-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/AST/ASTImporter.cpp:6207 +TypeSourceInfo *TSI = Importer.Import(E->getTypeOperandSourceInfo()); +if (!TSI && E->getTypeOperandSourceInfo()) + return nullptr; As I see from usage of `getTypeOperandSourc

[PATCH] D42467: FreeBSD needs also execinfo, libutil and libkvm

2018-01-24 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 131239. devnexen edited the summary of this revision. Repository: rC Clang https://reviews.llvm.org/D42467 Files: lib/Driver/ToolChains/CommonArgs.cpp Index: lib/Driver/ToolChains/CommonArgs.cpp

[PATCH] D42467: FreeBSD needs also execinfo, libutil and libkvm

2018-01-24 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In https://reviews.llvm.org/D42467#986280, @devnexen wrote: > In https://reviews.llvm.org/D42467#986279, @krytarowski wrote: > > > Please update the `-lutil` comment in the code according to the comment. I > > can land this for you once it will be accepted. > > > In

  1   2   >