[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 129525. vsapsai added a comment. - Remove curly braces for single-statement ifs. https://reviews.llvm.org/D40677 Files: libcxx/include/istream libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp l

[PATCH] D41792: [AArch64] Add ARMv8.2-A FP16 scalar intrinsics

2018-01-11 Thread Abderrazek Zaafrani via Phabricator via cfe-commits
az marked 6 inline comments as done. az added inline comments. Comment at: clang/include/clang/Basic/arm_fp16.td:58 +class IInst : Inst {} + +// ARMv8.2-A FP16 intrinsics. SjoerdMeijer wrote: > az wrote: > > SjoerdMeijer wrote: > > > There's a little bit of dupli

[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked an inline comment as done. vsapsai added a comment. Thanks for the review. Comment at: libcxx/include/istream:970 } +if (__n > 0) +{ mclow.lists wrote: > I'm not a big fan of "putting braces around single statement blocks

r322321 - [WebAssembly] Remove `-allow-undefined-file wasm.syms` from linker args

2018-01-11 Thread Sam Clegg via cfe-commits
Author: sbc Date: Thu Jan 11 14:33:50 2018 New Revision: 322321 URL: http://llvm.org/viewvc/llvm-project?rev=322321&view=rev Log: [WebAssembly] Remove `-allow-undefined-file wasm.syms` from linker args See: https://github.com/WebAssembly/tool-conventions/issues/35 Differential Revision: https://

[PATCH] D41966: [WebAssembly] Add -lc++-abi when linking C++ programs

2018-01-11 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: cfe-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb. Repository: rC Clang https://reviews.llvm.org/D41966 Files: lib/Driver/ToolChains/WebAssembly.cpp lib/Driver/ToolChains/WebAssembly.h Index: lib/Driver/ToolChains/WebAs

[PATCH] D41746: Make std::get_temporary_buffer respect overaligned types when possible

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. This LGTM minus nits. Is there a LWG issue or paper that specifies this change? or is it just a general bug fix? Comment at: include/memory:2007 +#if !defined(_LIBCPP_HAS_N

[PATCH] D41923: [WebAssembly] Remove `-allow-undefined-file wasm.syms` from linker args

2018-01-11 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322321: [WebAssembly] Remove `-allow-undefined-file wasm.syms` from linker args (authored by sbc, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-11 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. Nice. I happened to just upload a similar (but orthogonal) patch: https://reviews.llvm.org/D41966 Repository: rC Clang https://reviews.llvm.org/D41937 _

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2012-2015 +// Skip escaped characters. Escaped newlines will already be processed by +// getAndAdvanceChar. +if (C == '\\') + C = getAndAdvanceChar(CurPtr, Result); rsmith wrote:

[PATCH] D41966: [WebAssembly] Add -lc++-abi when linking C++ programs

2018-01-11 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Cool, let's go with https://reviews.llvm.org/D41937, it has a proper diagnostic, and a test! Repository: rC Clang https://reviews.llvm.org/D41966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-11 Thread Derek Schuff via Phabricator via cfe-commits
dschuff accepted this revision. dschuff added a comment. LGTM, but does it need to be rebased after the `-allow-undefined-file` change? Repository: rC Clang https://reviews.llvm.org/D41937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-11 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: lib/Driver/ToolChains/WebAssembly.cpp:151 + case ToolChain::CST_Libcxx: +CmdArgs.push_back("-lc++"); +break; Can you add -lc++abi too? Then I can drop D41966 Repository: rC Clang https://reviews.llvm.org/D41

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-11 Thread Patrick Cheng via Phabricator via cfe-commits
patcheng added inline comments. Comment at: lib/Driver/ToolChains/WebAssembly.cpp:151 + case ToolChain::CST_Libcxx: +CmdArgs.push_back("-lc++"); +break; sbc100 wrote: > Can you add -lc++abi too? Then I can drop D41966 Sure, but I am not in front of a com

[PATCH] D41968: [libunwind][MIPS] Support MIPS floating-point registers for hard-float ABIs.

2018-01-11 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb created this revision. bsdjhb added a reviewer: sdardis. Herald added a subscriber: arichardson. For newabi this is fairly simple as we just save/restore the 32 floating-point registers as doubles. For O32 MIPS provides a variety of floating-point ABIs. For O32 MIPS with 64-bit floating-p

[PATCH] D41968: [libunwind][MIPS] Support MIPS floating-point registers for hard-float ABIs.

2018-01-11 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added inline comments. Comment at: src/Registers.hpp:2659 + uint32_t _padding; + double _floats[32]; +#endif I chose to always use double here to avoid having different context sizes for the 32-bit vs 64-bit FPR cases. https://reviews.llvm.org/D41968

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Please also document this trait in docs/LanguageExtensions.rst. Comment at: include/clang/Basic/TypeTraits.h:91 +/// \brief Names for the array type traits. +enum ArrayTypeTr

[libcxx] r322326 - [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-11 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Thu Jan 11 15:23:49 2018 New Revision: 322326 URL: http://llvm.org/viewvc/llvm-project?rev=322326&view=rev Log: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error. It covers the cases when the sentry object returns false and when an exception was

[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322326: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error. (authored by vsapsai, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://re

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 3 inline comments as done. EricWF added a comment. @rsmith The trait is already documented in `LanguageExtensions.rst`, so I'll assumed you missed that and are not trying to suggest more documentation is needed. Comment at: include/clang/Basic/TypeTraits.h:91 +/

Re: r321395 - [ODRHash] Support ODR violation detection in functions.

2018-01-11 Thread Eric Fiselier via cfe-commits
I'm hitting the same issue as well. Please let me know if there is anything I can do to get this fixed quickly. /Eric On Wed, Jan 3, 2018 at 5:20 PM, Richard Trieu via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Vedant, > > I'm looking into it. > > > On Wed, Jan 3, 2018 at 11:12 AM, Veda

Re: r321855 - Reapply r321781: [Modules] Allow modules specified by -fmodule-map-file to shadow implicitly found ones

2018-01-11 Thread Eric Fiselier via cfe-commits
Thanks for the correction Richard. /Eric On Tue, Jan 9, 2018 at 8:03 PM, Richard Smith wrote: > On 9 January 2018 at 18:46, Bruno Cardoso Lopes via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Hi Eric, >> >> On Mon, Jan 8, 2018 at 9:31 PM, Eric Fiselier wrote: >> > I haven't done a

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129544. EricWF marked an inline comment as done. EricWF added a comment. Address inline comments. https://reviews.llvm.org/D29930 Files: docs/LanguageExtensions.rst include/clang/Basic/TokenKinds.def include/clang/Basic/TypeTraits.h lib/Sema/SemaExpr

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-01-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:418-423 SourceLocation XDL = XD->getLocation(); SourceLocation YDL = YD->getLocation(); if (XDL != YDL) { const SourceManager &SM = XL.getManager(); - return SM.isBe

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-01-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:418-423 SourceLocation XDL = XD->getLocation(); SourceLocation YDL = YD->getLocation(); if (XDL != YDL) { const SourceManager &SM = XL.getManager(); - return SM.isBe

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:418-423 SourceLocation XDL = XD->getLocation(); SourceLocation YDL = YD->getLocation(); if (XDL != YDL) { const SourceManager &SM = XL.getManager(); - return SM.isBeforeIn

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-01-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 129509. xazax.hun marked 5 inline comments as done. xazax.hun added a comment. - Fixed review comments https://reviews.llvm.org/D30691 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngin

[PATCH] D41958: Create a deduction guide for basic_string

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM other than inline comments. Comment at: include/string:1491 +#if _LIBCPP_STD_VER > 14 +templatehttps://reviews.llvm.org/D41958 _

r322334 - Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2018-01-11 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Jan 11 16:09:37 2018 New Revision: 322334 URL: http://llvm.org/viewvc/llvm-project?rev=322334&view=rev Log: Add `__reference_binds_to_temporary` trait for checking safe reference initialization. Summary: The STL types `std::pair` and `std::tuple` can both store reference

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322334: Add `__reference_binds_to_temporary` trait for checking safe reference… (authored by EricWF, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llv

[PATCH] D41963: [clang-tidy] Adding Fuchsia checker for thread local storage.

2018-01-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/ThreadLocalCheck.cpp:22 + // Using thread-local storage is disallowed. +Finder->addMatcher(varDecl(hasThreadStorageDuration()).bind("decl"), this); +} Please run Clang-format over file. Thi

[PATCH] D40560: [analyzer] Get construction into `operator new` running in simple cases.

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 129552. NoQ added a comment. Add a stronger assertion: when ending an inlined call, assert that no stale allocator values remain. https://reviews.llvm.org/D40560 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h lib/StaticAnalyzer/Core/Ex

[PATCH] D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization.

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D29930#974039, @EricWF wrote: > @rsmith The trait is already documented in `LanguageExtensions.rst`, so I'll > assumed you missed that and are not trying to suggest more documentation is > needed. Yes, sorry, not sure how I missed that! :)

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

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Is this behavior specified somewhere? Or are we simply adding an extension to Clang? If so I would really prefer to add my `co_promise` solution (but I need to write a paper in favor of it first). Repository: rC Clang https://reviews.llvm.org/D41820 __

[PATCH] D41271: [RISCV] Propagate -mabi and -march values to GNU assembler.

2018-01-11 Thread Ana Pazos via Phabricator via cfe-commits
apazos added a comment. thanks Alex, I will test on windows before pushing. https://reviews.llvm.org/D41271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r322347 - [Docs] Fix typo in toolchain documentation

2018-01-11 Thread Craig Topper via cfe-commits
Author: ctopper Date: Thu Jan 11 18:57:02 2018 New Revision: 322347 URL: http://llvm.org/viewvc/llvm-project?rev=322347&view=rev Log: [Docs] Fix typo in toolchain documentation Modified: cfe/trunk/docs/Toolchain.rst Modified: cfe/trunk/docs/Toolchain.rst URL: http://llvm.org/viewvc/llvm-pro

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-11 Thread Patrick Cheng via Phabricator via cfe-commits
patcheng updated this revision to Diff 129572. patcheng edited the summary of this revision. patcheng added a comment. Added -lc++abi per @sbc100 's suggestion https://reviews.llvm.org/D41937 Files: lib/Driver/ToolChains/WebAssembly.cpp lib/Driver/ToolChains/WebAssembly.h test/Driver/wasm

[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

2018-01-11 Thread Timothy VanSlyke via Phabricator via cfe-commits
tvanslyke created this revision. tvanslyke added a reviewer: howard.hinnant. Herald added a subscriber: cfe-commits. shrink_to_fit() ends up doing a lot work to get information that we already know since we just called clear(). This change seems concise enough to be worth the couple extra lines

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

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, mclow.lists. See https://bugs.llvm.org/show_bug.cgi?id=20855 Libc++ goes out of it's way to diagnose `std::tuple` constructions which are UB due to lifetime bugs caused by reference creation. For example: // The 'const std::string&

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Ekaterina Vaartis via Phabricator via cfe-commits
TyanNN added inline comments. Comment at: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp:86 + +TEST_CHECK(fs::remove_all(p) == 0); +TEST_CHECK(!ec); EricWF wrote: > This test is incorrect. `ec` isn'

r322350 - [ODRHash] Don't hash friend functions.

2018-01-11 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jan 11 20:42:27 2018 New Revision: 322350 URL: http://llvm.org/viewvc/llvm-project?rev=322350&view=rev Log: [ODRHash] Don't hash friend functions. In certain combinations of templated classes and friend functions, the body of friend functions does not get propagated along

Re: r321395 - [ODRHash] Support ODR violation detection in functions.

2018-01-11 Thread Richard Trieu via cfe-commits
Hi Vedant and Eric, Please retry after r322350. I suspect an interaction between templates and friend functions is causing this issue. This revision disables hashing for friend functions for now. Richard On Thu, Jan 11, 2018 at 3:34 PM, Eric Fiselier wrote: > I'm hitting the same issue as we

[PATCH] D41980: Add tests for llvm-bcanalyzer stream types

2018-01-11 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: pcc, aprantl, mehdi_amini. Herald added a subscriber: a.sidorin. Add tests for the improved stream type detection added to `llvm-bcanalyzer` in https://reviews.llvm.org/D41979. Test Plan: `check-clang` Repository: rC Clang https://r

[libcxx] r322351 - Add error code handling to remove_all test

2018-01-11 Thread Ekaterina Vaartis via cfe-commits
Author: vaartis Date: Thu Jan 11 21:02:06 2018 New Revision: 322351 URL: http://llvm.org/viewvc/llvm-project?rev=322351&view=rev Log: Add error code handling to remove_all test As mentioned by EricWF in revision D41830 Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.

<    1   2