[PATCH] D45006: [Tooling] A CompilationDatabase wrapper that infers header commands.

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 140160. sammccall added a comment. Handle the case where no points are awarded (e.g. system headers) and document awards better. Repository: rC Clang https://reviews.llvm.org/D45006 Files: include/clang/Tooling/CompilationDatabase.h lib/Tooling/CM

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D44536#1039428, @rjmccall wrote: > Hmm. Sema is lazy about actually creating implicit destructor declarations, > but it's supposed to only do it whenever the destructor is actually used for > something. I'm looking at a similar problem wh

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. A few more nits. Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:114-117 + auto ParentIter = Parents.begin(); + std::string ParentsStr = "'" + getNameA

Re: r328282 - [analyzer] Trust _Nonnull annotations for system framework

2018-03-28 Thread Alexander Kornienko via cfe-commits
It looks like it was fixed, indeed. After an update I don't see an awful number of crashes any more. Thanks! On Mon, Mar 26, 2018 at 8:05 PM George Karpenkov wrote: > Yeah, I’m pretty sure this was fixed on Friday with > https://reviews.llvm.org/rC328406 > > On Mar 26, 2018, at 10:54 AM, Alexan

[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

2018-03-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 140167. NoQ added a comment. Conditional operators, like call-expressions in https://reviews.llvm.org/D44273, may also be glvalues of record type instead of simply being reference-typed. https://reviews.llvm.org/D44854 Files: lib/Analysis/CFG.cpp lib/Stat

[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

2018-03-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 140168. NoQ added a comment. Fix a comment in tests. https://reviews.llvm.org/D44854 Files: lib/Analysis/CFG.cpp lib/StaticAnalyzer/Core/ExprEngineCXX.cpp test/Analysis/cfg-rich-constructors.cpp test/Analysis/cxx17-mandatory-elision.cpp test/Analysis/

r328746 - [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 17:51:11 2018 New Revision: 328746 URL: http://llvm.org/viewvc/llvm-project?rev=328746&view=rev Log: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods Differential Revision: https://reviews.llvm.org/D44707 Modif

r328747 - [ASTMatchers] Introduce a matcher for matching any given Objective-C selector

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 17:51:12 2018 New Revision: 328747 URL: http://llvm.org/viewvc/llvm-project?rev=328747&view=rev Log: [ASTMatchers] Introduce a matcher for matching any given Objective-C selector Incudes a tiny related refactoring. Differential Revision: https://reviews.

r328749 - [ast] Do not auto-initialize Objective-C for-loop variables in Objective-C++ in templatized code under ARC

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 17:56:24 2018 New Revision: 328749 URL: http://llvm.org/viewvc/llvm-project?rev=328749&view=rev Log: [ast] Do not auto-initialize Objective-C for-loop variables in Objective-C++ in templatized code under ARC The AST for the fragment ``` @interface I @en

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry for the delay, it took me a while to understand exactly what everything is doing. If I understand right, there's actually no functional change (to match logic or scoring) being proposed here. But some nice fixes indeed! Most of the comments are readability nits.

Re: [clang-tools-extra] r328500 - [clangd] Support incremental document syncing

2018-03-28 Thread Simon Marchi via cfe-commits
On 2018-03-27 01:47 PM, Reid Kleckner wrote: > One of these new tests does not pass on Windows due to assumptions about > absolute path structure. The FileCheck output seems self-explanatory: > > $ "FileCheck" "-strict-whitespace" > "C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc20

r328690 - [PATCH] [RISCV] Verify the input value of -march=

2018-03-28 Thread Shiva Chen via cfe-commits
Author: shiva Date: Wed Mar 28 01:29:50 2018 New Revision: 328690 URL: http://llvm.org/viewvc/llvm-project?rev=328690&view=rev Log: [PATCH] [RISCV] Verify the input value of -march= Summary: This patch doing more check and verify the -march= string and will issue an error if it's a invalid combin

r328750 - [astmatchers] Move a matcher out of internal namespace: blind debugging of MSVC issues

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 18:15:05 2018 New Revision: 328750 URL: http://llvm.org/viewvc/llvm-project?rev=328750&view=rev Log: [astmatchers] Move a matcher out of internal namespace: blind debugging of MSVC issues Modified: cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp M

[libcxx] r328751 - Fix PR36914 - num_get::get(unsigned) incorrectly handles negative numbers.

2018-03-28 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Mar 28 18:18:53 2018 New Revision: 328751 URL: http://llvm.org/viewvc/llvm-project?rev=328751&view=rev Log: Fix PR36914 - num_get::get(unsigned) incorrectly handles negative numbers. This patch corrects num_get for unsigned types to support strings with a leading `-` char

r328752 - [analyzer] [testing] Be less verbose by default in integration testing.

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 18:23:54 2018 New Revision: 328752 URL: http://llvm.org/viewvc/llvm-project?rev=328752&view=rev Log: [analyzer] [testing] Be less verbose by default in integration testing. Modified: cfe/trunk/utils/analyzer/SATestBuild.py Modified: cfe/trunk/utils/a

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. BTW if you're interested in this stuff in clangd, there's some greener-field related stuff too: Our goal is to be able to do project-wide fuzzy-find navigation and code completion with the global symbol index. The index implementation in upstream clangd is naive at the

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think it's part of an effort to avoid creating implicit declarations for all the special members of every struct we parse from system headers. Repository: rC Clang https://reviews.llvm.org/D44536 ___ cfe-commits maili

[PATCH] D45012: [Modules] Skip adding unused module maps to the dependency file

2018-03-28 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added a reviewer: rsmith. Current generation of dependency files when modules is on take into account all parsed module maps found while searching for a specific module. Add a new cc1 flag that allows changing that behavior: only add module maps that actually an

[PATCH] D45013: Generate warning when over-aligned new call is required but not supported.

2018-03-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: vsapsai, mclow.lists. Herald added a subscriber: christof. Currently libc++ silently ignores over-aligned allocation requests made through __libcpp_allocate when aligned new/delete is not available. This patch uses the `diagnose_if` at

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44764#1046766, @sammccall wrote: > I understand the template instantiations here are a mess and we need to solve > the problem. However I'm not sure this is the right direction: > > - it violates IWYU, and we expect people consistently to g

r328754 - [astmatchers] Fix linking issue

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 19:47:28 2018 New Revision: 328754 URL: http://llvm.org/viewvc/llvm-project?rev=328754&view=rev Log: [astmatchers] Fix linking issue Modified: cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp Modified: cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.c

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 140180. malaperle added a comment. Use operator<< where we can Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44764 Files: clangd/Protocol.cpp clangd/Protocol.h unittests/clangd/CodeCompleteTests.cpp unittests/clangd/JSONExprTests

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I see, so Sema::CheckCompletedCXXClass probably isn't the right place to call DeclareImplicitDestructor as that could significantly increase the size of the AST. Repository: rC Clang https://reviews.llvm.org/D44536 ___

[PATCH] D44764: [clangd] Use operator<< to prevent printers issues in Gtest

2018-03-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: unittests/clangd/JSONExprTests.cpp:19 -void PrintTo(const Expr &E, std::ostream *OS) { - llvm::raw_os_ostream(*OS) << llvm::formatv("{0:2}", E); -} This one I couldn't change to operator<< because there was already on

[PATCH] D45014: [Index] Return SourceLocation to consumers, not FileID/Offset pair.

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: akyrtzi, arphaman. Herald added subscribers: cfe-commits, ioeric, ilya-biryukov. The FileID/Offset conversion is lossy. The code takes the fileLoc, which loses e.g. the spelling location in some macro cases. Instead, pass the original Sou

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-03-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, vsapsai, erik.pilkington, ahatanak. Libc++ needs to know when aligned allocation is supported by clang, but is otherwise unavailable at link time. This patch adds a predefined macro to allow libc++ to do that. IDK if using a predefin

[PATCH] D45016: [libcxx] [test] Avoid MSVC truncation warnings.

2018-03-28 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. [libcxx] [test] Avoid MSVC truncation warnings. MSVC emits "warning C4244: 'initializing': conversion from 'int' to 'short', possible loss of data" when it sees pair constructed from (whatever, 4), because int is being

[PATCH] D43927: [Coroutines] Schedule coro-split before asan

2018-03-28 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov accepted this revision. GorNishanov added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D43927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members

2018-03-28 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov closed this revision. GorNishanov added a comment. Fixed: git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328663 91177308-0d34-0410-b5e6-96231b3b80d8 https://reviews.llvm.org/D37115 ___ cfe-commits mailing list cfe-commits@lists

[libcxx] r328758 - Move libc++ pair/tuple assign test to libcxx/ test directory.

2018-03-28 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Mar 28 20:30:00 2018 New Revision: 328758 URL: http://llvm.org/viewvc/llvm-project?rev=328758&view=rev Log: Move libc++ pair/tuple assign test to libcxx/ test directory. Libc++ implements the pair& operator=(pair) assignment operator using a single template that handles a

[libcxx] r328760 - fix typo in align_const_pair_U_V.pass.cpp

2018-03-28 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Mar 28 20:44:01 2018 New Revision: 328760 URL: http://llvm.org/viewvc/llvm-project?rev=328760&view=rev Log: fix typo in align_const_pair_U_V.pass.cpp Modified: libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp Modified: libcxx/

[PATCH] D44865: [libc++] Implement P0608R1 - A sane variant converting constructor

2018-03-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This LGTM. However, we should add tests for `const bool` and `volatile bool` before committing. Also I would like @mclow.lists input about applying this DR early since LWG hasn't commented on it yet. Repository: rCXX libc++ https://reviews.llvm.org/D44865 ___

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44536#1051181, @ahatanak wrote: > I see, so Sema::CheckCompletedCXXClass probably isn't the right place to call > DeclareImplicitDestructor as that could significantly increase the size of > the AST. Right. Again, I'd like Richard to wei

[PATCH] D44865: [libc++] Implement P0608R1 - A sane variant converting constructor

2018-03-28 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 140188. lichray added a comment. More tests Repository: rCXX libc++ https://reviews.llvm.org/D44865 Files: include/variant test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp test/std/utilities/variant/variant.variant/variant.ctor/

r328763 - Refactor some code for a warning. NFC.

2018-03-28 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Mar 28 22:14:17 2018 New Revision: 328763 URL: http://llvm.org/viewvc/llvm-project?rev=328763&view=rev Log: Refactor some code for a warning. NFC. Use range-based for-loops instead of iterators to walk over vectors. Switch the key of the DenseMap so a custom key handler

[PATCH] D44878: libFuzzer OpenBSD support

2018-03-28 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. ping Repository: rC Clang https://reviews.llvm.org/D44878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2