[PATCH] D45013: Generate warning when over-aligned new call is required but not supported.

2018-03-31 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D45013#1052600, @vsapsai wrote: > Does it make sense to have a warning for `__libcpp_deallocate` and > `get_temporary_buffer` too? Not sure about deallocate as you have allocated > memory already and allocation has a warning. So for

[PATCH] D45145: [Driver] Wire up the -f[no-]rtlib-add-rpath flag and tests

2018-03-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: rnk, pirama, bkramer, mgorny. Herald added a subscriber: cfe-commits. https://reviews.llvm.org/D30700 added the -f[no-]rtlib-add-rpath flag, but that flag was never wired up in the driver and tests were updated to check whether it actually

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

2018-03-31 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, aaron.ballman, majnemer. Herald added a subscriber: klimek. This patch refactors `UnaryTransformType` into `TransformTraitType` which accepts an arbitrary number of input arguments, which is needed to support upcoming traits such as

r328924 - Add missing include to ContinuousRangeMap.h

2018-03-31 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sat Mar 31 17:33:51 2018 New Revision: 328924 URL: http://llvm.org/viewvc/llvm-project?rev=328924=rev Log: Add missing include to ContinuousRangeMap.h Modified: cfe/trunk/include/clang/Serialization/ContinuousRangeMap.h Modified:

r328923 - Add missing include to Visibility.h

2018-03-31 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sat Mar 31 17:31:14 2018 New Revision: 328923 URL: http://llvm.org/viewvc/llvm-project?rev=328923=rev Log: Add missing include to Visibility.h Modified: cfe/trunk/include/clang/Basic/Visibility.h Modified: cfe/trunk/include/clang/Basic/Visibility.h URL:

[PATCH] D44238: [CFG] Fix automatic destructors when a member is bound to a reference.

2018-03-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Analysis/CFG.cpp:1435 /// extended by a local reference with the given initializer. static QualType getReferenceInitTemporaryType(ASTContext , const Expr *Init, Can

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-31 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks. LGTM whenever you've cleared up the self-hosting problems. Repository: rC Clang https://reviews.llvm.org/D44883 ___ cfe-commits

[PATCH] D45128: [libcxx][test] Silence -Wself-assign diagnostics

2018-03-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/std/language.support/support.types/byteops/and.assign.pass.cpp:30 -static_assert(noexcept(b &= b), "" ); +static_assert(noexcept(b &= (std::byte &)b), "" ); Quuxplusone wrote: > lebedev.ri wrote: >

[PATCH] D45128: [libcxx][test] Silence -Wself-assign diagnostics

2018-03-31 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: test/std/language.support/support.types/byteops/and.assign.pass.cpp:30 -static_assert(noexcept(b &= b), "" ); +static_assert(noexcept(b &= (std::byte &)b), "" ); lebedev.ri wrote: > EricWF wrote: > >

[PATCH] D45128: [libcxx][test] Silence -Wself-assign diagnostics

2018-03-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/std/language.support/support.types/byteops/and.assign.pass.cpp:30 -static_assert(noexcept(b &= b), "" ); +static_assert(noexcept(b &= (std::byte &)b), "" ); EricWF wrote: > Should Clang really be

[PATCH] D45128: [libcxx][test] Silence -Wself-assign diagnostics

2018-03-31 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/language.support/support.types/byteops/and.assign.pass.cpp:30 -static_assert(noexcept(b &= b), "" ); +static_assert(noexcept(b &= (std::byte &)b), "" ); Should Clang really be warning when the

[PATCH] D45061: [NVPTX, CUDA] Use custom feature detection to handle NVPTX target builtins.

2018-03-31 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. The llvm change and corresponding switch from satom->sm_60 in the front end is fine. Let's talk about the rest of it more. I'm not sure I'm seeing the need here rather than the annotations that are already here. Can you elaborate more here on why we need an

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 140554. lebedev.ri added a comment. - Revised release notes entry - Created https://reviews.llvm.org/D45128 with libcxx patch from stage-2 testing. Repository: rC Clang https://reviews.llvm.org/D44883 Files: docs/ReleaseNotes.rst

[PATCH] D45128: [libcxx][test] Silence -Wself-assign diagnostics

2018-03-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: mclow.lists, EricWF. https://reviews.llvm.org/D44883 extends -Wself-assign to also work on C++ classes. These new warnings pop up in the test suite, so they have to be silenced. Please refer to the https://reviews.llvm.org/D45082 for

