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

2018-01-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:21 +AST_MATCHER(GotoStmt, isForwardJumping) { + return Node.getLocStart() < Node.getLabel()->getLocStart(); +} Hm, on a second thought, i think this will have

r322431 - DR126: partially implement the const-correct rules for exception handler matching.

2018-01-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 12 21:05:45 2018 New Revision: 322431 URL: http://llvm.org/viewvc/llvm-project?rev=322431=rev Log: DR126: partially implement the const-correct rules for exception handler matching. While here, fix up the myriad other ways in which Sema's two "can this handler catch

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

2018-01-12 Thread Eric Fiselier via cfe-commits
Seems to be working now. Thank you! On Thu, Jan 11, 2018 at 9:46 PM, Richard Trieu wrote: > 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

r322396 - Refactor handling of signext/zeroext in ABIArgInfo

2018-01-12 Thread Alex Bradbury via cfe-commits
Author: asb Date: Fri Jan 12 12:08:16 2018 New Revision: 322396 URL: http://llvm.org/viewvc/llvm-project?rev=322396=rev Log: Refactor handling of signext/zeroext in ABIArgInfo As @rjmccall suggested in D40023, we can get rid of ABIInfo::shouldSignExtUnsignedType (used to handle cases like the

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129746. EricWF added a comment. - Introduce `SourceLocExprScope.h` to help reduce code duplication. - Merge with upstream. https://reviews.llvm.org/D37035 Files: docs/LanguageExtensions.rst include/clang/AST/Expr.h include/clang/AST/ExprCXX.h

[PATCH] D42014: Disable BinPackArguments and BinPackParameters in Google Objective-C style ⚙️

2018-01-12 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. I am still working to verify that this change represents actual consensus. I will hold off on adding reviewers until then. https://reviews.llvm.org/D42014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129744. EricWF added a comment. - Address @rsmith's comments by removing the fallback implementation of the diagnostics. https://reviews.llvm.org/D41977 Files: include/tuple test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp

[PATCH] D41816: [analyzer] Model and check unrepresentable left shifts

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. The diagnostic text looks to me, but I do have a comment about the nested 'if' inline. Comment at: lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:150 +SB.getKnownValue(state, C.getSVal(B->getRHS())); +if ((unsigned)

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

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D41977#975403, @rsmith wrote: > This will still diagnose valid and reasonable programs, such as: > > struct ConvertToRef { operator int&(); }; > std::tuple t = {ConvertToRef()}; > > > ... on compilers that don't provide the trait. You

[PATCH] D42015: [analyzer] NFC: RetainCount: Don't dump() regions to the user.

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM. Thanks for fixing this. Repository: rC Clang https://reviews.llvm.org/D42015 ___ cfe-commits mailing list

[PATCH] D41881: [analyzer] Flag bcmp, bcopy and bzero as obsolete

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Thanks for adding these! This looks good to me. Do you have commit access, or do you need someone to commit this? Repository: rC Clang https://reviews.llvm.org/D41881

[PATCH] D40218: [Clang] Add __builtin_launder

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129742. EricWF added a comment. - Improve diagnostic handling. https://reviews.llvm.org/D40218 Files: include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.td lib/AST/ExprConstant.cpp lib/CodeGen/CGBuiltin.cpp

[PATCH] D40218: [Clang] Add __builtin_launder

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 129740. EricWF marked an inline comment as done. EricWF added a comment. - Address inline comments about missing diagnostics for void pointers and function pointers. - Address inline comments about only enabling when `-fstrict-vtable-pointers` is specified,

[PATCH] D40218: [Clang] Add __builtin_launder

2018-01-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 2 inline comments as done. EricWF added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1674 +Value *Ptr = EmitScalarExpr(E->getArg(0)); +Ptr = Builder.CreateInvariantGroupBarrier(Ptr); +return RValue::get(Ptr); rsmith wrote: >

[PATCH] D41797: [analyzer] Suppress escape of this-pointer during construction.

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D41797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41934: [analyzer] Fix CXXNewExpr callback order.

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Looks great. It is nice to have this fixed and cleaned up! Comment at: lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp:95 + llvm::errs() << "PreCall"; +

[PATCH] D41266: [analyzer] With c++-allocator-inlining, fix memory space for operator new pointers.

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. LGTM as well. https://reviews.llvm.org/D41266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42019: [Driver] Set default sysroot for Fuchsia if none is specified

2018-01-12 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: lib/Driver/ToolChains/Fuchsia.cpp:152 + llvm::sys::path::append(P, normalizeTriple(Triple)); + return P.str(); +} The GCC behavior (if --with-sysroot is given to configure) is tooldir/sys-root, not tooldir itself.

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This looks good to me, as well. https://reviews.llvm.org/D41250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM with the TODO and the test case I requested inline. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:487 +if (const MemRegion *MR = I.second.getAsRegion())

