[PATCH] D49120: [libc++] P0898R3 2 of 12: Implement header

2018-07-09 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: include/concepts:175 +template +_LIBCPP_CONCEPT_DECL Same = __same_impl<_Tp, _Up> && __same_impl<_Up, _Tp>; + CaseyCarter wrote: > Quuxplusone wrote: > > Peanut gallery asks: From lines 166-171 it looks awfully like

[PATCH] D49058: [analyzer] Move DanglingInternalBufferChecker out of alpha

2018-07-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Don't you need to edit the tests as well? Repository: rC Clang https://reviews.llvm.org/D49058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r336637 - [X86] Use masked the masked scalar fma builtins to implement the default rounding version of the fma intrinsics.

2018-07-09 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon Jul 9 21:38:29 2018 New Revision: 336637 URL: http://llvm.org/viewvc/llvm-project?rev=336637&view=rev Log: [X86] Use masked the masked scalar fma builtins to implement the default rounding version of the fma intrinsics. The rounding mode is checked in CGBuiltin.cpp to

[libcxx] r336636 - Add new string benchmarks

2018-07-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jul 9 21:11:22 2018 New Revision: 336636 URL: http://llvm.org/viewvc/llvm-project?rev=336636&view=rev Log: Add new string benchmarks Modified: libcxx/trunk/benchmarks/string.bench.cpp Modified: libcxx/trunk/benchmarks/string.bench.cpp URL: http://llvm.org/viewvc/ll

[PATCH] D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type

2018-07-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Herald added a subscriber: dexonsmith. ping Repository: rC Clang https://reviews.llvm.org/D22391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-07-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Herald added a subscriber: dexonsmith. ping Repository: rC Clang https://reviews.llvm.org/D47757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-07-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: .gitignore:7 *.so +*.core + I'm pretty sure this file doesn't belong in this diff. Comment at: include/charconv:89 +_LIBCPP_BEGIN_NAMESPACE_STD + +enum class _LIBCPP_ENUM_VIS chars_format

Re: r336590 - [libclang] evalute compound statement cursors before trying to evaluate

2018-07-09 Thread Vlad Tsyrklevich via cfe-commits
The ASan bot is failing with a LeakSanitizer failure that appears related to one of your libclang changes: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/6282/steps/check-clang%20asan/logs/stdio Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x52c638 in

[PATCH] D49120: [libc++] P0898R3 2 of 12: Implement header