r328922 - Revert r328845, it caused crbug.com/827810.

2018-03-31 Thread Nico Weber via cfe-commits
Author: nico Date: Sat Mar 31 11:26:25 2018 New Revision: 328922 URL: http://llvm.org/viewvc/llvm-project?rev=328922=rev Log: Revert r328845, it caused crbug.com/827810. Modified: cfe/trunk/include/clang/AST/Mangle.h cfe/trunk/include/clang/AST/VTableBuilder.h

[PATCH] D42893: [libclang] Add clang_File_tryGetRealPathName

2018-03-31 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe requested changes to this revision. jbcoe added a comment. This revision now requires changes to proceed. Can you add some simple tests? Repository: rC Clang https://reviews.llvm.org/D42893 ___ cfe-commits mailing list

[PATCH] D45112: [MS] Emit vftable thunks for functions with incomplete prototypes

2018-03-31 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D45112#1053539, @majnemer wrote: > Does this help PR25641? I think so, these are probably duplicate PRs. I think your analysis on that bug is slightly off, because the TU that provides `ImplCanvas::createColor` *can't* provide the thunks that

[PATCH] D45112: [MS] Emit vftable thunks for functions with incomplete prototypes

2018-03-31 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D45112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: docs/ReleaseNotes.rst:63 +- ``-Wself-assign`` and ``-Wself-assign-field`` were extended to diagnose + self-assignment operations using overloaded operators (i.e. classes) + Missing a final period. Also, these release

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 140547. lebedev.ri added a comment. - Rebased - Also test that `*&` contraption silences the warning. Repository: rC Clang https://reviews.llvm.org/D44883 Files: docs/ReleaseNotes.rst lib/Sema/SemaExpr.cpp

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2018-03-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/UnnecessaryIntermediateVarCheck.cpp:1 +//===--- UnnecessaryIntermediateVarCheck.cpp - +// clang-tidy--===// Please make fit line into 80 characters and remove incorrect

[PATCH] D45124: [CodeGen] Record if a C++ record is trivial type when emitting Codeview

2018-03-31 Thread Aaron Smith via Phabricator via cfe-commits
asmith created this revision. asmith added reviewers: rnk, zturner, llvm-commits. Herald added a subscriber: cfe-commits. This has a dependence on https://reviews.llvm.org/D45122 Repository: rC Clang https://reviews.llvm.org/D45124 Files: CodeGen/CGDebugInfo.cpp Index:

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2018-03-31 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon updated this revision to Diff 140541. tbourvon marked 3 inline comments as done. tbourvon added a comment. Order and link fixes in the release notes https://reviews.llvm.org/D37014 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp

[PATCH] D45121: [coroutines] Add noop_coroutine to

2018-03-31 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov created this revision. GorNishanov added reviewers: EricWF, lewissbaker, modocache. GorNishanov added dependencies: D45114: [coroutines] Add support for llvm.coro.noop intrinsics, D45120: [coroutines] Add __builtin_coro_noop => llvm.coro.noop. A recent addition to Coroutines TS

[PATCH] D45120: [coroutines] Add __builtin_coro_noop => llvm.coro.noop

2018-03-31 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov created this revision. GorNishanov added reviewers: EricWF, modocache, lewissbaker. A recent addition to Coroutines TS (https://wg21.link/p0913) adds a pre-defined coroutine noop_coroutine that does nothing. To implement this feature, we implemented an llvm.coro.noop intrinsic that

[PATCH] D45086: [analyzer] Unroll the loop when it has a unsigned counter.

2018-03-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328919: [analyzer] Unroll the loop when it has a unsigned counter. (authored by henrywong, committed by ). Repository: rC Clang https://reviews.llvm.org/D45086 Files:

r328919 - [analyzer] Unroll the loop when it has a unsigned counter.

2018-03-31 Thread Henry Wong via cfe-commits
Author: henrywong Date: Sat Mar 31 05:46:46 2018 New Revision: 328919 URL: http://llvm.org/viewvc/llvm-project?rev=328919=rev Log: [analyzer] Unroll the loop when it has a unsigned counter. Summary: The original implementation in the `LoopUnrolling.cpp` didn't consider the case where the

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Alright. Thank you for clarification :) Comment at: clang-tidy/bugprone/ComparisonInTempFailureRetryCheck.cpp:75 + const auto = *Result.Nodes.getNodeAs("assign"); + const auto = *cast(Assign.getRHS()->IgnoreParenCasts()); +