r322427 - Remove unused addIfPresent function.

2018-01-12 Thread Eric Christopher via cfe-commits
Author: echristo Date: Fri Jan 12 16:46:47 2018 New Revision: 322427 URL: http://llvm.org/viewvc/llvm-project?rev=322427=rev Log: Remove unused addIfPresent function. Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp URL:

[PATCH] D39963: [RISCV] Add initial RISC-V target and driver support

2018-01-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Herald added a subscriber: niosHD. This has broken our toolchain build, the log is here: https://logs.chromium.org/v/?s=fuchsia%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8957686819564148864%2F%2B%2Fsteps%2Fcheck_clang%2F0%2Fstdout. The failure is:

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

2018-01-12 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. In https://reviews.llvm.org/D41820#974116, @EricWF wrote: > 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).

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

2018-01-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This will still diagnose valid and reasonable programs, such as: struct ConvertToRef { operator int&(); }; std::tuple t = {ConvertToRef()}; ... on compilers that don't provide the trait. You could maybe try to work around that by checking to see if the type

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

2018-01-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/tuple:185-186 +// Allow "int&&" to bind to 'int const&' +|| (is_rvalue_reference<_Tp>::value && is_const<_RawHp>::value && +is_same<_RawHp, const _RawTp>::value) >; It would

[PATCH] D42017: Link sanitized programs on NetBSD with -lkvm

2018-01-12 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski created this revision. krytarowski added reviewers: joerg, vitalybuka, dvyukov. krytarowski added a project: Sanitizers. Herald added a subscriber: llvm-commits. kvm - kernel memory interface This set of functions is defined in the libkvm library. The kvm(3) functions are used in

[PATCH] D42015: [analyzer] NFC: RetainCount: Don't dump() regions to the user.

2018-01-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, george.karpenkov. Herald added subscribers: cfe-commits, a.sidorin, szepet, xazax.hun. `RetainCountChecker` appears to be using `MemRegion::getString()` to present the region to the user, which is equivalent to `MemRegion->dump()` and as

[PATCH] D42014: Disable BinPackArguments and BinPackParameters in Google Objective-C style ⚙️

2018-01-12 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 129718. stephanemoore added a comment. Sorted the Objective-C configuration for consistency. https://reviews.llvm.org/D42014 Files: lib/Format/Format.cpp Index: lib/Format/Format.cpp

[PATCH] D42014: Disable BinPackArguments and BinPackParameters in Google Objective-C style ⚙️

2018-01-12 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added subscribers: cfe-commits, klimek. Defaulting BinPackArguments and BinPackParameters to false is a better representation of Google Objective-C style. Repository: rC Clang https://reviews.llvm.org/D42014 Files: lib/Format/Format.cpp

r322420 - Try to suppress Windows testing again.

2018-01-12 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Jan 12 15:13:33 2018 New Revision: 322420 URL: http://llvm.org/viewvc/llvm-project?rev=322420=rev Log: Try to suppress Windows testing again. Modified: cfe/trunk/test/Modules/odr_hash-Friend.cpp Modified: cfe/trunk/test/Modules/odr_hash-Friend.cpp URL:

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

2018-01-12 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 129714. lichray added a comment. src/support/itoa/itoa.cpp in previous diffs were copyrighted by Tencent, now LLVM, contributed by the same author. Repository: rCXX libc++ https://reviews.llvm.org/D41458 Files: .gitignore include/charconv

r322417 - Fix test on Windows that was added in r322382.

2018-01-12 Thread Douglas Yung via cfe-commits
Author: dyung Date: Fri Jan 12 14:32:01 2018 New Revision: 322417 URL: http://llvm.org/viewvc/llvm-project?rev=322417=rev Log: Fix test on Windows that was added in r322382. The test was using "%clang++" which on Windows became "clang.exe++". Use %clangxx instead. Reviewed by Paul Robinson