2018-07-09 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added inline comments. Comment at: include/concepts:175 +template +_LIBCPP_CONCEPT_DECL Same = __same_impl<_Tp, _Up> && __same_impl<_Up, _Tp>; + Quuxplusone wrote: > Peanut gallery asks: From lines 166-171 it looks awfully like > `__same_impl<_Tp, _

[PATCH] D49114: Add a clang-tidy check for "magic numbers"

2018-07-09 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: test/clang-tidy/readability-magic-numbers.cpp:38 +public: + TwoIntContainer(int val) : anotherMember(val * val), yetAnotherMember(2), anotherConstant(val + val) {} + // CHECK-MESSAGES: :[[@LINE-1]]:73: warning: magic number intege

[PATCH] D49114: Add a clang-tidy check for "magic numbers"

2018-07-09 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In https://reviews.llvm.org/D49114#1156878, @Quuxplusone wrote: > The cult of "no magic numbers" is horrible and we should be trying to > //deprogram// its adherents, not create a whole new generation of them. I > would be happy if this clang-tidy patch were quickly

[PATCH] D49120: [libc++] P0898R3 2 of 12: Implement header

2018-07-09 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: include/concepts:175 +template +_LIBCPP_CONCEPT_DECL Same = __same_impl<_Tp, _Up> && __same_impl<_Up, _Tp>; + Peanut gallery asks: From lines 166-171 it looks awfully like `__same_impl<_Tp, _Up>` is true if and onl

[PATCH] D49120: [libc++] P0898R3 2 of 12: Implement header

2018-07-09 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added inline comments. Comment at: include/concepts:193 +#endif +#if 0 // FIXME: File LWG issue +requires(_From (&_Fn)()) { static_cast<_To>(_Fn()); }; I suppose it would have been a good idea to fix this before submitting the patch for review -

r336634 - [Sema] Fix a structured binding typo correction bug

2018-07-09 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Jul 9 19:15:07 2018 New Revision: 336634 URL: http://llvm.org/viewvc/llvm-project?rev=336634&view=rev Log: [Sema] Fix a structured binding typo correction bug BindingDecls have null type until their initializer is processed, so we can't assume that a correction candidate

[PATCH] D49122: [libc++] P0898R3 3 of 12: Tests for Same, DerivedFrom, ConvertibleTo, and CommonReference

2018-07-09 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. CaseyCarter added reviewers: mclow.lists, EricWF. Like the title says, the first batch of tests. I'll stop at three chunks for now - that should be enough to get some reviewer feedback and keep me busy making changes. https://reviews.llvm.org/D49122 Files:

[PATCH] D49114: Add a clang-tidy check for "magic numbers"

2018-07-09 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. The cult of "no magic numbers" is horrible and we should be trying to //deprogram// its adherents, not create a whole new generation of them. I would be happy if this clang-tidy patch were quickly abandoned. //But//, it's just a clang-tidy check — it's easy for peop

[PATCH] D49120: [libc++] P0898R3 2 of 12: Implement header

2018-07-09 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. CaseyCarter added reviewers: mclow.lists, EricWF. Herald added subscribers: christof, modocache, mgorny. Piece number two contains the header, a bunch of "add a new header" changes, and LIT config to grok tests that need concepts (Thanks to @EricWF's similar ha

[PATCH] D49119: [Sema][ObjC] Issue a warning when a method declared in a protocol is non-escaping but the corresponding method in the implementation is escaping.

2018-07-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: arphaman, vsapsai, dcoughlin. ahatanak added a project: clang. Herald added a subscriber: dexonsmith. This patch makes Sema issue a warning when there is an extension that conforms to a protocol that declares a non-escaping method and the

[PATCH] D49118: [libc++] P0898R3 1 of 12: changes to common_type; implement common_reference

2018-07-09 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. CaseyCarter added reviewers: mclow.lists, EricWF. I'm breaking this up into independent bite-sized ~500 line reviews instead of a single 5200 line monster in hopes that we can turnaround changes quickly. This first piece implements the new bullet for `common_ty

[PATCH] D49114: Add a clang-tidy check for "magic numbers"

2018-07-09 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In https://reviews.llvm.org/D49114#1156835, @hfinkel wrote: > I suspect that the check will be very noisy for powers of 2 and 10 that are > used as multiplicands. You might wish to exclude those. Good point. > Also, what happens for enums? Especially when initiali

[PATCH] D49114: Add a clang-tidy check for "magic numbers"

2018-07-09 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. > This version detects and report integers only. If there is interest of > merging the tool I can add the functionality for floats as well. FWIW: I think that the FP check would be interesting. > Also I have seen coding guidelines suggesting "100" is grandfathered due t

r336632 - [ODRHash] Merge the two function hashes into one.

2018-07-09 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Jul 9 18:40:50 2018 New Revision: 336632 URL: http://llvm.org/viewvc/llvm-project?rev=336632&view=rev Log: [ODRHash] Merge the two function hashes into one. Functions that are a sub-Decl of a record were hashed differently than other functions. This change keeps the Add

[PATCH] D49114: Add a clang-tidy check for "magic numbers"

2018-07-09 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Perhaps M_PI wasn't the best example, as its value won't change soon, but other numbers should be defined in relation to constants. Also I have seen coding guidelines suggesting "100" is grandfathered due to 100% calculations. 2 and 10 due to logarithms, etc. Not su

r336630 - Update crash diagnostics test to avoid attempting to write into various

2018-07-09 Thread Eric Christopher via cfe-commits
Author: echristo Date: Mon Jul 9 18:01:38 2018 New Revision: 336630 URL: http://llvm.org/viewvc/llvm-project?rev=336630&view=rev Log: Update crash diagnostics test to avoid attempting to write into various directories if possible and to not require %t to have "Output" in the name. Modified:

