[PATCH] D50799: Fix for PR 38495: no longer compiles on FreeBSD, due to lack of timespec_get()

2018-08-15 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. LGTM. https://reviews.llvm.org/D50799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42972: Look for 32-bit libraries in /usr/lib32 for MIPS O32 on FreeBSD.

2018-02-06 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM, though a test case would be nice (could be added to `tools/clang/test/Driver/freebsd.c`) Repository: rC Clang https://reviews.llvm.org/D42972 ___

[PATCH] D43016: Fix for #31362 - ms_abi is implemented incorrectly for larger values (>=16 bytes).

2018-02-07 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. FWIW, this allows me to build wine again for x86_64, without any crashes or assertions. So that looks good, in any case. Repository: rC Clang https://reviews.llvm.org/D43016 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D43166: Add default C++ ABI libname and include paths for FreeBSD

2018-02-10 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: emaste, EricWF, mclow.lists. Herald added subscribers: krytarowski, mgorny. As noted in a discussion about testing the LLVM 6.0.0 release candidates (with libc++) for FreeBSD, many tests turned out to fail with "exception_ptr not yet implemented". T

[PATCH] D43159: Modernize: Use nullptr more.

2018-02-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. LGTM minus a few nits, though it would be nice if you can verify that all the changed headers still compile in `-std=c++98` and/or `-std=gnu++98` mode. Comment at: include/functional:1573 return &__f_.first(); -return (const void*)0; +retu

[PATCH] D43166: Add default C++ ABI libname and include paths for FreeBSD