r322414 - When rebuilding an InitListExpr, don't give it a type.

2018-01-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 12 14:21:33 2018 New Revision: 322414 URL: http://llvm.org/viewvc/llvm-project?rev=322414=rev Log: When rebuilding an InitListExpr, don't give it a type. InitListExprs without types (well, with type 'void') represent not-yet-analyzed initializer lists; InitListExpr

[PATCH] D42011: [DWARFv5] Enable MD5 checksums

2018-01-12 Thread Paul Robinson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322413: [DWARFv5] Have -gdwarf-5 generate MD5 checksums (authored by probinson, committed by ). Changed prior to commit: https://reviews.llvm.org/D42011?vs=129703=129708#toc Repository: rC Clang

[PATCH] D42011: [DWARFv5] Enable MD5 checksums

2018-01-12 Thread Paul Robinson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322413: [DWARFv5] Have -gdwarf-5 generate MD5 checksums (authored by probinson, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r322413 - [DWARFv5] Have -gdwarf-5 generate MD5 checksums

2018-01-12 Thread Paul Robinson via cfe-commits
Author: probinson Date: Fri Jan 12 14:19:03 2018 New Revision: 322413 URL: http://llvm.org/viewvc/llvm-project?rev=322413=rev Log: [DWARFv5] Have -gdwarf-5 generate MD5 checksums Differential Revision: https://reviews.llvm.org/D42011 Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D41935: [analyzer] NFC: Mark default constructors for ProgramPoints.

2018-01-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D41935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-01-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322410: [analyzer] Dont flag strcpy of string literals into sufficiently large buffers. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r322410 - [analyzer] Don't flag strcpy of string literals into sufficiently large buffers.

2018-01-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Jan 12 14:12:11 2018 New Revision: 322410 URL: http://llvm.org/viewvc/llvm-project?rev=322410=rev Log: [analyzer] Don't flag strcpy of string literals into sufficiently large buffers. In the security package, we have a simple syntactic check that warns about strcpy()

[PATCH] D42011: [DWARFv5] Enable MD5 checksums

2018-01-12 Thread Paul Robinson via Phabricator via cfe-commits
probinson created this revision. probinson added reviewers: dblaikie, aprantl. probinson added a project: debug-info. Herald added subscribers: cfe-commits, JDevlieghere. Under `-gdwarf-5` generate MD5 checksums of source files to emit to the DWARF v5 line table. This consumes 16 bytes per

[PATCH] D40569: Use default IR alignment for cleanup.dest.slot.

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. r322406 Repository: rC Clang https://reviews.llvm.org/D40569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r322406 - Allocate and access NormalCleanupDest with the natural alignment of i32.

2018-01-12 Thread John McCall via cfe-commits
Author: rjmccall Date: Fri Jan 12 14:07:01 2018 New Revision: 322406 URL: http://llvm.org/viewvc/llvm-project?rev=322406=rev Log: Allocate and access NormalCleanupDest with the natural alignment of i32. This alignment can be less than 4 on certain embedded targets, which may not even be able to

r322405 - Disable test for Windows to fix Windows buildbots.

2018-01-12 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Jan 12 13:49:20 2018 New Revision: 322405 URL: http://llvm.org/viewvc/llvm-project?rev=322405=rev Log: Disable test for Windows to fix Windows buildbots. Modified: cfe/trunk/test/Modules/odr_hash-Friend.cpp Modified: cfe/trunk/test/Modules/odr_hash-Friend.cpp URL:

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

2018-01-12 Thread Chris Kennelly via Phabricator via cfe-commits
ckennelly marked 2 inline comments as done. ckennelly added a comment. In https://reviews.llvm.org/D41746#973941, @EricWF wrote: > This LGTM minus nits. > > Is there a LWG issue or paper that specifies this change? or is it just a > general bug fix? This is just a general bug fix.

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

2018-01-12 Thread Eric Niebler via Phabricator via cfe-commits
eric_niebler added a comment. > Is this behavior specified somewhere? Or are we simply adding an extension to > Clang? It is not specified anywhere //yet// but Gor has promised a paper for Jacksonville. > If so I would really prefer to add my co_promise solution (but I need to > write a

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

2018-01-12 Thread Chris Kennelly via Phabricator via cfe-commits
ckennelly updated this revision to Diff 129698. Repository: rCXX libc++ https://reviews.llvm.org/D41746 Files: include/memory test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp Index: test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp

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

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/bugprone/UnusedReturnValueCheck.cpp:47 +"^::std::launder$|" +"^::std::unique_ptr<.*>::release$|" +"^::std::.*::allocate$|"

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. LGTM Not sure if anyone's mentioned it yet, but there's a C ABI testing tool in clang/utils/ABITest/ which you'll probably want to try at some point. Comment at: lib/CodeGen/TargetInfo.cpp:8913 + } + return

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

2018-01-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added reviewers: EricWF, mclow.lists, hiraditya. vsk added a comment. Adding some folks who may be interested. https://reviews.llvm.org/D41976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks. LGTM, but you should wait for Eli's sign-off, too. https://reviews.llvm.org/D40023 ___ cfe-commits mailing list

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. I just checked both my qemu copy and on my mips64 machine and it seems to be a a copy / paste error. Reposting here directly from my machines: MIPS64: diff --git a/test/libunwind/test/config.py b/test/libunwind/test/config.py index 2a0c828..a8952c3 100644 ---

[PATCH] D40854: [clang-tidy] WIP implement cppcoreguidelines check for mixed integer arithmetic

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129693. JonasToth added a comment. rebase to 7.0.0 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40854 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

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

2018-01-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-avoid-goto.rst:6-7 + +The usage of ``goto`` has been discouraged for a long time and is diagnosed +with this check. + JonasToth wrote: > aaron.ballman wrote: > > This

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129691. JonasToth added a comment. - minor issues fixed Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129690. JonasToth marked 3 inline comments as done. JonasToth added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. In https://reviews.llvm.org/D39074#974913, @sdardis wrote: > This was libunwind's test suite: > > Compiled test failed unexpectedly! > > Testing Time: 0.53s > > Failing Tests (1): > libunwind ::

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

2018-01-12 Thread Timothy VanSlyke via Phabricator via cfe-commits
tvanslyke updated this revision to Diff 129685. tvanslyke added a comment. I went ahead and just pulled it out to a small inline member function and added it to __copy_assign_alloc(). Removed some other redundancies. https://reviews.llvm.org/D41976 Files: string Index: string

[PATCH] D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129686. JonasToth added a comment. - get up to date to 7.0 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40737 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp

[PATCH] D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @sbenza and/or @klimek did you have time to address the stackoverflow caused from the ASTMatchers? I forgot to add the link to the original break:

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

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129684. JonasToth added a comment. - simplified the code and merged diagnostics Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41815 Files: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp clang-tidy/cppcoreguidelines/AvoidGotoCheck.h

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
asb updated this revision to Diff 129683. asb marked 8 inline comments as done. asb added a comment. Rebase after ABIArgInfo signext/zeroext refactoring https://reviews.llvm.org/D41999 / https://reviews.llvm.org/rL322396. We no longer need to modify CGCall.cpp for unsigned 32-bit return values

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

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 5 inline comments as done. JonasToth added inline comments. Comment at: docs/ReleaseNotes.rst:63 + + The usage of ``goto`` has been discouraged for a long time and is diagnosed + with this check. Eugene.Zelenko wrote: > I think will be good

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

2018-01-12 Thread Szabolcs Nagy via Phabricator via cfe-commits
nsz added a comment. In https://reviews.llvm.org/D40673#973638, @efriedma wrote: > > 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

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:1148 +DK_objc_weak_lifetime, +DK_c_struct_strong_field }; ahatanak wrote: > rjmccall wrote: > > I don't think you want to refer to the fact that the C struct specifically > >