r336629 - Fix parsing of privacy annotations in os_log format strings.

2018-07-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Jul 9 17:50:25 2018 New Revision: 336629 URL: http://llvm.org/viewvc/llvm-project?rev=336629&view=rev Log: Fix parsing of privacy annotations in os_log format strings. Privacy annotations shouldn't have to appear in the first comma-delimited string in order to be recog

r336628 - [X86] Remove custom handling for __builtin_ia32_divss_round_mask and __builtin_ia32_divsd_round_mask.

2018-07-09 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon Jul 9 17:50:03 2018 New Revision: 336628 URL: http://llvm.org/viewvc/llvm-project?rev=336628&view=rev Log: [X86] Remove custom handling for __builtin_ia32_divss_round_mask and __builtin_ia32_divsd_round_mask. Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified:

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-09 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:662 +def note_suspicious_sizeof_memset_silence : Note< + "%select{parenthesize the third argument|cast the second argument to 'int'}0 to silence">; + If it were my c

[PATCH] D49114: Add a clang-tidy check for "magic numbers"

2018-07-09 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- created this revision. 0x8000- added reviewers: Wizard, aaron.ballman, alexfh, hokein. Herald added subscribers: cfe-commits, mgorny. Add a clang-tidy check for "magic numbers", integers and floating point values embedded in the code instead of using symbols or constants. Bad exa

r336622 - [X86] Add __builtin_ia32_selectss_128 and __builtin_ia32_selectsd_128 that is suitable for use in scalar mask intrinsics.

2018-07-09 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon Jul 9 17:37:25 2018 New Revision: 336622 URL: http://llvm.org/viewvc/llvm-project?rev=336622&view=rev Log: [X86] Add __builtin_ia32_selectss_128 and __builtin_ia32_selectsd_128 that is suitable for use in scalar mask intrinsics. This will convert the i8 mask argument t

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, aaron.ballman, arphaman. Herald added a subscriber: dexonsmith. This warning tries to catch programs that incorrectly call memset with the second and third arguments transposed, ie `memset(ary, sizeof(ary), 0)` instea

[libcxx] r336618 - [test] two small cleanups:

2018-07-09 Thread Casey Carter via cfe-commits
Author: caseycarter Date: Mon Jul 9 16:45:09 2018 New Revision: 336618 URL: http://llvm.org/viewvc/llvm-project?rev=336618&view=rev Log: [test] two small cleanups: * Remove unused type from is_assignable.pass.cpp * Don't specialize `common_type<::X>` in common_type.pass.cpp, which violates the

[PATCH] D48506: Fix for Crash in nested name specifier decltype

2018-07-09 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer abandoned this revision. bviyer added a comment. Thank you Eric. I abandoned the revision as you suggested. Repository: rC Clang https://reviews.llvm.org/D48506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D45179: [libc++] Add _LIBCPP_ENABLE_NODISCARD and _LIBCPP_NODISCARD_EXT to allow pre-C++2a [[nodiscard]]

2018-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. A couple other notes: - Add an application of `_LIBCPP_NODISCARD_EXT` to `get_temporary_buffer` to demonstrate usage. https://reviews.llvm.org/D45179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D45179: [libc++] Add _LIBCPP_ENABLE_NODISCARD and _LIBCPP_NODISCARD_EXT to allow pre-C++2a [[nodiscard]]

2018-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 154724. EricWF retitled this revision from "[libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17" to "[libc++] Add _LIBCPP_ENABLE_NODISCARD and _LIBCPP_NODISCARD_EXT to allow pre-C++2a [[nodiscard]]". EricWF edited the summary of