2018-02-11 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324855: Add default C++ ABI libname and include paths for FreeBSD (authored by dim, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43166 Files:

[PATCH] D43159: Modernize: Use nullptr more.

2018-02-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In https://reviews.llvm.org/D43159#1004625, @EricWF wrote: > So my main concern with this patch is that `nullptr` is actually > `#defined`'ed in C++03 mode. That definition comes from the `__nullptr` > header, and therefore we would need to add that header to each include

[PATCH] D43209: Put type attributes after class keyword

2018-02-12 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: EricWF, mclow.lists. Compiling `` in C++17 or higher mode results in: functional:2500:1: warning: attribute '__visibility__' is ignored, place it after "class" to apply attribute to type declaration [-Wignored-attributes] _LIBCPP_TYPE_VIS ^

[PATCH] D43209: Put type attributes after class keyword

2018-02-13 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX325027: Put type attributes after class keyword (authored by dim, committed by ). Changed prior to commit: https://reviews.llvm.org/D43209?vs=133932&id=134065#toc Repository: rCXX libc++ https://r

[PATCH] D43394: [X86] Add 'sahf' CPU feature, and emit __LAHFSAHF__ for it

2018-02-16 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: craig.topper, coby, efriedma, rsmith. Make clang accept `-msahf` (and `-mno-sahf`) flags to activate the `+sahf` feature for the backend, for bug 36028 (Incorrect use of pushf/popf enables/disables interrupts on amd64 kernels). This was originally s

[PATCH] D43394: [X86] Add 'sahf' CPU feature, and emit __LAHFSAHF__ for it

2018-02-16 Thread Dimitry Andric via Phabricator via cfe-commits
dim added inline comments. Comment at: lib/Basic/Targets/X86.cpp:1049 + if (HasLAHFSAHF) +Builder.defineMacro("__LAHFSAHF__"); craig.topper wrote: > Does gcc define this? It's such a low level instruction I have a hard time > believing this define would b

[PATCH] D43394: [X86] Add 'sahf' CPU feature, and emit __LAHFSAHF__ for it

2018-02-16 Thread Dimitry Andric via Phabricator via cfe-commits
dim updated this revision to Diff 134746. dim added a comment. Added the `sahf` feature for knm, knl and amdfam10 too. Repository: rC Clang https://reviews.llvm.org/D43394 Files: include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h test/CodeGen/attr-targe

[PATCH] D43394: [X86] Add 'sahf' CPU feature to frontend

2018-02-17 Thread Dimitry Andric via Phabricator via cfe-commits
dim updated this revision to Diff 134808. dim added a comment. Remove the `__LAHFSAHF__` predefined macro. Repository: rC Clang https://reviews.llvm.org/D43394 Files: include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h test/CodeGen/attr-target-x86.c Ind

[PATCH] D43394: [X86] Add 'sahf' CPU feature to frontend

2018-02-17 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325446: [X86] Add 'sahf' CPU feature to frontend (authored by dim, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43394 Files: cfe/trunk/inclu

[PATCH] D30538: Add documentation for -fno-strict-aliasing

2017-05-26 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM, though it would be nice if we implemented gcc's extension for this at some point... ;) https://reviews.llvm.org/D30538 ___ cfe-commits mailing l

[PATCH] D33900: Print registered targets in clang's version information

2017-06-05 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. Other llvm tools display their registered targets when showing version information, but for some reason clang has never done this. To support this, https://reviews.llvm.org/D33899 adds the llvm parts, which make it possible to print version information to arbitrary raw

[PATCH] D33959: Adjust SetVersionPrinter call for D33899

2017-06-06 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. In https://reviews.llvm.org/D33899, I'm adding a `raw_ostream &` parameter to the function objects passed to `cl::SetVersionPrinter`. Adjust the call in clang-apply-replacements for this. https://reviews.llvm.org/D33959 Files: clang-apply-replacements/tool/ClangAp

[PATCH] D33959: Adjust SetVersionPrinter call for D33899

2017-06-06 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304837: Adjust SetVersionPrinter call for D33899 (authored by dim). Changed prior to commit: https://reviews.llvm.org/D33959?vs=101623&id=101630#toc Repository: rL LLVM https://reviews.llvm.org/D339

[PATCH] D33981: Only print registered targets for `--version`

2017-06-07 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. In https://reviews.llvm.org/D33900, I added printing of the registered targets in clang's `PrintVersion` function, which is not only used for `--version` output, but also for `-v` (verbose mode) and `-###`. Especially the latter seems to trip up some test cases, so it

[PATCH] D33981: Only print registered targets for `--version`

2017-06-07 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304899: Only print registered targets for `--version` (authored by dim). Changed prior to commit: https://reviews.llvm.org/D33981?vs=101690&id=101697#toc Repository: rL LLVM https://reviews.llvm.org

[PATCH] D41080: Don't trigger -Wuser-defined-literals for system headers

2017-12-14 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320755: Don't trigger -Wuser-defined-literals for system headers (authored by dim, committed by ). Changed prior to commit: https://reviews.llvm.org/D41080?vs=126436&id=127029#toc Repository: rC Clan

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-24 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. Yes, please. Rather sooner than later, the warning itself can be fixed post-6.0.0. Repository: rC Clang https://reviews.llvm.org/D41512 ___ cfe-co

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-24 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. Actually, having thought about it a little more, if the warning is "rather broken", or even "completely broken", depending on one's point of view, then maybe it is better not have it under `-Wextra` either? E.g. somebody has to ask for the warning specifically, using `-Wta

[PATCH] D41805: Add pre-C++11 is_constructible wrappers for 3 arguments

2018-01-06 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: EricWF, mclow.lists. Herald added a subscriber: krytarowski. After https://reviews.llvm.org/rL319736 for https://reviews.llvm.org/D28253 (which fixes PR28929), gcc cannot compile `` anymore in pre-C+11 modes, complaining: In file included from /

[PATCH] D41805: Add pre-C++11 is_constructible wrappers for 3 arguments

2018-01-07 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX321963: Add pre-C++11 is_constructible wrappers for 3 arguments (authored by dim, committed by ). Changed prior to commit: https://reviews.llvm.org/D41805?vs=128860&id=128873#toc Repository: rCXX l

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-15 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: rjmccall, rsmith, majnemer, efriedma. In some cases, a class type can have a definition, but its destructor may not yet be known. In that case, a segfault can occur in `EmitObjectDelete`. Avoid it by checking the return value of `CXXRecordDecl::get

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-15 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In https://reviews.llvm.org/D44536#1039420, @rjmccall wrote: > I'm not sure it's supposed to be a valid state to get into IRGen with a > non-trivial destructor that isn't yet declared. Richard? As a side note, clang also emits a warning about it (but then crashes :) ):

[PATCH] D41808: Rename clang link from clang-X.Y to clang-X

2018-03-17 Thread Dimitry Andric via Phabricator via cfe-commits
dim added inline comments. Comment at: CMakeLists.txt:422 + "${CLANG_VERSION_MAJOR}" CACHE STRING "Version number that will be placed into the clang executable, in the form XX.YY") set(LIBCLANG_LIBRARY_VERSION Please update the descriptions too, e.g. "

[PATCH] D44604: Make stdarg.h compatible with FreeBSD

2018-03-17 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. I'm fine with either this approach, or with the approach in stdint.h, e.g. using `__has_include_next()`, and in that case first including the system-provided header before this one. Repository: rC Clang https://reviews.llvm.org/D44604

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-19 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. @rsmith, any objections? Repository: rC Clang https://reviews.llvm.org/D44536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47987: Provide only one declaration of __throw_runtime_error

2018-06-09 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: hiraditya, mclow.lists, EricWF. Herald added subscribers: christof, krytarowski, emaste. In https://reviews.llvm.org/rL279903, @hiraditya added a second declaration of `__throw_runtime_error` to `include/__locale`. The original declaration was in `_

[PATCH] D54724: [Driver] Automatically include C++ library dependencies

2018-11-19 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. I think this is the wrong direction, placing "common" code in `addCXXStdlibLinkDeps`, which then has all kinds of ugly ifs and switches for different OSes? Let different OSes handle this in their own way, maybe. Until now I have not encountered an issue where I needed to a

[PATCH] D54724: [Driver] Automatically include C++ library dependencies

2018-11-20 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In https://reviews.llvm.org/D54724#1303844, @phosek wrote: > In https://reviews.llvm.org/D54724#1303809, @dim wrote: > > > I think this is the wrong direction, placing "common" code in > > `addCXXStdlibLinkDeps`, which then has all kinds of ugly ifs and switches > > for dif

[PATCH] D52394: [libcxx] Fix the definition of the check-cxx-abilist target on Darwin

2018-09-22 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. Ah, sorry about that! I should have realized this, but my CMake-fu is weak. :) Repository: rL LLVM https://reviews.llvm.org/D52394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D62873: Avoid building analyzer plugins if CLANG_ENABLE_STATIC_ANALYZER is OFF

2019-06-04 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: hintonda, dcoughlin, NoQ. Herald added subscribers: dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware, mgorny. Herald added a project: clang. Attempting to build clang with CLANG_ENABLE_STATIC_ANALYZER=OFF fails after rC362328

[PATCH] D62873: Avoid building analyzer plugins if CLANG_ENABLE_STATIC_ANALYZER is OFF

2019-06-15 Thread Dimitry Andric via Phabricator via cfe-commits
dim abandoned this revision. dim added a comment. No longer needed after rC362328 and follow-ups. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62873/new/ https://reviews.llvm.org/D62873

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim added subscribers: emaste, dim. dim added a comment. Please also exclude FreeBSD from these changes, since we care a lot about backwards compatibility, and specifically about alignment requirements. (We have run into many issues in our ports collection where upstream assumes everything is

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In fact, it is probably better to turn the OS check around, e.g. *only* increase the alignment for Linux, and nowhere else. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748 ___ c

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

2018-12-16 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. LGTM. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55576/new/ https://reviews.llvm.org/D55576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

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

2018-12-16 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D55576#1332370 , @mgorny wrote: > @dim, thanks for the review. Should I also try removing the following > restriction? > > #if !defined(__APPLE__) && !defined(__FreeBSD__) // No support for domain > sockets > {env.crea

[PATCH] D67119: On PowerPC, Secure-PLT by default for FreeBSD 13 and higher

2019-09-18 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372261: On PowerPC, Secure-PLT by default for FreeBSD 13 and higher (authored by dim, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES

[PATCH] D67992: [Sema] Add FunctionTypeUnwrapper

2019-09-25 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. This works for me, and also for the original test case from https://bugs.freebsd.org/240764. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67992/new/ https://reviews.llvm.org/D67992 _

[PATCH] D24867: Request init/fini array on FreeBSD 12 and later

2018-05-07 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. Brooks, I can commit this if you prefer. Maybe it can go into 6.0.2 still... https://reviews.llvm.org/D24867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24867: Request init/fini array on FreeBSD 12 and later

2018-06-29 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336008: Request init/fini array on FreeBSD 12 and later (authored by dim, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D24867?vs=72282&id=15

[PATCH] D47987: Provide only one declaration of __throw_runtime_error

2019-10-18 Thread Dimitry Andric via Phabricator via cfe-commits
dim abandoned this revision. dim added a comment. Herald added a subscriber: libcxx-commits. Obsoleted by D58425 (and rCXX354515 ). Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47987/new/

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-10-29 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. Hm, I would really say that `__isnan` and the other `__` prefixed functions are Linuxisms, or more accurately, glibc-isms. They also don't exist on e.g. macOS: $ cat check-isnan.cpp #include int check_isnan(double d) { return ::__isnan(d); } $ clang -

[PATCH] D69825: [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation

2020-05-29 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. FWIW, this change causes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246630, see in particular https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246630#c18. For some reason, not spawning a new process for the cc1 stage can lead to non-reproducible output. The exact c

[PATCH] D83645: Bump the default target CPU for i386-freebsd to i686

2020-07-19 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D83645#2160761 , @MaskRay wrote: > @dim > > Hi, your git commit contains extra Phabricator tags. You can drop > `Reviewers:` `Subscribers:` `Tags:` and the text `Summary:` from the git > commit with the following script: > > arc

[PATCH] D77776: [Driver] Drop support for FreeBSD < 10

2020-04-09 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D6#1971543 , @arichardson wrote: > Alternatively, the checks could be changed to also handle OSMajorVersion == 0 > and translate that to 10. > This seems to be what NetBSD.cpp does. Darwin.cpp also infers the version > from t

[PATCH] D69825: [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation

2020-06-03 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D69825#2070926 , @hans wrote: > In D69825#2063979 , @dim wrote: > > > FWIW, this change causes > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246630, see in particular > > https://bu

[PATCH] D69825: [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation

2020-06-04 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D69825#2071687 , @dim wrote: > Trying to reduce this now. Unfortunately this turned out to be a red herring, as the test case got reduced by `creduce` to just: a() { b(""); } The valgrind warnings are also different when you

[PATCH] D69825: [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation

2020-06-04 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. For completeness sake, here are the valgrind outputs of clang rGf7f1abdb889 (llvmorg-11-init-16778) built by gcc 9.3.0-10ubuntu2 (in RelWithDebInfo mode): F12078364: llvmorg-11-init-16778-gf7f1abdb889-gcc-

[PATCH] D69825: [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation

2020-06-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a subscriber: asbirlea. dim added a comment. Okay, after a long while of attempting to make a reproduction scenario, I finally managed one that consistently worked. As BSD make puts in different redirections for stderr when running in `-j` mode, it turned out that I could simply run t

[PATCH] D83645: Bump the default target CPU for i386-freebsd to i686

2020-07-12 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: emaste, brooks, rsmith. Herald added subscribers: jfb, krytarowski, arichardson. Herald added a project: clang. Similar to what we have done downstream, some time ago: https://svnweb.freebsd.org/changeset/base/353936 This followed some discussions o

[PATCH] D83645: Bump the default target CPU for i386-freebsd to i686

2020-07-12 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG02cfa7530d9e: Bump the default target CPU for i386-freebsd to i686 (authored by dim). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83645/new/ https://revie

[PATCH] D77776: [Driver] Default to libc++ on FreeBSD

2020-07-31 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D6#1993211 , @arichardson wrote: > I don't like the fact that this only changes one of the users of > `getTriple().getOSMajorVersion()`. Why not, if this is a one-off case, it's perfectly OK to put it in here. Maybe add a com

[PATCH] D77776: [Driver] Default to libc++ on FreeBSD

2020-07-31 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D6#2187334 , @myfreeweb wrote: > In D6#2187273 , @dim wrote: > >>> +#ifdef __FreeBSD__ >>> + return __FreeBSD_version / 10; >>> +#else >>> + return 10; >>> +#endif >

[PATCH] D44536: Avoid segfault when destructor is not yet known

2020-08-02 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. Hm, this review's still open after two years, and even as of 2020-08-02 clang still crashes on the sample. :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44536/new/ https://reviews.llvm.org/D44536 _

[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-08 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. For the rest, LGTM. It fixes the segfault, for both the full original test case, and my reduced version. Comment at: lib/Sema/SemaLambda.cpp:1491 else diag << From.getVar

[PATCH] D41064: Suppress -Wuser-defined-literals for and

2017-12-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. When compiling and/or with -Wsystem-headers, in C++14 or higher mode, clang produces warnings about the literal suffixes defined in them, e.g.: $ cat test.cpp #include $ clang -std=c++14 -Wsystem-headers -Wall -Wextra -c test.cpp In file included from test

[PATCH] D41064: Suppress -Wuser-defined-literals for and

2017-12-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim updated this revision to Diff 126397. dim added a comment. Updated to also include and . I think all cases are covered now. Repository: rCXX libc++ https://reviews.llvm.org/D41064 Files: include/chrono include/complex include/string include/string_view Index: include/string_v

[PATCH] D41080: Don't trigger -Wuser-defined-literals for system headers

2017-12-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. In https://reviews.llvm.org/D41064, I proposed adding `#pragma clang diagnostic ignored "-Wuser-defined-literals"` to some of libc++'s headers, since these warnings are now triggered by clang's new `-std=gnu++14` default: $ cat test.cpp #include $ clang -std=

[PATCH] D41064: Suppress -Wuser-defined-literals for and

2017-12-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim abandoned this revision. dim added a comment. Abandoned in favor of https://reviews.llvm.org/D41080. Repository: rCXX libc++ https://reviews.llvm.org/D41064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D41080: Don't trigger -Wuser-defined-literals for system headers

2017-12-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim updated this revision to Diff 126436. dim added a comment. Add a test case. Repository: rC Clang https://reviews.llvm.org/D41080 Files: lib/Sema/SemaDeclCXX.cpp test/SemaCXX/no-warn-user-defined-literals-in-system-headers.cpp test/SemaCXX/no-warn-user-defined-literals-in-system-hea

[PATCH] D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

2023-11-14 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. Yes, please. :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148474/new/ https://reviews.llvm.org/D148474 ___ cfe-commits mailing list cfe-comm

[PATCH] D131057: [Sema] -Wformat: support C23 printf %b %B

2022-08-03 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a subscriber: emaste. dim added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131057/new/ https://reviews.llvm.org/D131057

[PATCH] D131057: [Sema] -Wformat: support C23 printf %b %B

2022-08-03 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. > GCC 12 -Wformat -pedantic emits a warning: > > warning: ISO C17 does not support the ‘%b’ gnu_printf format [-Wformat=] > > The behavior is not ported (and it's unclear to me how to implement it). If you really want this, I think it can be implemented by looking at `Lang

[PATCH] D105594: cmake: Allow shared libraries to customize the soname using LLVM_ABI_REVISION

2021-07-21 Thread Dimitry Andric via Phabricator via cfe-commits
dim added inline comments. Comment at: clang/tools/clang-shlib/CMakeLists.txt:5 +set(LLVM_ABI_REVISION 0) + # Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off Is this actually needed? This CMakeLists.txt calls `add_clang_library()` in `clang/cmake/modules/

[PATCH] D130063: [Driver] Enable sanitizers on FreeBSD AArch64

2022-07-19 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM, are there any tests that need to be enabled explicitly? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130063/new/ https://reviews.llvm.org/D1300

[PATCH] D67119: On PowerPC, Secure-PLT by default for FreeBSD 13 and higher

2019-09-03 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: emaste, jhibbits, hfinkel. Herald added subscribers: steven.zhang, shchenz, jsji, MaskRay, kbarton, krytarowski, nemanjai. Herald added a project: clang. In https://svnweb.freebsd.org/changeset/base/349351, FreeBSD 13 and higher transitioned to Secu

[PATCH] D33900: Print registered targets in clang's version information

2017-07-28 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In https://reviews.llvm.org/D33900#824172, @thakis wrote: > dim: Does putting the target listing behind a different flag work for you? > Which problem are you trying to solve here? I'm fine with a different flag. For the problem I was trying to solve, see my earlier comm

[PATCH] D72014: [PowerPC]: Add powerpcspe target triple subarch component

2020-01-08 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72014/new/ https://reviews.llvm.org/D72014 ___ cfe-

[PATCH] D71827: [clang] avoid strict aliasing violation in assert

2020-01-09 Thread Dimitry Andric via Phabricator via cfe-commits
dim added inline comments. Comment at: clang/include/clang/AST/DeclContextInternals.h:102 // at getLookupResult. -assert(*(NamedDecl **)&Data == ND && +assert(Data.getAddrOfPtr1() && *Data.getAddrOfPtr1() == ND && "PointerUnion mangles the NamedDecl point

[PATCH] D73425: [PPC] Fix platform definitions when compiling FreeBSD powerpc64 as LE

2020-08-29 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfc2dac4116df: [PPC] Fix platform definitions when compiling FreeBSD powerpc64 as LE (authored by dim). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73425/ne

[PATCH] D73425: [PPC] Fix platform definitions when compiling FreeBSD powerpc64 as LE

2020-09-10 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D73425#2266446 , @Bdragon28 wrote: > Any chance of a backport to 11? I submitted https://bugs.llvm.org/show_bug.cgi?id=47485 for this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D44964: Change order of libclang_rt.profile link for freebsd

2020-10-30 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. Yes, this looks pretty fine to me, but indeed needs a test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44964/new/ https://reviews.llvm.org/D44964 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D109800: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO

2021-09-16 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. I can at least confirm that both the original test case for bug 51862 (from https://github.com/Macaulay2/frobby ) and the reduced test case compile successfully with this patch added. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D109800: [clang] don't mark as Elidable CXXConstruct expressions used in NRVO

2021-09-19 Thread Dimitry Andric via Phabricator via cfe-commits
dim added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:9937 + if (E->isElidable() && !ZeroInit) { +// FIXME: This only handles the simples case, where the source object +//is passed directly as the first argument to the constructor. ---

[PATCH] D110213: [PowerPC] Define XL-compatible macros only for AIX and Linux

2021-09-26 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. FWIW I think this is fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110213/new/ https://reviews.llvm.org/D110213 ___

[PATCH] D104753: [Driver] Stop linking _p libs for -pg on FreeBSD 14

2021-06-22 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. I mostly agree with this, but for the "silent ignoring" of `-pg` which this achieves. What would be the consequence of producing an error instead, like `-pg not supported for FreeBSD >= 14` ? Too m

[PATCH] D77776: [Driver] Default to libc++ on FreeBSD

2021-11-22 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6/new/ https://reviews.llvm.org/D6 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D114396: [Driver] Default to current FreeBSD profiling behaviour

2021-11-22 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114396/new/ https://reviews.llvm.org/D114396 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D114677: [AArch64] Avoid crashing on invalid -Wa,-march= values

2021-11-28 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: jcai19, ostannard, DavidSpickett, nickdesaulniers. Herald added subscribers: kristof.beyls, krytarowski, arichardson. dim requested review of this revision. Herald added a project: clang. As reported in https://bugs.freebsd.org/260078, the gnutls Mak

[PATCH] D114677: [AArch64] Avoid crashing on invalid -Wa,-march= values

2021-11-28 Thread Dimitry Andric via Phabricator via cfe-commits
dim updated this revision to Diff 390218. dim added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114677/new/ https://reviews.llvm.org/D114677 Files: clang/lib/Driver/ToolChains/Arch/AArch64.cpp clang/test/D

[PATCH] D114677: [AArch64] Avoid crashing on invalid -Wa,-march= values

2021-11-28 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdf08b2fe8b35: [AArch64] Avoid crashing on invalid -Wa,-march= values (authored by dim). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D135171: FreeBSD: enable __float128 on x86

2022-10-04 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135171/new/ https://reviews.llvm.org/D135171 ___ cfe-c

[PATCH] D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

2023-07-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim requested changes to this revision. dim added a comment. This revision now requires changes to proceed. FWIW, this fix works for the test cases I had via https://bugs.freebsd.org/269067 and https://github.com/llvm/llvm-project/issues/60182, but I got the following failure during check-all:

[PATCH] D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

2023-07-11 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D148474#4490041 , @dim wrote: > FWIW, this fix works for the test cases I had via > https://bugs.freebsd.org/269067 and > https://github.com/llvm/llvm-project/issues/60182, but I got the following > failure This was with `llvmo

[PATCH] D70110: [Driver][FreeBSD] Enable unwind tables on !amd64

2019-11-12 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70110/new/ https://reviews.llvm.org/D70110 ___ cfe-c

[PATCH] D70143: Check result of emitStrLen before passing it to CreateGEP

2019-11-12 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. dim added reviewers: xbolva00, spatel, jdoerfert, efriedma. Herald added subscribers: cfe-commits, hiraditya. Herald added projects: clang, LLVM. This fixes PR43081, where the transformation of `strchr(p, 0) -> p + strlen(p)` can cause a segfault, if `-fno-builtin-strlen

[PATCH] D70143: Check result of emitStrLen before passing it to CreateGEP

2019-11-12 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D70143#1742885 , @lebedev.ri wrote: > This should have a llvm ir test in `llvm/test/transforms/instcombine` i > think, not a clang test. Yes, I thought so too, but I could not get it to work (i.e. crash) with LLVM IR. I just do

[PATCH] D70143: Check result of emitStrLen before passing it to CreateGEP

2019-11-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim marked an inline comment as done. dim added inline comments. Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:370 +: nullptr; +} return nullptr; jdoerfert wrote: > Consistent style please: > > ``` > if (Value *StrLen =

[PATCH] D70143: Check result of emitStrLen before passing it to CreateGEP

2019-11-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. I submitted D70193 for adding a `-disable-builtin` option to `opt`. Once that is committed, this review can continue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70143/new/ https://reviews

[PATCH] D70143: Check result of emitStrLen before passing it to CreateGEP

2019-11-13 Thread Dimitry Andric via Phabricator via cfe-commits
dim updated this revision to Diff 229172. dim added a comment. Now `opt` supports `-disable-builtin`, move the test to `llvm/test/Transforms/InstCombine`. Also use code style of nearest preceding constructs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D70143: Check result of emitStrLen before passing it to CreateGEP

2019-11-13 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3db6783d8a7d: Check result of emitStrLen before passing it to CreateGEP (authored by dim). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70143/new/ https://

[PATCH] D69990: Populate CUDA flags on FreeBSD too, as many other toolchains do.

2019-11-17 Thread Dimitry Andric via Phabricator via cfe-commits
dim edited reviewers, added: dim, emaste; removed: clang. dim added a comment. I'll work on a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69990/new/ https://reviews.llvm.org/D69990 ___ cfe-comm

[PATCH] D69990: Populate CUDA flags on FreeBSD too, as many other toolchains do.

2019-11-18 Thread Dimitry Andric via Phabricator via cfe-commits
dim updated this revision to Diff 229883. dim added a comment. - Add cuda options test, copied from cuda-options.cu. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69990/new/ https://reviews.llvm.org/D69990 Files: clang/lib/Driver/ToolChains/Free

[PATCH] D69990: Populate CUDA flags on FreeBSD too, as many other toolchains do.

2019-11-18 Thread Dimitry Andric via Phabricator via cfe-commits
dim added reviewers: tra, yaxunl, ABataev. dim added a comment. Adding a few people who might know a bit more about CUDA specific things. Please take a look if this review makes any sense, thanks. :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69

[PATCH] D69990: Populate CUDA flags on FreeBSD too, as many other toolchains do.

2019-11-18 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In D69990#1750348 , @tra wrote: > LGTM, though I'm curious if it's particularly useful. Last time I checked > NVIDIA didn't ship libcudart for FreeBSD and without it it's rather > cumbersome to use CUDA in practice. After extractin

[PATCH] D69990: Populate CUDA flags on FreeBSD too, as many other toolchains do.

2019-11-18 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGee31adb7fa42: Populate CUDA flags on FreeBSD too, as many other toolchains do. (authored by dim). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69990/new/ h

  1   2   >