[PATCH] D41999: Refactor handling of signext/zeroext in ABIArgInfo

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322396: Refactor handling of signext/zeroext in ABIArgInfo (authored by asb, committed by ). Repository: rC Clang https://reviews.llvm.org/D41999 Files: include/clang/CodeGen/CGFunctionInfo.h

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

2018-01-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:517 +if (const auto *Array = dyn_cast( +DeclRef->getDecl()->getType().getTypePtr())) { + unsigned long long ArraySize = Array->getSize().getLimitedValue();

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

2018-01-12 Thread András Leitereg via Phabricator via cfe-commits
leanil marked 2 inline comments as done. leanil added a comment. In https://reviews.llvm.org/D41384#973851, @NoQ wrote: > Do you have commit access or should someone else commit it for you? I don't have, please commit it. Comment at:

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

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129677. JonasToth marked 8 inline comments as done. JonasToth added a comment. - address review comments - add better documentation with code examples Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41815 Files:

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

2018-01-12 Thread András Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 129676. leanil marked an inline comment as done. leanil added a comment. Measure array size in bytes instead of elements. https://reviews.llvm.org/D41384 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. Um, I now appear to be getting different results for running under QEMU doing it the proper way. I was previously rebuilding the failing test by hand and running under qemu. I don't believe I changed anything important, I'll have to take a longer look. If you define

[PATCH] D42005: [docs] Use monospace for PCH option flags

2018-01-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: sepavloff, aaron.ballman. Use monospace for option flags in the PCH section, instead of the italics that were being used previously. I believe these used to be links, for which single backticks would have been appropriate, but since

Re: r322390 - [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-12 Thread Volodymyr Sapsai via cfe-commits
Hans, I am nominating this change to be merged into 6.0.0 release branch. Thanks, Volodymyr > On Jan 12, 2018, at 10:54, Volodymyr Sapsai via cfe-commits > wrote: > > Author: vsapsai > Date: Fri Jan 12 10:54:35 2018 > New Revision: 322390 > > URL:

r322393 - [OPENMP] Replace calls of getAssociatedStmt().

2018-01-12 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Jan 12 11:39:11 2018 New Revision: 322393 URL: http://llvm.org/viewvc/llvm-project?rev=322393=rev Log: [OPENMP] Replace calls of getAssociatedStmt(). getAssociatedStmt() returns the outermost captured statement for the OpenMP directive. It may return incorrect region in

[PATCH] D42004: [Driver] Suggest valid integrated tools

2018-01-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: sepavloff, bkramer, phosek. There are only two valid integrated Clang driver tools: `-cc1` and `-cc1as`. If a user asks for an unknown tool, such as `-cc1asphalt`, an error message is displayed to indicate that there is no such tool, but

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

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 3 inline comments as done. JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:20 + +AST_MATCHER(GotoStmt, isForwardJumping) { + lebedev.ri wrote: > JonasToth wrote: > > lebedev.ri wrote: > > > It would

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

2018-01-12 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322390: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D41423?vs=129379=129666#toc Repository:

r322390 - [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-12 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Fri Jan 12 10:54:35 2018 New Revision: 322390 URL: http://llvm.org/viewvc/llvm-project?rev=322390=rev Log: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral. Fix makes the loop in LexAngledStringLiteral more like the loops in LexStringLiteral, LexCharConstant.

[PATCH] D42001: [Driver] Add "did you mean?" suggestions to -cc1as

2018-01-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D42001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. This was libunwind's test suite: Compiled test failed unexpectedly! Testing Time: 0.53s Failing Tests (1): libunwind :: libunwind_02.pass.cpp Expected Passes: 3 Unexpected Failures: 1 The hacky

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. To be clear, are you getting the failure running libunwind's test suite or your own test? I've managed to get libunwind to cross-compile for me using GCC 6.3.0 on FreeBSD for O32, N32, and N64, but only to build the library, not the tests. I've been running a simple

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-01-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/AST/Type.h:1148 +DK_objc_weak_lifetime, +DK_c_struct_strong_field }; rjmccall wrote: > I don't think you want to refer to the fact that the C struct specifically > contains a __strong field

[PATCH] D41996: [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322387: [clangd] Code completion uses Sema for NS-level things in the current file. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r322387 - [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 10:30:08 2018 New Revision: 322387 URL: http://llvm.org/viewvc/llvm-project?rev=322387=rev Log: [clangd] Code completion uses Sema for NS-level things in the current file. Summary: To stay fast, it avoids deserializing anything outside the current file, by

[PATCH] D42001: [Driver] Add "did you mean?" suggestions to -cc1as

2018-01-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: v.g.vassilev, bruno. In https://reviews.llvm.org/D41733, the driver was modified such that, when a user provided a mispelled option such as `-hel`, it would suggest a valid option with a nearby edit distance: "did you mean '-help'?".

[PATCH] D41809: Clang counterpart change for fuzzer FreeBSD support

2018-01-12 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. Looks good, please improve the description of the commit (and not your authorship that will be preserved in the commit message). Once accepted by another developer, I can commit it for you. https://reviews.llvm.org/D41809

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1937 +RetAttrs.addAttribute(llvm::Attribute::ZExt); +} // FALL THROUGH asb wrote: > rjmccall wrote: > > asb wrote: > > > rjmccall wrote: > > > > I feel like a better design would

[PATCH] D41999: Refactor handling of signext/zeroext in ABIArgInfo

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, that looks great. I appreciate you doing this. Repository: rC Clang https://reviews.llvm.org/D41999 ___ cfe-commits mailing list

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1937 +RetAttrs.addAttribute(llvm::Attribute::ZExt); +} // FALL THROUGH rjmccall wrote: > asb wrote: > > rjmccall wrote: > > > I feel like a better design would be to record whether to

[PATCH] D41999: Refactor handling of signext/zeroext in ABIArgInfo

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
asb created this revision. asb added a reviewer: rjmccall. Herald added subscribers: cfe-commits, arichardson. As @rjmccall suggested in https://reviews.llvm.org/D40023, we can get rid of ABIInfo::shouldSignExtUnsignedType (used to handle cases like the Mips calling convention where 32-bit

[PATCH] D41996: [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D41996#974751, @hokein wrote: > nice, LGTM. > > By `r322377`, I think you mean `r322371`. Done. > We also need to set `CollectorOpts.IndexMainFiles` to `false` in > `FileIndex.cpp::indexAST` -- we don't need dynamic index to catch the

[PATCH] D41788: [DeclPrinter] Fix two cases that crash clang -ast-print.

2018-01-12 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. @arphaman: ping. https://reviews.llvm.org/D41788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-01-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322382: [WebAssembly] Support -stdlib=libc++ switch (authored by sbc, committed by ). Changed prior to commit: https://reviews.llvm.org/D41937?vs=129572=129649#toc Repository: rC Clang

r322382 - [WebAssembly] Support -stdlib=libc++ switch

2018-01-12 Thread Sam Clegg via cfe-commits
Author: sbc Date: Fri Jan 12 09:54:49 2018 New Revision: 322382 URL: http://llvm.org/viewvc/llvm-project?rev=322382=rev Log: [WebAssembly] Support -stdlib=libc++ switch Referenced implementation from Fuchsia and Darwin Toolchain. Still only support CST_Libcxx. Now checks that the argument is

[PATCH] D41998: [clang-tidy] Expand readability-redundant-smartptr-get to understand implicit converions to bool in more contexts.

2018-01-12 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza created this revision. sbenza added a reviewer: hokein. Herald added subscribers: cfe-commits, xazax.hun, klimek. Expand readability-redundant-smartptr-get to understand implicit converions to bool in more contexts. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41998

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

2018-01-12 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 129647. juliehockett marked 3 inline comments as done. juliehockett added a comment. Fixing comments https://reviews.llvm.org/D41963 Files: clang-tidy/fuchsia/CMakeLists.txt clang-tidy/fuchsia/FuchsiaTidyModule.cpp

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Decl.h:3529 + /// Basic properties of non-trivial C structs. + bool HasStrongObjCPointer : 1; + Is it interesting to track all the individual reasons that a struct is non-trivial at the struct

[PATCH] D41996: [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. nice, LGTM. By `r322377`, I think you mean `r322371`. We also need to set `CollectorOpts.IndexMainFiles` to `false` in `FileIndex.cpp::indexAST` -- we don't need dynamic index to catch the

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

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. High Integrity C++ has the rule `17.5.1 Do not ignore the result of std::remove, std::remove_if or std::unique`. Do we want to add those to the preconfigured list? https://reviews.llvm.org/D41655 ___ cfe-commits mailing

[PATCH] D41809: Clang counterpart change for fuzzer FreeBSD support

2018-01-12 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. In https://reviews.llvm.org/D41809#969475, @kimgr wrote: > Typo in the commit title: buzzer :) Changed ... just to follow-up the now accepted change of this one https://reviews.llvm.org/D41642 https://reviews.llvm.org/D41809

[clang-tools-extra] r322379 - [clangd] Include debugging tags for both static and dynamic index. NFC

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 09:09:49 2018 New Revision: 322379 URL: http://llvm.org/viewvc/llvm-project?rev=322379=rev Log: [clangd] Include debugging tags for both static and dynamic index. NFC Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp

  1   2   >