[PATCH] D42273: Add hasTrailingReturn AST matcher

2018-01-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:5904 +return F->hasTrailingReturn(); + return false; +} juliehockett wrote: > lebedev.ri wrote: > > There are no negative tests in the unittest that cover this false path.

[PATCH] D42300: [Analyzer] Add PreStmt and PostStmt callbacks for OffsetOfExpr

2018-01-20 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 130753. MTC added a comment. - Use C++11 range-based for loop to traverse ExplodedNodeSet. - Define the macro `offsetof` in `system-header-simulator.h`. Repository: rC Clang https://reviews.llvm.org/D42300 Files: lib/StaticAnalyzer/Checkers/AnalysisOrderCh

[PATCH] D42300: [Analyzer] Add PreStmt and PostStmt callbacks for OffsetOfExpr

2018-01-20 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D42300#982187, @NoQ wrote: > My intuition suggests that this checker shouldn't be path-sensitive; our > path-sensitive analysis does very little to help you with this particular > checker, and you might end up with a much easier and more reliable

[PATCH] D42272: [X86] Add rdpid command line option and intrinsics.

2018-01-20 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D42272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D42213: [ASTMatchers] [NFC] Fix code examples

2018-01-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Great, all that remains is for you to regenerate the documentation file and upload that with the next patch. Repository: rC Clang https://reviews.llvm.org/D42213 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D42273: Add hasTrailingReturn AST matcher

2018-01-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:5904 +return F->hasTrailingReturn(); + return false; +} lebedev.ri wrote: > juliehockett wrote: > > lebedev.ri wrote: > > > There are no negative tests in the unittest t

[clang-tools-extra] r323040 - Assume the shared library path variable is LD_LIBRARY_PATH on systems

2018-01-20 Thread Dimitry Andric via cfe-commits
Author: dim Date: Sat Jan 20 06:34:33 2018 New Revision: 323040 URL: http://llvm.org/viewvc/llvm-project?rev=323040&view=rev Log: Assume the shared library path variable is LD_LIBRARY_PATH on systems except Darwin and Windows. This prevents inserting an environment variable with an empty name (wh

[PATCH] D42273: Add hasTrailingReturn AST matcher

2018-01-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:5904 +return F->hasTrailingReturn(); + return false; +} aaron.ballman wrote: > lebedev.ri wrote: > > juliehockett wrote: > > > lebedev.ri wrote: > > > > There are no negati

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-01-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. This should be rebased to latest master. https://reviews.llvm.org/D38845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41946: [clangd] Add support for different file URI schemas.

2018-01-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 130766. ioeric marked 16 inline comments as done. ioeric added a comment. - Addressed review comments. - Check windows vs unit paths in tests. - Properly check absolute paths. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41946 Files: cla

[PATCH] D41946: [clangd] Add support for different file URI schemas.

2018-01-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/URI.cpp:57 + Body = "/"; +Body += path::convert_to_slash(AbsolutePath, path::Style::posix); +return (llvm::Twine(Scheme) + ":" + percentEncode(Body)).str(); sammccall wrote: > ioeric wrote: > > sammcca

[PATCH] D42335: [ASTImporter] Supporting CXXOperatorCallExpr, SizeOfPackExpr, DependentTemplateSpecializationType, DependentSizedArray importing.

2018-01-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: a.sidorin, szepet. Herald added subscribers: dkrupp, rnkovacs. Also fix a problem with CXXTemporaryObjectExpr. Repository: rC Clang https://reviews.llvm.org/D42335 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp

r323046 - [X86] Put the code that defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 for the preprocessor with the other __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* defines. NFC

2018-01-20 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sat Jan 20 10:36:06 2018 New Revision: 323046 URL: http://llvm.org/viewvc/llvm-project?rev=323046&view=rev Log: [X86] Put the code that defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 for the preprocessor with the other __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* defines. NFC Modified:

r323047 - [X86] Add rdpid command line option and intrinsics.