[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

2018-07-09 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. Ping? https://reviews.llvm.org/D46013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-07-09 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. The overall point is that writing this kind of code is *extremely* error-prone. We are actually considering going in a different direction and doing a rollback for the previous rearrangement patches due to some issues. Could you see whether Z3 visitor would meet

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-07-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/constraint_manager_scale.c:78 + assert(x * 2 < 8); + clang_analyzer_eval(x < 4); // expected-warning{{TRUE}} + clang_analyzer_eval(x < 2); // expected-warning{{UNKNOWN}} If `int` is 32-bit and `x` equal to 2

r336610 - Rename function calls missed in r336605

2018-07-09 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Jul 9 15:09:33 2018 New Revision: 336610 URL: http://llvm.org/viewvc/llvm-project?rev=336610&view=rev Log: Rename function calls missed in r336605 NextIsLatest -> isFirst Modified: cfe/trunk/include/clang/AST/Decl.h Modified: cfe/trunk/include/clang/AST/Decl.h URL:

[PATCH] D45712: Diagnose invalid cv-qualifiers for friend decls.

2018-07-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma updated this revision to Diff 154707. efriedma edited the summary of this revision. efriedma added a comment. Move declspec checks before call to GetTypeForDeclarator, since it can fail for class templates. Repository: rC Clang https://reviews.llvm.org/D45712 Files: lib/Sema/Sema

[PATCH] D49002: [Index] Add index::IndexingOptions::IndexImplicitInstantiation

2018-07-09 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336606: [Index] Add index::IndexingOptions::IndexImplicitInstantiation (authored by MaskRay, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D

r336606 - [Index] Add index::IndexingOptions::IndexImplicitInstantiation

2018-07-09 Thread Fangrui Song via cfe-commits
Author: maskray Date: Mon Jul 9 14:49:06 2018 New Revision: 336606 URL: http://llvm.org/viewvc/llvm-project?rev=336606&view=rev Log: [Index] Add index::IndexingOptions::IndexImplicitInstantiation Summary: With IndexImplicitInstantiation=true, the following case records an occurrence of B::bar i

[PATCH] D48506: Fix for Crash in nested name specifier decltype

2018-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a subscriber: rtrieu. erik.pilkington added a comment. Looks like @rtrieu beat you to the punch in r336475! Presumably thats why the test case wasn't failing on TOT. Since this is already fixed, you should mark this revision as abandoned. Repository: rC Clang https://r

[PATCH] D45712: Diagnose invalid cv-qualifiers for friend decls.

2018-07-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I thought the template case wasn't using the same codepath, but apparently I was just confusing myself. The exact form "template friend class Y;" triggers an early out in Sema::ActOnFriendTypeDecl, so my code wasn't getting hit. I'll revise accordingly. Repository:

Re: r336475 - Check returned type is valid before using it.

2018-07-09 Thread David Blaikie via cfe-commits
Thanks for the fix! Though maybe this isn't the best diagnostic experience - given that 'bar' isn't technically an overloaded function, but is a function template - worth doing something more precise here? (maybe not) Wonder if there's similar handling for other diagnostic cases that could be use

[PATCH] D49059: [MinGW] Skip adding default win32 api libraries if -lwindowsapp is specified

2018-07-09 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: test/Driver/mingw-windowsapp.c:5-6 +// CHECK_DEFAULT: "-lmsvcrt" "-ladvapi32" "-lshell32" "-luser32" "-lkernel32" "-lmingw32" +// CHECK_WINDOWSAPP: "-lwindowsapp" "-lmingw32" +// CHECK_WINDOWSAPP-SAME: "-lmsvcrt" "-lmingw32" ---

[PATCH] D49059: [MinGW] Skip adding default win32 api libraries if -lwindowsapp is specified

2018-07-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D49059#1156453, @smeenai wrote: > LGTM, particularly given r314138. > > There are other umbrella libraries as well, e.g. OneCore and OneCoreUAP. Do > you care about those as well or just WindowsApp? I guess we would care, but there's nothin

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

2018-07-09 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336605: [AST] Rename some Redeclarable functions to reduce confusion (authored by MaskRay, committed by ). Changed prior to commit: https://reviews.llvm.org/D48894?vs=154044&id=154698#toc Repository:

r336605 - [AST] Rename some Redeclarable functions to reduce confusion

2018-07-09 Thread Fangrui Song via cfe-commits
Author: maskray Date: Mon Jul 9 14:31:20 2018 New Revision: 336605 URL: http://llvm.org/viewvc/llvm-project?rev=336605&view=rev Log: [AST] Rename some Redeclarable functions to reduce confusion Reviewers: rsmith, akyrtzi Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/

[PATCH] D48892: [libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY

2018-07-09 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. I've now managed to run the `check-cxx-abilist` test on my machine and it passes. I'd like to commit this again, @EricWF am I good to go? Repository: rL LLVM https://reviews.llvm.org/D48892 ___ cfe-commits mailing list c

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

2018-07-09 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: test/support/charconv_test_helpers.h:24 + +template +constexpr auto mclow.lists wrote: > If this is supposed to be a C++17 or later header (and I'm pretty sure it > is), you should add a `static_assert(TEST_STD_VER > 1

[PATCH] D48266: [Driver] Add -fno-digraphs

2018-07-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Driver/Options.td:1337-1340 +def fdigraphs : Flag<["-"], "fdigraphs">, Group, Flags<[CC1Option]>, + HelpText<"Enable alternative token representations '<:', ':>', '<%', '%>', '%:' (default)">; +def fno_digraphs : Flag<["-"

[PATCH] D49059: [MinGW] Skip adding default win32 api libraries if -lwindowsapp is specified

2018-07-09 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: test/Driver/mingw-windowsapp.c:5-6 +// CHECK_DEFAULT: "-lmsvcrt" "-ladvapi32" "-lshell32" "-luser32" "-lkernel32" "-lmingw32" +// CHECK_WINDOWSAPP: "-lwindowsapp" "-lmingw32" +// CHECK_WINDOWSAPP-SAME: "-lmsvcrt" "-lmingw32" ---

[PATCH] D49059: [MinGW] Skip adding default win32 api libraries if -lwindowsapp is specified

2018-07-09 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. This revision is now accepted and ready to land. LGTM, particularly given r314138. There are other umbrella libraries as well, e.g. OneCore and OneCoreUAP. Do you care about those as well or just WindowsApp? Comment at:

[PATCH] D48601: Added -fcrash-diagnostics-dir flag

2018-07-09 Thread Bob Haarman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336604: Added -fcrash-diagnostics-dir flag (authored by inglorion, committed by ). Changed prior to commit: https://reviews.llvm.org/D48601?vs=153773&id=154695#toc Repository: rL LLVM https://review

r336604 - Added -fcrash-diagnostics-dir flag

2018-07-09 Thread Bob Haarman via cfe-commits
Author: inglorion Date: Mon Jul 9 14:07:20 2018 New Revision: 336604 URL: http://llvm.org/viewvc/llvm-project?rev=336604&view=rev Log: Added -fcrash-diagnostics-dir flag Summary: New flag causes crash reports to be written in the specified directory rather than the temp directory. Patch by Chij

[PATCH] D49054: [MinGW] Treat any -lucrt* as replacing -lmsvcrt

2018-07-09 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D49054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D48506: Fix for Crash in nested name specifier decltype

2018-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Balaji, thanks for working on this! Comment at: lib/Sema/SemaCXXScopeSpec.cpp:849-850 QualType T = BuildDecltypeType(DS.getRepAsExpr(), DS.getTypeSpecTypeLoc()); + if (T.getTypePtrOrNull() == nullptr) + return true; if (!T->isDepe

[PATCH] D49100: Inline DeclarationNameInfo::getLocEnd into callers

2018-07-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: rsmith. Herald added a subscriber: cfe-commits. Note that CXXDependentScopeMemberExpr uses getEndLoc, not getLocEnd, unlike UnresolvedMemberExpr and UnresolvedLookupExpr (which are changed by this commit). Repository: rC Clang https:/

Re: r336219 - Fix crash in clang.

2018-07-09 Thread David Blaikie via cfe-commits
On Mon, Jul 9, 2018 at 1:52 PM Zachary Turner wrote: > makeArrayRef() isn't necessary, but when I was first looking at this I had > to stare at the code for a bit to see that there was an implicit conversion > happening. So I put the makeArrayRef() just for the benefit of the person > reading th

Re: r336219 - Fix crash in clang.

2018-07-09 Thread Zachary Turner via cfe-commits
makeArrayRef() isn't necessary, but when I was first looking at this I had to stare at the code for a bit to see that there was an implicit conversion happening. So I put the makeArrayRef() just for the benefit of the person reading the code. But no, it's not necessary. This did not fail on exis

[PATCH] D49099: Remove qualtype qualifier in coroutine error to prevent assert in debug

2018-07-09 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 created this revision. tks2103 added reviewers: modocache, GorNishanov. A forward-declared coroutine_traits should trip an error; we need a complete type. Unfortunately, in debug mode only, we trip an assert when attempting to provide the fully qualified type for the error message. If you

[PATCH] D48506: Fix for Crash in nested name specifier decltype

2018-07-09 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer added a comment. Herald added a subscriber: dexonsmith. Ping! Repository: rC Clang https://reviews.llvm.org/D48506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r336219 - Fix crash in clang.

2018-07-09 Thread David Blaikie via cfe-commits
Did this fail on an existing regression test, or is there a need for more test coverage? (guessing it failed on existing tests) Also, is the makeArrayRef necessary? Looks like if the original code compiled (implicitly converting from vector to ArrayRef) then the new code wouldn't need a makeArrayR

[PATCH] D48482: [Power9] [CLANG] Add __float128 support for trunc to double round to odd

2018-07-09 Thread Stefan Pintilie via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336596: [Power9] [CLANG] Add __float128 support for trunc to double round to odd (authored by stefanp, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.ll

r336596 - [Power9] [CLANG] Add __float128 support for trunc to double round to odd

2018-07-09 Thread Stefan Pintilie via cfe-commits
Author: stefanp Date: Mon Jul 9 13:09:52 2018 New Revision: 336596 URL: http://llvm.org/viewvc/llvm-project?rev=336596&view=rev Log: [Power9] [CLANG] Add __float128 support for trunc to double round to odd Add support for this builtin: double builtin_truncf128_round_to_odd(float128) Differentia

r336592 - [OPENMP] Do not mark local variables as declare target.

2018-07-09 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 9 12:58:08 2018 New Revision: 336592 URL: http://llvm.org/viewvc/llvm-project?rev=336592&view=rev Log: [OPENMP] Do not mark local variables as declare target. When the parsing of the functions happens inside of the declare target region, we may erroneously mark loca

r336591 - [libclang] NFC, simplify clang_Cursor_Evaluate

2018-07-09 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Jul 9 12:56:45 2018 New Revision: 336591 URL: http://llvm.org/viewvc/llvm-project?rev=336591&view=rev Log: [libclang] NFC, simplify clang_Cursor_Evaluate Take advantage of early returns as suggested by Duncan in https://reviews.llvm.org/D49051 Modified: cfe/trunk/

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

2018-07-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: libcxx/include/memory:1470 +decltype(_VSTD::declval<_Alloc>().construct(_VSTD::declval<_Pointer>(), +_VSTD::declval<_Args>())), +void Quuxplusone wrote:

[PATCH] D49051: [libclang] check that the cursor is declaration before trying to evaluate the cursor like a declaration

2018-07-09 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked an inline comment as done. Closed by commit rL336590: [libclang] evalute compound statement cursors before trying to evaluate (authored by arphaman, committed by ). Herald added a subscriber: llvm-commits. C

r336590 - [libclang] evalute compound statement cursors before trying to evaluate

2018-07-09 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Jul 9 12:41:28 2018 New Revision: 336590 URL: http://llvm.org/viewvc/llvm-project?rev=336590&view=rev Log: [libclang] evalute compound statement cursors before trying to evaluate the cursor like a declaration This change fixes a bug in libclang in which it tries to eva

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF commandeered this revision. EricWF edited reviewers, added: lebedev.ri; removed: EricWF. EricWF added a comment. Hijacking with permission. Repository: rL LLVM https://reviews.llvm.org/D45179 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D48786: [Preprocessor] Stop entering included files after hitting a fatal error.

2018-07-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D48786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-07-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 154678. vsapsai added a comment. - Allow allocator `construct` to return a value, not just have return type `void`. https://reviews.llvm.org/D48753 Files: libcxx/include/memory libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_ite

[PATCH] D46317: [clang-tidy] New check bugprone-map-subscript-operator-lookup

2018-07-09 Thread Kalle Huttunen via Phabricator via cfe-commits
khuttun abandoned this revision. khuttun added a comment. Abandoning this. The false positive rate would be too high for this checker. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46317 ___ cfe-commits mailing list cfe-commits@lis

r336584 - [Index] Ignore noop #undef's when handling macro occurrences.

2018-07-09 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Jul 9 12:02:41 2018 New Revision: 336584 URL: http://llvm.org/viewvc/llvm-project?rev=336584&view=rev Log: [Index] Ignore noop #undef's when handling macro occurrences. Modified: cfe/trunk/lib/Index/IndexingAction.cpp Modified: cfe/trunk/lib/Index/IndexingAction.cpp

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

2018-07-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336583: [Builtins][Attributes][X86] Tag all X86 builtins with their required vector… (authored by ctopper, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revie

[PATCH] D48989: -fdebug-prefix-map option for cc1as

2018-07-09 Thread Siddhartha Bagaria via Phabricator via cfe-commits
starsid updated this revision to Diff 154669. starsid marked an inline comment as done. starsid added a comment. Test improvements Repository: rC Clang https://reviews.llvm.org/D48989 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Clang.cpp test/Driver/debug-prefix-map.S

[clang-tools-extra] r336581 - [clangd] Make sure macro information exists before increasing usage count.

2018-07-09 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Jul 9 11:54:51 2018 New Revision: 336581 URL: http://llvm.org/viewvc/llvm-project?rev=336581&view=rev Log: [clangd] Make sure macro information exists before increasing usage count. Modified: clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp Modified: clang-t

[PATCH] D47548: [Power9] Add __float128 builtins for Round To Odd

2018-07-09 Thread Stefan Pintilie via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336579: [Power9] Add __float128 builtins for Round To Odd (authored by stefanp, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D47548 Files: in

r336579 - [Power9] Add __float128 builtins for Round To Odd

2018-07-09 Thread Stefan Pintilie via cfe-commits
Author: stefanp Date: Mon Jul 9 11:50:40 2018 New Revision: 336579 URL: http://llvm.org/viewvc/llvm-project?rev=336579&view=rev Log: [Power9] Add __float128 builtins for Round To Odd Add a number of builtins for __float128 Round To Odd. This is the Clang portion of the builtins work. Differenti

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

2018-07-09 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 154662. simark added a comment. - Change InMemoryNode::getName to InMemoryNode::getFileName, to reduce the risk of mis-using it. Make the Stat field protected, make the subclasses' toString access it directly. Repository: rC Clang https://reviews.llvm.or

[PATCH] D48685: [PCH+Modules] Load -fmodule-map-file content before including PCHs

2018-07-09 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D48685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D49051: [libclang] check that the cursor is declaration before trying to evaluate the cursor like a declaration

2018-07-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: tools/libclang/CIndex.cpp:3892-3922 CXEvalResult clang_Cursor_Evaluate(CXCursor C) { - const Decl *D = getCursorDecl(C); - if (D) { -const Expr *expr = nullptr; -if (auto *Var = dyn_

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-07-09 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Let's discuss alternatives first. https://reviews.llvm.org/D49074 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D44663: [libcxx] Update with R9 changes

2018-07-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. A few comments; more to come after the earlier patches land. Comment at: libcxx/include/experimental/simd:1429 +struct deduce<_Tp, _Np, __simd_abi<__kind, __old_size>...> { + using type = __simd_abi<__kind, _Np>; +}; Is this delibe

[PATCH] D49091: Warn about usage of __has_include/__has_include_next in macro expansions

2018-07-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added a reviewer: rsmith. Herald added a subscriber: cfe-commits. The characters after '__has_include(' have special lexing rules that can't possibly be applied when __has_include is generated by a macro. Instead of wrapping __has_include in another m

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-07-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Looks good; a bunch of minor things. Remember to target c++17. You need to indulge your OCD when writing the tests. Comment at: libcxx/include/__config:1329 +#if !defined(_LIBCPP_COMPILER_CLANG) && !defined(_LIBCPP_COMPILER_GCC) +#define _LIBCPP_H

r336567 - [OPENMP, NVPTX] Do not globalize local variables in parallel regions.

2018-07-09 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 9 10:43:58 2018 New Revision: 336567 URL: http://llvm.org/viewvc/llvm-project?rev=336567&view=rev Log: [OPENMP, NVPTX] Do not globalize local variables in parallel regions. In generic data-sharing mode we are allowed to not globalize local variables that escape thei

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-07-09 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @baloghadamsoftware @dkrupp @xazax.hun Interesting. What do you think about instead using Z3 cross-check functionality recently added, to solve this and all other similar problems instead? https://reviews.llvm.org/D49074

[PATCH] D48989: -fdebug-prefix-map option for cc1as

2018-07-09 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D48989#1153957, @starsid wrote: > In https://reviews.llvm.org/D48989#1153773, @compnerd wrote: > > > However, please add a test to ensure that the paths are mapped when > > invoking the assembler > > > I added the tests to check the mapping

[PATCH] D48981: Add caching when looking up coroutine_traits

2018-07-09 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 added a comment. ping @modocache @GorNishanov Repository: rC Clang https://reviews.llvm.org/D48981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-07-09 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 154631. simark added a comment. - Use FileSystem::getRealPath in FileManager::getFile Repository: rC Clang https://reviews.llvm.org/D48903 Files: lib/Basic/FileManager.cpp lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp u

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

2018-07-09 Thread Simon Marchi via Phabricator via cfe-commits
simark marked an inline comment as done. simark added a comment. In https://reviews.llvm.org/D48903#1155403, @ilya-biryukov wrote: > In https://reviews.llvm.org/D48903#1154846, @simark wrote: > > > With the `InMemoryFileSystem`, this now returns a non-real path. The > > result is that we fill `

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-07-09 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump! Thanks again for your time. https://reviews.llvm.org/D40988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49085: [Sema] Emit a diagnostic for an invalid dependent function template specialization

2018-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, rsmith. Herald added a subscriber: dexonsmith. Previously, clang marked a decl as invalid without emitting a diagnostic. This lead to an assert in CodeGen for the attached test case. rdar://41806724 Thanks for tak

[PATCH] D49028: [clangd] Support indexing MACROs.

2018-07-09 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE336553: [clangd] Support indexing MACROs. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D49028?vs=154559&id=154615#toc Repository: rCTE Clang Tools Extra h

[clang-tools-extra] r336553 - [clangd] Support indexing MACROs.

2018-07-09 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Jul 9 08:31:07 2018 New Revision: 336553 URL: http://llvm.org/viewvc/llvm-project?rev=336553&view=rev Log: [clangd] Support indexing MACROs. Summary: This is not enabled in the global-symbol-builder or dynamic index yet. Reviewers: sammccall Reviewed By: sammccall Sub

[PATCH] D49051: [libclang] check that the cursor is declaration before trying to evaluate the cursor like a declaration

2018-07-09 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. Comment at: tools/libclang/CIndex.cpp:3892-3922 CXEvalResult clang_Cursor_Evaluate(CXCursor C) { - const Decl *D = getCursorDecl(C); - if (D) { -const Ex

[PATCH] D47817: [sanitizer_common] Fix using libtirpc on Linux

2018-07-09 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. In https://reviews.llvm.org/D47817#1155788, @Lekensteyn wrote: > In https://reviews.llvm.org/D47817#1155717, @mgorny wrote: > > > > This would be the first user of pkg-config here. I am not sure if this > > > would be the best fix. Usually you cannot (easily) recompile li

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. HIP generates one fat binary for all devices after linking. However, for each compilation unit a ctor function is emitted which register the same fat binary. Measures need to be taken to make sure the fat binary is only registe

  1   2   >