r342667 - r342177 introduced a hint in cases where an #included file is not found. It tries to find a suggestion by removing leading or trailing non-alphanumeric characters and checking if a matching

2018-09-20 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Sep 20 10:21:56 2018 New Revision: 342667 URL: http://llvm.org/viewvc/llvm-project?rev=342667=rev Log: r342177 introduced a hint in cases where an #included file is not found. It tries to find a suggestion by removing leading or trailing non-alphanumeric characters

[PATCH] D52300: [clangd] Implement VByte PostingList compression

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Very nice! I think the data structures can be slightly tighter, and some of the implementation could be easier to follow. But this seems like a nice win. Right-sizing the vectors seems like an important optimization. Comment at:

[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: alexfh, aaron.ballman, flx. The three checks mentioned in the Title are two noisy if the code uses intrusive smart (reference counting) pointers. LLVM/Clang is such a code, it has lots of such types, e.g. StringRef,

r342666 - [OPENMP] Fix spelling of getLoopCounter (NFC)

2018-09-20 Thread Mike Rice via cfe-commits
Author: mikerice Date: Thu Sep 20 10:19:41 2018 New Revision: 342666 URL: http://llvm.org/viewvc/llvm-project?rev=342666=rev Log: [OPENMP] Fix spelling of getLoopCounter (NFC) Modified: cfe/trunk/include/clang/AST/OpenMPClause.h cfe/trunk/lib/AST/OpenMPClause.cpp

[PATCH] D51926: [scan-build-py] Prevent crashes of CTU analysis by suppressing warnings

2018-09-20 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. If that helps you, then sure. I'm not sure I understand why having warnings causes the collection process to fail, but I guess ultimately it's not important.

[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.

2018-09-20 Thread Eric Christopher via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342667: r342177 introduced a hint in cases where an #included file is not found. It… (authored by echristo, committed by ). Changed prior to commit: https://reviews.llvm.org/D52280?vs=166184=166327#toc

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Also not sure about the trick: - Would be surprising to see the "ms" instead of "mbytes" - Time tends to vary between runs, so using Google Benchmark's capabilities to run multiple times and report aggregated times seems useful. Not so much for the memory usage:

r342648 - [OPENMP] Add support for mapping memory pointed by member pointer.

2018-09-20 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Sep 20 06:54:02 2018 New Revision: 342648 URL: http://llvm.org/viewvc/llvm-project?rev=342648=rev Log: [OPENMP] Add support for mapping memory pointed by member pointer. Added support for map(s, s.ptr[0:1]) kind of mapping. Modified:

[PATCH] D52261: [Sema] Generate completion fix-its for C code as well

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D52261#1240143, @yvvan wrote: > I tried that first but did not I find a way just to copy an expression (we > basically need the same expr for such case). Do you know how to properly > generate a copy of expression or some other way to

[PATCH] D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer.

2018-09-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: unittests/Analysis/ExprMutationAnalyzerTest.cpp:67 +if (const auto *DRE = dyn_cast(E)) { + if (DRE->getNameInfo().getAsString()[0] == 'p') +Finder = PointeeMutationFinder; shuaiwang wrote: > JonasToth

[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. This looks questionable to me. I don't disagree with the reasons stated about llvm types. But is that *always* true? I would personally be very surprized, and consider this a false-positive. This should at least be optional. Not sure about the default, but setting the

Re: r229575 - clang-cl: Disable frame pointer elimination at -O0

2018-09-20 Thread Reid Kleckner via cfe-commits
It looks like we don't do anything special if you run clang-cl -O0 or /O0, but it's not an error. I don't have my computer and can't run a test, but from the outside, it looks like clang-cl -O0 does generate unoptimized code without warning about an unrecognized flag, but it doesn't disable FP

[PATCH] D52267: [AST] Various optimizations + refactoring in DeclarationName(Table)

2018-09-20 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 166324. riccibruno marked 9 inline comments as done. riccibruno added a comment. Address rjmccall comments: 1. Renamed `CXXSpecialName` to `CXXSpecialNameExtra` 2. Introduced a constant `IdentifierInfoAlignment` for `alignas(IdentifierInfoAlignment)` 3.

[PATCH] D46140: [coroutines] std::task type (WIP)

2018-09-20 Thread Lewis Baker via Phabricator via cfe-commits
lewissbaker added inline comments. Comment at: test/std/experimental/task/sync_wait.hpp:36-37 + __isSet_ = true; +} +__cv_.notify_all(); + } The call to `notify_all()` needs to be inside the lock. Otherwise, it's possible the waiting thread may see

[PATCH] D52267: [AST] Various optimizations + refactoring in DeclarationName(Table)

2018-09-20 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Addressed some inline comments. Comment at: include/clang/AST/DeclarationName.h:46 -/// DeclarationName - The name of a declaration. In the common case, -/// this just stores an IdentifierInfo pointer to a normal -/// name. However, it also

[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-20 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:49 + if (Context.getTypeSize(Type) <= Context.getTypeSize(Context.VoidPtrTy)) +return false; + This early return now ignores the fact that the type has non-trivial copy constructors,

<    1   2