2018-01-20 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sat Jan 20 10:36:52 2018 New Revision: 323047 URL: http://llvm.org/viewvc/llvm-project?rev=323047&view=rev Log: [X86] Add rdpid command line option and intrinsics. Summary: This patch adds -mrdpid/-mno-rdpid and the rdpid intrinsic. The corresponding LLVM commit has already

[PATCH] D42272: [X86] Add rdpid command line option and intrinsics.

2018-01-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323047: [X86] Add rdpid command line option and intrinsics. (authored by ctopper, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42272?vs=130

[libcxx] r323050 - More P0202 constexpr work. This commit adds fill/fill_n/generate/generate_n/unique/unique_copy. I removed a specialization of fill_n that recognized when we were dealing with raw po

2018-01-20 Thread Marshall Clow via cfe-commits
Author: marshall Date: Sat Jan 20 12:14:32 2018 New Revision: 323050 URL: http://llvm.org/viewvc/llvm-project?rev=323050&view=rev Log: More P0202 constexpr work. This commit adds fill/fill_n/generate/generate_n/unique/unique_copy. I removed a specialization of fill_n that recognized when we were

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

2018-01-20 Thread Timothy VanSlyke via Phabricator via cfe-commits
tvanslyke updated this revision to Diff 130775. tvanslyke added a comment. Since `__clear_and_shrink()` is private the test covers copy and move assignment. I also ran the libcxx/strings/basic.string and std/strings tests with a hard-coded `assert(__invariants());` at the end of `__clear_and_s

r323051 - [cmake] Use CLANG_BINARY_DIR to determine the build directory.

2018-01-20 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Sat Jan 20 13:43:35 2018 New Revision: 323051 URL: http://llvm.org/viewvc/llvm-project?rev=323051&view=rev Log: [cmake] Use CLANG_BINARY_DIR to determine the build directory. The patch puts the ClangConfig.cmake in the expected location when clang is embedded into a frame

r323052 - [analyzer] Provide a check name when MallocChecker enables CStringChecker

2018-01-20 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sat Jan 20 15:11:17 2018 New Revision: 323052 URL: http://llvm.org/viewvc/llvm-project?rev=323052&view=rev Log: [analyzer] Provide a check name when MallocChecker enables CStringChecker Fix an assertion failure caused by a missing CheckName. The malloc checker enables "bas

[PATCH] D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object.

2018-01-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, GorNishanov, nicholas. Fix NRVO for Gro variable. Previously, we only marked the GRO declaration as an NRVO variable when its QualType and the function return's QualType matched exactly (using operator==). However, this was inc

[PATCH] D42344: [libc++] Use multi-key tree search for {map, set}::{count, equal_range}

2018-01-20 Thread N via Phabricator via cfe-commits
ng created this revision. ng added a reviewer: mclow.lists. Herald added a reviewer: EricWF. As described in http://bugs.llvm.org/show_bug.cgi?id=30959, the current implementation of std::{map, key}::{count, equal_range} in libcxx is non-conforming. Quoting ISO/IEC 14882:2014 section 23.2.4: >

[PATCH] D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object.

2018-01-20 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: test/CodeGenCoroutines/coro-gro-nrvo.cpp:17 +using SizeT = decltype(sizeof(int)); +void* operator new(SizeT __sz, const std::nothrow_t&) noexcept; +void operator delete(void* __p, const std::nothrow_t&) noexcept; `Size

[PATCH] D42344: [libc++] Use multi-key tree search for {map, set}::{count, equal_range}

2018-01-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Could you provide tests that demonstrate the previously incorrect behavior? Repository: rCXX libc++ https://reviews.llvm.org/D42344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D42344: [libc++] Use multi-key tree search for {map, set}::{count, equal_range}

2018-01-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Shouldn't we be changing only the heterogeneous functions here? Repository: rCXX libc++ https://reviews.llvm.org/D42344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D42344: [libc++] Use multi-key tree search for {map, set}::{count, equal_range}

2018-01-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @rsmith Yes. I agree this should only be applied in that case Repository: rCXX libc++ https://reviews.llvm.org/D42344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c