[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=rev Log: Add error code handling to remove_all test As mentioned by EricWF in revision D41830 Modified:

[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

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

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=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

[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`

[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

[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

[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

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=rev Log: [Docs] Fix typo in toolchain documentation Modified: cfe/trunk/docs/Toolchain.rst Modified: cfe/trunk/docs/Toolchain.rst URL:

[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

[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] 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] 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

[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.

[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:

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=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] 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

[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

[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 = XL.getManager(); - return

[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 = XL.getManager(); - return

[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 = XL.getManager(); - return

[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

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

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,

[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

[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:

[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=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] 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

[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] 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

[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

[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

[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

[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

[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

[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] 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

[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

[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:

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=rev Log: [WebAssembly] Remove `-allow-undefined-file wasm.syms` from linker args See: https://github.com/WebAssembly/tool-conventions/issues/35 Differential Revision:

[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

[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

[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

r322318 - Make internal/private GVs implicitly dso_local.

2018-01-11 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Thu Jan 11 14:15:12 2018 New Revision: 322318 URL: http://llvm.org/viewvc/llvm-project?rev=322318=rev Log: Make internal/private GVs implicitly dso_local. While updating clang tests for having clang set dso_local I noticed that: - There are *a lot* of tests to update. -

r322316 - Handle scoped_lockable objects being returned by value in C++17.

2018-01-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jan 11 14:13:57 2018 New Revision: 322316 URL: http://llvm.org/viewvc/llvm-project?rev=322316=rev Log: Handle scoped_lockable objects being returned by value in C++17. In C++17, guaranteed copy elision means that there isn't necessarily a constructor call when a local

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith closed this revision. rsmith added a comment. Committed as r322316. Repository: rC Clang https://reviews.llvm.org/D41933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Delesley Hutchins via Phabricator via cfe-commits
delesley accepted this revision. delesley added a comment. LGTM. Thanks, Richard! Repository: rC Clang https://reviews.llvm.org/D41933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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 Eric Fiselier via Phabricator via cfe-commits
EricWF 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); This test is incorrect. `ec` isn't passed to the

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:20 + +AST_MATCHER(GotoStmt, isForwardJumping) { + lebedev.ri wrote: > It would be nice to have it in standard ASTMatchers, i believe it will be > useful for

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:20 + +AST_MATCHER(GotoStmt, isForwardJumping) { + JonasToth wrote: > lebedev.ri wrote: > > It would be nice to have it in standard ASTMatchers, i believe it will be >

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D41815#973265, @lebedev.ri wrote: > In https://reviews.llvm.org/D41815#973260, @JonasToth wrote: > > > - check that jumps will only be forward. AFAIK that is required in all > > sensefull usecases of goto, is it? > > > You could implement

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

2018-01-11 Thread Abderrazek Zaafrani via Phabricator via cfe-commits
az updated this revision to Diff 129513. az marked 3 inline comments as done. https://reviews.llvm.org/D41792 Files: clang/include/clang/Basic/BuiltinsNEON.def clang/include/clang/Basic/CMakeLists.txt clang/include/clang/Basic/arm_fp16.td clang/include/clang/Basic/arm_neon.td

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Do you have commit access or should someone else commit it for you? https://reviews.llvm.org/D41384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added inline comments. This revision is now accepted and ready to land. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:517 +if (const auto *Array = dyn_cast( +DeclRef->getDecl()->getType().getTypePtr())) { +

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread András Leitereg via Phabricator via cfe-commits
leanil marked 3 inline comments as done. leanil added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:526 + } + if (StrLenFound && ArraySize >= StrLen + 1) +return; george.karpenkov wrote: > Why not put this

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: tools/libclang/libclang.exports:365 +clang_PrintingPolicy_get +clang_PrintingPolicy_set +clang_PrintingPolicy_dispose clang_PrintingPolicy_setProperty and clang_PrintingPolicy_getProperty might be better names (I know

RE: D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2018-01-11 Thread Blower, Melanie via cfe-commits
> -Original Message- > From: Szabolcs Nagy via Phabricator [mailto:revi...@reviews.llvm.org] > Sent: Thursday, January 11, 2018 6:25 AM > To: Blower, Melanie ; Keane, Erich > ; sca...@apple.com; roger.ferreriba...@arm.com; >

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread András Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 129508. leanil added a comment. Nest condition checking. Add positive test. https://reviews.llvm.org/D41384 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analysis/security-syntax-checks.m Index:

RE: D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2018-01-11 Thread Blower, Melanie via cfe-commits
> -Original Message- > From: Szabolcs Nagy via Phabricator [mailto:revi...@reviews.llvm.org] > Sent: Thursday, January 11, 2018 6:13 AM > To: Blower, Melanie ; Keane, Erich > ; sca...@apple.com; roger.ferreriba...@arm.com; >

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

2018-01-11 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: aaron.ballman, alexfh, hokein, ilya-biryukov. juliehockett added a project: clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Adds a check to the Fuchsia module to warn if thread-local storage is used. See

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

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith 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);

[PATCH] D41546: [clang-tidy] Adding Fuchsia checker for statically constructed objects

2018-01-11 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE322310: [clang-tidy] Adding Fuchsia checker for statically constructed objects (authored by juliehockett, committed by ). Changed prior to commit: https://reviews.llvm.org/D41546?vs=129208=129505#toc

[clang-tools-extra] r322310 - [clang-tidy] Adding Fuchsia checker for statically constructed objects

2018-01-11 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Thu Jan 11 13:17:43 2018 New Revision: 322310 URL: http://llvm.org/viewvc/llvm-project?rev=322310=rev Log: [clang-tidy] Adding Fuchsia checker for statically constructed objects Adds a check to the Fuchsia module to warn if statically-stored objects are created, unless

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:60 + // To be an interface, all base classes must be interfaces as well. + for (const auto : Node->bases()) { +const auto *Ty = I.getType()->getAs(); rsmith

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, but you should wait for a bit to see if DeLesley has concerns. Comment at: lib/Analysis/ThreadSafety.cpp:1994 +static CXXConstructorDecl

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:60 + // To be an interface, all base classes must be interfaces as well. + for (const auto : Node->bases()) { +const auto *Ty = I.getType()->getAs(); aaron.ballman

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2018-01-11 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 129498. juliehockett marked 8 inline comments as done. juliehockett added a comment. 1. Updating check and tests to address virtual inheritance 2. Rebasing from trunk https://reviews.llvm.org/D40580 Files: clang-tidy/fuchsia/CMakeLists.txt

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Analysis/ThreadSafety.cpp:1994 +static CXXConstructorDecl *findConstructorForByValueReturn(CXXRecordDecl *RD) { + // Prefer a move constructor over a copy constructor. If there's more than aaron.ballman wrote: >

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 129496. Repository: rC Clang https://reviews.llvm.org/D41933 Files: lib/Analysis/ThreadSafety.cpp test/SemaCXX/warn-thread-safety-analysis.cpp Index: test/SemaCXX/warn-thread-safety-analysis.cpp

[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

Re: [PATCH] D41455: [ASTMatchers] Add isNoReturn() match narrower for FunctionDeclarations

2018-01-11 Thread David Blaikie via cfe-commits
I haven't as yet, no. Sorry - happy if someone else wants to have a go, or I'll take a closer look soon. - Dave On Thu, Jan 11, 2018 at 11:38 AM Roman Lebedev via Phabricator < revi...@reviews.llvm.org> wrote: > lebedev.ri added a comment. > > In https://reviews.llvm.org/D41455#963752,

[PATCH] D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2018-01-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > as this patch is committed clang is broken (cannot use glibc headers) This patch was supposed to *fix* compatibility with the glibc headers. If it doesn't, we should clearly revert it... but we need to figure out what we need to do to be compatible first. From

[PATCH] D41958: Create a deduction guide for basic_string

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added a reviewer: EricWF. First of the C++17 deduction guides (I think). Uses the new `__is_allocator` trait. The failing test is not quite right yet, but the success bits all work. https://reviews.llvm.org/D41958 Files: include/string

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:20 + +AST_MATCHER(GotoStmt, isForwardJumping) { + It would be nice to have it in standard ASTMatchers, i believe it will be useful for `else-after-return` check.

[PATCH] D41455: [ASTMatchers] Add isNoReturn() match narrower for FunctionDeclarations

2018-01-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D41455#963752, @aaron.ballman wrote: > Aside from a documentation nit, this LGTM. However, you should wait to commit > until after you can safely regenerate the AST matcher documentation. The > issue there is that dump_ast_matchers.py was

[libcxx] r322306 - Implement an _is_allocator type trait for use in deduction guides.

2018-01-11 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Jan 11 11:36:22 2018 New Revision: 322306 URL: http://llvm.org/viewvc/llvm-project?rev=322306=rev Log: Implement an _is_allocator type trait for use in deduction guides. Added: libcxx/trunk/test/libcxx/memory/

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:522 + ArraySize = Array->getSize().getLimitedValue(); + if (const auto *String = dyn_cast(Source)) { +StrLen = String->getLength(); Nesting this

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D41815#973260, @JonasToth wrote: > I enhanced the check to do more: > > - check that jumps will only be forward. AFAIK that is required in all > sensefull usecases of goto, is it? > - additionally check for gotos in nested loops. These

[PATCH] D41897: Fixing a crash in Sema.

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: SemaCXX/base-class-ambiguity-check.cpp:1 +// RUN: %clang_cc1 -fsyntax-only %s + aaron.ballman wrote: > This run line isn't testing anything. Since you're trying to ensure this > doesn't crash, I would put

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think this approach is a reasonable approximation, but @delesley has the final word. Comment at: lib/Analysis/ThreadSafety.cpp:1994 +static CXXConstructorDecl *findConstructorForByValueReturn(CXXRecordDecl *RD) { + // Prefer a move

[PATCH] D41546: [clang-tidy] Adding Fuchsia checker for statically constructed objects

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from a minor formatting nit that I missed, LGTM! Comment at: clang-tidy/fuchsia/StaticallyConstructedObjectsCheck.cpp:51 +const

[PATCH] D41655: [clang-tidy] New check bugprone-unused-return-value

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/bugprone-unused-return-value.cpp:210 + // test that the check is disabled inside GNU statement expressions + ({ std::async(increment, 42); }); + auto StmtExprRetval = ({ std::async(increment, 42); });

[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/NewDelete-path-notes.cpp:44 // CHECK-NEXT: -// CHECK-NEXT:line6 +// CHECK-NEXT:line7 // CHECK-NEXT:col3 a.sidorin wrote: > NoQ wrote: > > a.sidorin wrote: > > >

r322294 - [Driver][RISCV] Another Windows file separator fix for riscv32-toolchain.c test

2018-01-11 Thread Alex Bradbury via cfe-commits
Author: asb Date: Thu Jan 11 09:06:32 2018 New Revision: 322294 URL: http://llvm.org/viewvc/llvm-project?rev=322294=rev Log: [Driver][RISCV] Another Windows file separator fix for riscv32-toolchain.c test I've checking the failure log, this _should_ be the last one. Sorry for not spotting this

[libcxx] r322293 - 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 cfe-commits
Author: vaartis Date: Thu Jan 11 09:04:29 2018 New Revision: 322293 URL: http://llvm.org/viewvc/llvm-project?rev=322293=rev Log: Make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist Differential Revision: https://reviews.llvm.org/D41830

r322286 - [Driver][RISCV] Fix r322276 for Windows (path separator issue)

2018-01-11 Thread Alex Bradbury via cfe-commits
Author: asb Date: Thu Jan 11 07:38:01 2018 New Revision: 322286 URL: http://llvm.org/viewvc/llvm-project?rev=322286=rev Log: [Driver][RISCV] Fix r322276 for Windows (path separator issue) We were seeing test failures of riscv32-toolchain.c on windows due to the \ path separator being used for

r322277 - [Driver][RISCV] Fix r322276 by adding missing dummy crtbegin.o files to test input

2018-01-11 Thread Alex Bradbury via cfe-commits
Author: asb Date: Thu Jan 11 05:51:06 2018 New Revision: 322277 URL: http://llvm.org/viewvc/llvm-project?rev=322277=rev Log: [Driver][RISCV] Fix r322276 by adding missing dummy crtbegin.o files to test input The dummy crtbegin.o files were left out in r322276 (as they were ignored by svn add

r322276 - [RISCV] Add the RISCV target and compiler driver

2018-01-11 Thread Alex Bradbury via cfe-commits
Author: asb Date: Thu Jan 11 05:36:56 2018 New Revision: 322276 URL: http://llvm.org/viewvc/llvm-project?rev=322276=rev Log: [RISCV] Add the RISCV target and compiler driver As RV64 codegen has not yet been upstreamed into LLVM, we focus on RV32 driver support (RV64 to follow). Differential

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

2018-01-11 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. I've just had a painful time landing https://reviews.llvm.org/D39963 due to failures on the Windows buildbots. I think you'll have problems on Windows with the tests in this patch, as Windows surely won't default to /usr/bin/as. Sadly I don't have access to a windows Clang

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-11 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. > Should we go with current patch? You'll need a bunch of `UNSUPPORTED: has-no-random-device` or something like it, but other than that, I'm happy with the patch as-is. Repository: rCXX libc++ https://reviews.llvm.org/D41316

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly

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

2018-01-11 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 129476. apazos added a comment. Herald added a subscriber: niosHD. Rebased. https://reviews.llvm.org/D41271 Files: lib/Driver/ToolChains/Gnu.cpp test/Driver/riscv-gnutools.c Index: test/Driver/riscv-gnutools.c

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-11 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz added a comment. any suggestions? Repository: rCXX libc++ https://reviews.llvm.org/D41316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly

[PATCH] D41952: Clang test changes for 'no-overflow' flag for sdiv\udiv instructions

2018-01-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: magabari, zvi, craig.topper, DavidKreitzer, hsaito, nlopes, reames, MatzeB, eli.friedman, rengolin, hfinkel. Herald added subscribers: kbarton, nemanjai. See: https://reviews.llvm.org/D41944 These are the Clang CodeGen test changes

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread András Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 129465. leanil added a comment. Change result types to match the query return types. https://reviews.llvm.org/D41384 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analysis/security-syntax-checks.m Index:

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly

[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

2018-01-11 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: test/Analysis/NewDelete-path-notes.cpp:44 // CHECK-NEXT: -// CHECK-NEXT:line6 +// CHECK-NEXT:line7 // CHECK-NEXT:col3 NoQ wrote: > a.sidorin wrote: > > Not even a minor

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly

  1   2   >