[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:896 let AdditionalMembers = [{ -IdentifierInfo *getCPUName(unsigned Index) const { - return *(cpus_begin() + Index); +// gets the ordinal of the requested CPU name, or 0 if it isn't in th

[PATCH] D55562: Atomics: support min/max orthogonally

2018-12-11 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added a comment. > What does it do with floating-point inputs? Same as all the other atomics: run screaming for the hills (or error out, in more reasonable terms). The only way to implement floating atomics in LLVM IR would be with a compare-exchange loop and Clang doesn't expose

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 177767. erichkeane marked 8 inline comments as done. erichkeane added a comment. Thanks @aaron.ballman . This should fix all of your complaints. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55527/new/ https://reviews.llvm.org/D55527 Files: i

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-12-11 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. This header is used on systems without glibc. So please don't argue about behavior based only on that. Granted, most other libc implementation are less annoying when it comes to `free` and `malloc`, but still. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43871/n

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 11. jdoerfert marked 11 inline comments as done. jdoerfert added a comment. Fix and improve documentation Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/ https://reviews.llvm.org/D55483 Files: include/clang/

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Thanks for the feedback. Once we decided on the style of the annotation, I will implement that and change the tests/documentation accordingly. Comment at: include/clang/Basic/Attr.td:1204 + VariadicUnsignedArgument<"PayloadIndices">]; +

[PATCH] D55576: [libcxx] [test] [support] Use socket()+bind() to create unix sockets portably

2018-12-11 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: EricWF, krytarowski. Herald added subscribers: libcxx-commits, ldionne, emaste. Replace the mknod() call with socket() + bind() for creating unix sockets. The mknod() method is not portable and does not work on NetBSD while binding the socket

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith marked an inline comment as done. rsmith added a comment. Thanks, this makes a lot of sense to me. Comment at: lib/CodeGen/CodeGenModule.cpp:907 +if (CGM.getTarget().supportsIFunc()) +Out << ".ifunc"; + } else if (CGM.getTarget().supportsIFunc()) ---

r348899 - Replace Const-Member checking with non-recursive version.

2018-12-11 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Dec 11 13:54:52 2018 New Revision: 348899 URL: http://llvm.org/viewvc/llvm-project?rev=348899&view=rev Log: Replace Const-Member checking with non-recursive version. As reported in PR39946, these two implementations cause stack overflows to occur when a type recursive

[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/tools/libclang/CXType.cpp:132 + if (!(TU->ParsingOptions & CXTranslationUnit_IncludeAttributedTypes) && + ATT->getAttrKind() != attr::AddressSpace) { return M

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 4 inline comments as done. erichkeane added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:910 Out << ".resolver"; } rsmith wrote: > Hmm, it looks like we don't have a unique name for a `GlobalDecl` naming the > `CPUOrdinal

[PATCH] D55270: [Sema] Further improvements to to static_assert diagnostics.

2018-12-11 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. @courbet: On the cpplang Slack, Peter Feichtinger mentioned that defaulted template arguments should perhaps be treated differently. Is there any way to suppress the `, std::allocator` part of this diagnostic? https://godbolt.org/z/TM0UHc Before your patches: :1

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-11 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Sorry, I was out sick for a week. We should ask @smeenai about this change, since he has been doing more work in this area recently. Comment at: CodeGen/CodeGenModule.cpp:2957-2958 !getCodeGenOpts().LTOVisibilityPublicStd && - !getTripl

[PATCH] D55566: [analyzer] LiveVariables: Fix a zombie expression problem, add testing infrastructure.

2018-12-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Makes sense! I like the summary a lot, and the fact that you added a new debug checker. I feel like I'm not yet qualified to give meaningful feedback though, but if you are not in a hurry, I'll happily play around with this patch next week, and both learn a bit and po

[PATCH] D55525: [Driver] Add support for -fembed-bitcode for assembly file

2018-12-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. This really feels odd. Why not expect that the developer will add the content themselves? I'm not sure I understand the motivation for this change. I think that this should be easy to write a test case for as well. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a subscriber: theraven. compnerd added inline comments. Comment at: CodeGen/CodeGenModule.cpp:2957-2958 !getCodeGenOpts().LTOVisibilityPublicStd && - !getTriple().isWindowsGNUEnvironment()) { + !getTriple().isWindowsGNUEnvironment() &&

[PATCH] D55586: Basic: make `int_least64_t` and `int_fast64_t` match on Darwin

2018-12-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: ahatanak, rjmccall. The Darwin targets use `int64_t` and `uint64_t` to define the `int_least64_t` and `int_fast64_t` types. The underlying type is actually a `long long`. Match the types to allow the printf specifiers to work properly and

[PATCH] D55482: [clang-tidy] Improve google-objc-function-naming diagnostics 📙

2018-12-11 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 177795. stephanemoore marked 5 inline comments as done. stephanemoore added a comment. Changes: • Drop const on local bool variable. • Adopt the term "function in global namespace" in diagnostic messages. CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D55482: [clang-tidy] Improve google-objc-function-naming diagnostics 📙

2018-12-11 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tidy/google/FunctionNamingCheck.cpp:115 diag(MatchedDecl->getLocation(), - "function name %0 not using function naming conventions described by " - "Google Objective-C style guide") - << MatchedDecl << gen

[PATCH] D55546: [clang] Add AST matcher for block expressions 🔍

2018-12-11 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Please let me know if I missed anything as part of this proposed change. I tried my best to determine how to make this change appropriately based on previous submissions and documentation but I recognize that I could have missed things 😅 Repository: rC Clang

[PATCH] D55510: [ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types

2018-12-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 177796. hubert.reinterpretcast added a comment. Recast representation-sensitive tests as SemaCXX tests using array bounds Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55510/new/ https://reviews.llvm.org/D55510

[PATCH] D53238: [Driver] Add -static-{rtlib, stdlib} and make -static-{libgcc, libstdc++} their aliases

2018-12-11 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. (sub) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53238/new/ https://reviews.llvm.org/D53238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-11 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Thanks. I think what we really want to do here is reconsider our default for applying dllimport. Leaving things unannotated is a good safe default for every environment. In the absence of any flags, clang should assume runtime functions are statically linked. The linker wil

[PATCH] D55510: [ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types

2018-12-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: lib/AST/ExprConstant.cpp:6147-6148 + return ZeroInitialization(E); +if (!Result.checkNullPointerForFoldAccess(Info, E, AK_Read)) + return false;

[PATCH] D55525: [Driver] Add support for -fembed-bitcode for assembly file

2018-12-11 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. In D55525#1327742 , @compnerd wrote: > This really feels odd. Why not expect that the developer will add the > content themselves? I'm not sure I understand the motivation for this change. The main motivation for upstreaming

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

2018-12-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 177803. vsapsai added a comment. - Update `__has_construct`, `__has_destroy` according to review comments. - Tighten tests: custom allocators aren't mandated by C++03 but libc++ has the support. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48753/ne

Buildbot numbers for the week of 11/18/2018 - 11/24/2018

2018-12-11 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 11/18/2018 - 11/24/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to

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

2018-12-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 3 inline comments as done. vsapsai added a comment. Regarding the tests. I've moved most of new tests for custom allocators to test/libcxx/*. And in destroy.pass.cpp I'm just checking `_LIBCPP_VERSION` to avoid copying the test to a different file. Comment at:

Buildbot numbers for the week of 11/25/2018 - 12/01/2018

2018-12-11 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 11/25/2018 - 12/01/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to

Buildbot numbers for the week of 12/02/2018 - 12/08/2018

2018-12-11 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the last week of 12/02/2018 - 12/08/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from gre

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

2018-12-11 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: libcxx/include/memory:1726 +#else // _LIBCPP_HAS_NO_VARIADICS +template +_LIBCPP_INLINE_VISIBILITY vsapsai wrote: > ldionne wrote: > > Here, > > > > ``` > > template > enable_if<__has_construct::value

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

2018-12-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked an inline comment as done. vsapsai added a comment. In D48753#1323248 , @ldionne wrote: > 2. Also, before this patch, the allocator's `construct` and `destroy` were > NEVER called in C++03, but were called when available in C++11. After thi

Re: r346789 - DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use.

2018-12-11 Thread David Blaikie via cfe-commits
(tiny factoid: turns out gold's 64 bit gdb-index support is also broken in a different, more subtle way... - so best folks don't use this flag except with lld, it seems, if you're using gdb-index) On Tue, Nov 13, 2018 at 12:10 PM David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote:

[PATCH] D54604: Automatic variable initialization

2018-12-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. For the record: I'm OK with this direction. (I somewhat prefer removing the `-enable-long-wordy-thing` option and instead automatically disabling the `zero` option for clang release builds, but I'm OK with either approach.) Comment at: include/clang/Ba

[PATCH] D55510: [ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types

2018-12-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast marked 3 inline comments as done. hubert.reinterpretcast added inline comments. Comment at: lib/AST/ExprConstant.cpp:6147-6148 + return ZeroInitialization(E); +if (!Result.checkNullPointerForFoldAccess(Info, E, AK_Read)) + return false; +Q

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

2018-12-11 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii updated this revision to Diff 177810. hgabii marked an inline comment as done. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48866/new/ https://reviews.llvm.org/D48866 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/IncorrectPointerC

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

2018-12-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:139 + + Warns for cases when pointer is cast and the pointed to type is + incompatible with allocated memory area type. This may lead to access memory Please wrap up to 80 characters. Same

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

2018-12-11 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii added a comment. Check for different size and alignment as well. Tests migrated from D33826 . Warning in case of `reinterpret_cast`, but options is added to be able to turn it off. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://

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

2018-12-11 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii updated this revision to Diff 177812. hgabii added a comment. Highlight type names in documentation. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48866/new/ https://reviews.llvm.org/D48866 Files: clang-tidy/misc/CMakeLists.txt clang-tid

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

2018-12-11 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii marked 4 inline comments as done. hgabii added inline comments. Comment at: docs/ReleaseNotes.rst:139 + + Warns for cases when pointer is cast and the pointed to type is + incompatible with allocated memory area type. This may lead to access memory Eugen

r348907 - Move PCHContainerOperations from Frontend to Serialization

2018-12-11 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Dec 11 18:53:59 2018 New Revision: 348907 URL: http://llvm.org/viewvc/llvm-project?rev=348907&view=rev Log: Move PCHContainerOperations from Frontend to Serialization Fix a layering violation. Frontend depends on Serialization, so anything used by both should be in Seria

[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.

2018-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: docs/LibASTMatchersReference.html:2579-2581 +y(x); Matches +NS::y(x); Doesn't match +y(42); Doesn't match. aaron.ballman wrote: > EricWF wrote: > > aaron.ballman wrote:

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:3441 + Value); +} APSInt LHS = HandleIntToIntCast(Info, E, PromotedLHSType, Can we more fundamentally restructure this entire handler so that, if

[PATCH] D55543: [CodeGen] Fix assertion on throwing object with inlined inherited constructor and non-trivial destructor.

2018-12-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Nice catch. This also fixes problems where there might be cleanups entered by `EmitParmDecl`, e.g. in ObjC++ with a parameter of type `struct A { __strong id x; }`; could you please add a test for that and verify that the parameter is destroyed at an appropriate point

[PATCH] D55525: [Driver] Add support for -fembed-bitcode for assembly file

2018-12-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Please do clang-format this. If this is already in the wild, then, I suppose that we don't have the option, but, this seems like something that should be written by the author of the asse

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: CodeGen/CodeGenModule.cpp:2957-2958 !getCodeGenOpts().LTOVisibilityPublicStd && - !getTriple().isWindowsGNUEnvironment()) { + !getTriple().isWindowsGNUEnvironment() && + !getTriple().isWindowsMSVCEn

r348911 - [CodeGen] Fix -DBUILD_SHARED_LIBS=on build after rC348907

2018-12-11 Thread Fangrui Song via cfe-commits
Author: maskray Date: Tue Dec 11 22:07:33 2018 New Revision: 348911 URL: http://llvm.org/viewvc/llvm-project?rev=348911&view=rev Log: [CodeGen] Fix -DBUILD_SHARED_LIBS=on build after rC348907 Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt URL:

[PATCH] D55543: [CodeGen] Fix assertion on throwing object with inlined inherited constructor and non-trivial destructor.

2018-12-11 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I'd tried this exact same patch back in https://reviews.llvm.org/D44619, but I was running into a bunch of check-clang failures with it, and I was never able to figure them out. It looks like it works now though, so I'm glad :) Richard's comment from that diff might sti

[PATCH] D44619: [CodeGen] Add cleanup scope to EmitInlinedInheritingCXXConstructorCall

2018-12-11 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai abandoned this revision. smeenai added a comment. https://reviews.llvm.org/D55543 does the same thing Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44619/new/ https://reviews.llvm.org/D44619 ___ cfe-commits m

[PATCH] D51554: [CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

2018-12-11 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. LGTM. I'm quite a bit happier with this now. Thanks for going through the back and forth. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51554/new/ https://reviews.llvm.org/D51554 _

Re: r348276 - [AST][NFC] Make ArrayTypeTraitExpr non polymorphic

2018-12-11 Thread Mikael Holmén via cfe-commits
Hi, On 12/11/18 5:49 PM, Bruno Ricci wrote: > Hi Mikael, > > I can indeed reproduce this with gcc 5.5.0 when doing a Release > build with assertions. I cannot reproduce this with gcc 6.5.0 > (also with a Release build with assertions), nor can I reproduce > this with clang 7 (also with a Release

<    1   2