[PATCH] D51279: [clangd] Implement findOccurrences interface in dynamic index.

2018-08-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D51279#1214268, @ilya-biryukov wrote: > Just noticed I'm not on the reviewers list, sorry for chiming in without > invitation. Was really excited about the change :-) Comments are always welcome :) Comment at: clangd/index

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-08-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Of course we would like to try the Z3 for refutation, we do not dispute its usefulness. This patch is about something really different. It extends the range-based constraint manager in a very natural way. Is the code of the range-based constraint manager froz

[clang-tools-extra] r340800 - [clang-tidy] Abseil: no namepsace check

2018-08-28 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Aug 28 00:48:28 2018 New Revision: 340800 URL: http://llvm.org/viewvc/llvm-project?rev=340800&view=rev Log: [clang-tidy] Abseil: no namepsace check This check ensures that users of Abseil do not open namespace absl in their code, as that violates our compatibility guidel

[PATCH] D50580: [clang-tidy] Abseil: no namespace check

2018-08-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein closed this revision. hokein added a comment. I have committed the patch for you, https://reviews.llvm.org/rL340800. Comment at: test/clang-tidy/abseil-no-namespace.cpp:10 +#include "absl/external-file.h" +// CHECK: absl/external-file.h:1:11: warning: namespace 'absl' i

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Please rebase your patch, since the absl matcher patch is submitted. Thanks. Comment at: test/clang-tidy/abseil-no-internal-deps.cpp:8 +#include "absl/external-file.h" +// CHECK: absl/external-file.h:1:23: warning: do not reference any 'internal' namesp

Re: [clang-tools-extra] r340800 - [clang-tidy] Abseil: no namepsace check

2018-08-28 Thread Roman Lebedev via cfe-commits
On Tue, Aug 28, 2018 at 10:48 AM, Haojian Wu via cfe-commits wrote: > Author: hokein > Date: Tue Aug 28 00:48:28 2018 > New Revision: 340800 > > URL: http://llvm.org/viewvc/llvm-project?rev=340800&view=rev > Log: > [clang-tidy] Abseil: no namepsace check > > This check ensures that users of Abseil

[PATCH] D51332: [clang-tidy] Replace deprecated std::ios_base aliases

2018-08-28 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi andobence, thank you for the contribution. The check looks very good! Please add it to the release notes and synchronize the first line of the doc with the short sentence in the release notes describing what this check does. Comment at: clang-tid

[PATCH] D51332: [clang-tidy] Replace deprecated std::ios_base aliases

2018-08-28 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.cpp:34 + // provide any benefit to other languages, despite being benign. + if (!getLangOpts().CPlusPlus) +return; Which standard supplies the replacement functi

[PATCH] D51292: [docs] Update clang-rename documentation

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/docs/clang-rename.rst:28 +:program:`clang-rename` infrastructure to handle renaming requests. Because of +much better editor integration and support, it is advised to use +:program:`clangd-rename` as part of :prog

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:124 +// A CompileCommand that can be applied to another file. Any instance of this +// object is invalid after std::move() from it. struct TransferableCommand { jfb

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tidy/abseil/NoInternalDepsCheck.cpp:24 + auto &SourceManager = Finder->getASTContext().getSourceManager(); + SourceLocation loc = Node.getBeginLoc(); + if (loc.isInvalid()) I think @hokein's comment wasn't addr

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for finding this problem, this fix *mostly* looks good (though I think we can probably drop memoization). I'm a bit uncomfortable about the places where we need the type, because this is the only thing forcing us to parse before we've picked a command to trans

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:124 +// A CompileCommand that can be applied to another file. Any instance of this +// object is invalid after std::move() from it. struct TransferableCommand { ilya-bi

r340805 - [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-08-28 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Tue Aug 28 01:41:15 2018 New Revision: 340805 URL: http://llvm.org/viewvc/llvm-project?rev=340805&view=rev Log: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments We add check for invalidation of iterators. The only operation w

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-08-28 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340805: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy)… (authored by baloghadamsoftware, committed by ). Repository: rC Clang https://reviews.llvm.org/D32747 Files: inclu

[PATCH] D51321: [Tooling] Improve handling of CL-style options

2018-08-28 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood marked an inline comment as done. hamzasood added inline comments. Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:136 + // Otherwise just check the clang file name. + return llvm::sys::path::stem(CmdLine.front()).endswith_lower("clang-cl"); +} --

[PATCH] D51341: [HEADER] Overloadable function candidates for half/double types

2018-08-28 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd created this revision. sidorovd added reviewers: yaxunl, Anastasia. Herald added a subscriber: cfe-commits. Overloadable function candidate should not be viable if it uses extensions (Half or Double type) that are not enabled or supported. Repository: rC Clang https://reviews.llvm.o

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D51314#1215381, @sammccall wrote: > I'm a bit uncomfortable about the places where we need the type, because this > is the only thing forcing us to parse before we've picked a command to > transfer, and the number of commands we need to par

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162808. kbobyrev marked an inline comment as done. kbobyrev added a comment. Complete two last paragraphs, address few comments. We haven't figured out whether we should suggest using this particular workflow at this point, but we're discussing the options.

[PATCH] D51234: [Driver] Change MipsLinux default linker from "lld" to "ld.lld"

2018-08-28 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added a comment. In https://reviews.llvm.org/D51234#1213813, @ruiu wrote: > If this piece of code used to be working correctly, there is another piece of > code that adds `-flavor ld` to the command line. But if that's the case, this > change wouldn't work because it constructs someth

[PATCH] D51341: [HEADER] Overloadable function candidates for half/double types

2018-08-28 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd updated this revision to Diff 162812. https://reviews.llvm.org/D51341 Files: include/clang/AST/Type.h lib/AST/Type.cpp lib/Sema/SemaOverload.cpp test/SemaOpenCL/half-double-overload.cl Index: test/SemaOpenCL/half-double-overload.cl ==

[PATCH] D51279: [clangd] Implement findOccurrences interface in dynamic index.

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D51279#1214268, @ilya-biryukov wrote: > Just noticed I'm not on the reviewers list, sorry for chiming in without > invitation. Was really excited about the change :-) fixed :-) Comment at: clangd/index/FileIndex.cpp:58

[PATCH] D51294: Fix Bug 38713: clang-format mishandles a short block after "default:" in a switch statement

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! Comment at: lib/Format/UnwrappedLineFormatter.cpp:486 return 0; +if (Line.First->is(tok::kw_default)) { + const FormatToken *Tok = Line.First->g

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162817. ilya-biryukov added a comment. Herald added a subscriber: mgrang. - Remove mutexes, recompute every time instead - Delay creation of TransferableCommand to avoid calling getAllCommands() on JSONCompilationDatabase Repository: rC Clang https

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 4 inline comments as done. ilya-biryukov added inline comments. Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:133 +assert(TraitsComputed && "calling transferTo on moved-from object"); +const CommandTraits &T = getTraits(); +CompileC

[clang-tools-extra] r340815 - [clangd] Add some trace::Spans. NFC

2018-08-28 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Aug 28 03:57:45 2018 New Revision: 340815 URL: http://llvm.org/viewvc/llvm-project?rev=340815&view=rev Log: [clangd] Add some trace::Spans. NFC Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp clang-tools-extra/trunk/clangd/TUScheduler.cpp Modified: c

[PATCH] D51298: [Tooling] Allow to filter files used by AllTUsExecutor

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. As discussed offline, instead of changing the interface of AllTUsScheduler, we could add concurrency to StandloneToolExecutor Repository: rC Clang https://reviews.llvm.org/D51298 ___

[clang-tools-extra] r340816 - [clangd] Remove unused parameter. NFC

2018-08-28 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Aug 28 04:04:07 2018 New Revision: 340816 URL: http://llvm.org/viewvc/llvm-project?rev=340816&view=rev Log: [clangd] Remove unused parameter. NFC Modified: clang-tools-extra/trunk/clangd/XRefs.cpp Modified: clang-tools-extra/trunk/clangd/XRefs.cpp URL: http://llv

[PATCH] D43783: [OpenCL] Remove block invoke function from emitted block literal struct

2018-08-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D43783#1212485, @yaxunl wrote: > In https://reviews.llvm.org/D43783#1204353, @svenvh wrote: > > > Sorry for digging up an old commit... > > > > Apparently this broke block arguments, e.g. the following test case: > > > > int foo(int (^ bl)(

[PATCH] D51310: [clangd] Implement iterator cost

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. In https://reviews.llvm.org/D51310#1214548, @kbobyrev wrote: > It's probably better to roll out proximity path boosting & actual two-stage > filtering before rolling this out. Up to you (I don't understand the interaction), but this

[PATCH] D51349: [clangd] Use buffered llvm::errs() in the clangd binary.

2018-08-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Unbuffered stream can cause significant (non-deterministic) latency for the logger. Repository: rCTE Clang Tools Extra https://review

[PATCH] D51212: [OpenCL][Docs] Release notes for OpenCL in Clang

2018-08-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D51212#1214173, @hans wrote: > Anastasia: will you commit this to the branch, or would like me to do it? I will commit this! Thanks! https://reviews.llvm.org/D51212 ___ cfe-commits mailing li

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. Awesome :-) Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:220 -// CommandIndex does the real work: given a filename, it produces the best -// matching TransferableCommand by matching filenames. Basic

[PATCH] D51349: [clangd] Use buffered llvm::errs() in the clangd binary.

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/tool/ClangdMain.cpp:263 + // Use buffered stream to stderr. Unbuffered stream can cause significant + // (non-deterministic) latency for the lo

[clang-tools-extra] r340822 - [clangd] Use buffered llvm::errs() in the clangd binary.

2018-08-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Aug 28 06:15:50 2018 New Revision: 340822 URL: http://llvm.org/viewvc/llvm-project?rev=340822&view=rev Log: [clangd] Use buffered llvm::errs() in the clangd binary. Summary: Unbuffered stream can cause significant (non-deterministic) latency for the logger. Reviewers: s

[PATCH] D51349: [clangd] Use buffered llvm::errs() in the clangd binary.

2018-08-28 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ioeric marked an inline comment as done. Closed by commit rCTE340822: [clangd] Use buffered llvm::errs() in the clangd binary. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D51349?

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Dex is now mature enough to be used as the default static index. This patch performs the switch

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162840. kbobyrev added a comment. Run `clang-format`. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp ==

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:32 static llvm::cl::opt -UseDex("use-dex-index", I think we should stick to the same option and just flip the default. Introducing yet another option (that is going to

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162842. kbobyrev marked 2 inline comments as done. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp ===

[libcxx] r340823 - Use addressof instead of operator& in make_shared. Fixes PR38729. As a drive-by, make the same change in raw_storage_iterator (twice).

2018-08-28 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Aug 28 06:29:30 2018 New Revision: 340823 URL: http://llvm.org/viewvc/llvm-project?rev=340823&view=rev Log: Use addressof instead of operator& in make_shared. Fixes PR38729. As a drive-by, make the same change in raw_storage_iterator (twice). Modified: libcxx/trunk

[PATCH] D51354: Fix the -print-multi-directory flag to print the selected multilib.

2018-08-28 Thread Christian Bruel via Phabricator via cfe-commits
chrib created this revision. Herald added subscribers: cfe-commits, srhines. Fix -print-multi-directory to print the selected multilib Repository: rC Clang https://reviews.llvm.org/D51354 Files: include/clang/Driver/ToolChain.h lib/Driver/Driver.cpp lib/Driver/ToolChains/Linux.cpp te

[PATCH] D51354: Fix the -print-multi-directory flag to print the selected multilib.

2018-08-28 Thread Christian Bruel via Phabricator via cfe-commits
chrib added a comment. https://bugs.llvm.org/show_bug.cgi?id=21360 Repository: rC Clang https://reviews.llvm.org/D51354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162849. ilya-biryukov marked 6 inline comments as done. ilya-biryukov added a comment. - Update the comments - Rename the new class to FileIndex - Restore an accidentally lost comment - Store file types in a parallel array instead of recomputing on each

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:32 +// FIXME(kbobyrev): This option should be removed as Dex is now the default +// static index. -

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162851. ilya-biryukov added a comment. - Reformat the code - Minor spelling fix Repository: rC Clang https://reviews.llvm.org/D51314 Files: lib/Tooling/InterpolatingCompilationDatabase.cpp Index: lib/Tooling/InterpolatingCompilationDatabase.cpp

[PATCH] D51356: [docs][mips] Clang 7.0 Release notes

2018-08-28 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan created this revision. atanasyan added reviewers: hans, petarj, smaksimovic, abeserminji. Herald added subscribers: arichardson, sdardis. MIPS specific part of Clang 7.0 Release notes. Feel free to add more notes if I miss something. Repository: rC Clang https://reviews.llvm.org/D5

[PATCH] D51291: [clangd] *Prototype* Support multiple #include headers in one symbol.

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Nice! We could reduce the scope of this patch somewhat by ignoring file proximity and just switching to return the most popular header. This would be a solid improvement over current behavior, and provide the infrastructure for the file-proximity approach. ===

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:229 +// +// Apart from path proximity signals, also takes file extensions into account +// when scoring the candidates. (this comment i

[PATCH] D51321: [Tooling] Improve handling of CL-style options

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Hi, sorry about overlooking cl mode flags when adding this, I was blissfully unaware that `compile_commands.json` could use that syntax :-) Out of curiosity, are you using this with clangd or some other tool? I'm sure there are places where clangd injects unixy flags.

[PATCH] D50385: [clangd] Collect symbol occurrences in SymbolCollector

2018-08-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 162854. hokein marked 10 inline comments as done. hokein added a comment. Address review comments and fix code style. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50385 Files: clangd/index/Index.cpp clangd/index/Index.h clangd/index/

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162855. ilya-biryukov added a comment. - Lowercase everything stored in the index. Repository: rC Clang https://reviews.llvm.org/D51314 Files: lib/Tooling/InterpolatingCompilationDatabase.cpp Index: lib/Tooling/InterpolatingCompilationDatabase.c

[PATCH] D50385: [clangd] Collect symbol occurrences in SymbolCollector

2018-08-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 162856. hokein added a comment. Minor cleanup. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50385 Files: clangd/index/Index.cpp clangd/index/Index.h clangd/index/SymbolCollector.cpp clangd/index/SymbolCollector.h unittests/clangd

[PATCH] D49986: [ADT] ImmutableList::add parameters are switched

2018-08-28 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus abandoned this revision. Szelethus added a comment. In https://reviews.llvm.org/D49986#1192798, @Szelethus wrote: > In https://reviews.llvm.org/D49985#1181568, @NoQ wrote: > > > In https://reviews.llvm.org/D49985#1181564, @dblaikie wrote: > > > > > It looks like concat orders the argume

[PATCH] D50385: [clangd] Collect symbol occurrences in SymbolCollector

2018-08-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/Index.h:377 + llvm::ArrayRef find(const SymbolID &ID) const { + auto It = Occurrences.find(ID); + if (It == Occurrences.end()) sammccall wrote: > return Occurrences.lookup(ID)? The `DenseMap::lookup

[PATCH] D51358: [driver] Do not pass "-flavor old-gnu" option to LLD linker

2018-08-28 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan created this revision. atanasyan added reviewers: echristo, ruiu. The "-flavor old-gnu" option were introduced to enable old version of LLD ELF linker implementation. This option has been removed from the linker since LLD 3.9. I do not think that there is a real case when the latest ve

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162861. ilya-biryukov added a comment. - Handle TransferableCommands with TY_INVALID type (never transfer -x flag for those) - Add a test with invalid extensions, seen a crash while experimenting - Update the test wrt to the new behavior. Repository:

[PATCH] D51359: Adding HardLink Support to VirtualFileSystem.

2018-08-28 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. Herald added a subscriber: cfe-commits. Added support of creating a hardlink from one file to another file. After a hardlink is added between two files, both file will have the same: 1. UniqueID (inode) 2. Size 3. Buffer This will bring replay of compilation clos

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162863. ilya-biryukov added a comment. - Sort Paths, they are different from OriginalPaths, i.e. lowercased. Repository: rC Clang https://reviews.llvm.org/D51314 Files: lib/Tooling/InterpolatingCompilationDatabase.cpp unittests/Tooling/Compilat

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162864. hugoeg marked 2 inline comments as done. hugoeg added a comment. made some major updates after no-namespace landed https://reviews.llvm.org/D50542 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162865. kbobyrev marked an inline comment as done. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp ===

[clang-tools-extra] r340828 - [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Tue Aug 28 07:55:05 2018 New Revision: 340828 URL: http://llvm.org/viewvc/llvm-project?rev=340828&view=rev Log: [clangd] Switch to Dex by default for the static index Dex is now mature enough to be used as the default static index. This patch performs the switch but introduc

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:127 // Language detected from -x or the filename. - types::ID Type = types::TY_INVALID; + // When set, cannot be TY_INVALID. + llvm::Optional Type

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340828: [clangd] Switch to Dex by default for the static index (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51352?vs=

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162868. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. - Cleanups Repository: rC Clang https://reviews.llvm.org/D51314 Files: lib/Tooling/InterpolatingCompilationDatabase.cpp unittests/Tooling/CompilationDatabase

[PATCH] D51311: (WIP) Type hierarchy

2018-08-28 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/Protocol.h:889 + // Does this node implement the method targeted by the request? + bool DeclaresMethod; + kadircet wrote: > I think comment and the name is in contradiction here, do you mean > DefinesMethod? Act

[PATCH] D51132: [clang-tidy] abseil-redundant-strcat-calls-check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg added a comment. @aaron.ballman when you get the chance could you take another look at this and commit if it is ready? My internship ends rather soon and this is a tad time sensitive. Thank you for your time! https://reviews.llvm.org/D51132 ___

[PATCH] D51061: [clang-tidy] abseil-str-cat-append

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg added a comment. @aaron.ballman when you get the chance could you take another look at this and commit if it is ready? My internship ends rather soon and this is a tad time sensitive and I don't have commit access. Thank you for your time! https://reviews.llvm.org/D51061

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/Inputs/absl/external-file.h:1 +void DirectAcess2() { absl::strings_internal::InternalFunction(); } + The file can not self-compile, and we should make it compilable. And put the newly-added code at the en

[PATCH] D51321: [Tooling] Improve handling of CL-style options

2018-08-28 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 162872. hamzasood added a comment. - Re-uploaded with full context. Yeah, I encountered these issues while using clangd on Windows. I haven't run into any clangd issues after applying this patch, but admittedly my usage is very basic (pretty much just cod

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: hokein. kbobyrev added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. Instead of parsing and compiling the `llvm::Regex` each time, it's faster to use basic string matching for filename prefix check. https://reviews

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg marked an inline comment as done. hugoeg added inline comments. Comment at: test/clang-tidy/Inputs/absl/external-file.h:1 +void DirectAcess2() { absl::strings_internal::InternalFunction(); } + hokein wrote: > The file can not self-compile, and we should ma

[PATCH] D51359: Adding HardLink Support to VirtualFileSystem.

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the change. Having something like this makes total sense. Mutating existing in-memory nodes looks shaky and requires making `Status` mutable, which also looks undesirable. Maybe we could consider adding a new kind of `InMemoryNode` for hard links that w

r340838 - Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Aug 28 09:15:56 2018 New Revision: 340838 URL: http://llvm.org/viewvc/llvm-project?rev=340838&view=rev Log: Parse compile commands lazily in InterpolatingCompilationDatabase Summary: This greatly reduces the time to read 'compile_commands.json'. For Chromium on my mach

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL340838: Parse compile commands lazily in InterpolatingCompilationDatabase (authored by ibiryukov, committed by ). Herald a

[PATCH] D51296: [Sema] Traverse vector types for ocl extensions support

2018-08-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Could you please change the commit title tag: [Sema] -> [OpenCL] Comment at: lib/Sema/Sema.cpp:42 #include "llvm/ADT/SmallSet.h" + using namespace clang

[PATCH] D51302: [OpenCL] Relax diagnostics on OpenCL access qualifiers

2018-08-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: test/SemaOpenCL/access-qualifier.cl:107 + +kernel void image_wo_twice(write_only write_only image1d_t i){} // expected-warning {{duplicate 'w

[PATCH] D50438: [clangd] Sort GoToDefinition results.

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Herald added a subscriber: kadircet. Comment at: clangd/XRefs.cpp:105 +// Sort results. Declarations being referenced explicitly come first. +std::sort(Result.begin(), Result.end(), + [](const DeclInfo &L, const DeclInfo &

[PATCH] D50438: [clangd] Sort GoToDefinition results.

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for the delays with this review Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D51333: Diagnose likely typos in include statements

2018-08-28 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added subscribers: aaron.ballman, erikjv, modocache. modocache added reviewers: aaron.ballman, erikjv. modocache added a comment. This looks good to me, but maybe some people who've modified this part of the codebase before could review this as well? @aaron.ballman added a fix-it for a

[PATCH] D51311: (WIP) Type hierarchy

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for looking into this. Would be cool to get this supported after the proposal is finalized. Comment at: clangd/Protocol.h:891 + + std::vector Parents; + What is the proposal to add children (i.e. overriden methods) to the

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I still thik will be good idea to rename check (deps -> dependencies). https://reviews.llvm.org/D50542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162895. hugoeg marked 3 inline comments as done. hugoeg added a comment. fixed issues outlines in comments https://reviews.llvm.org/D50542 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/NoInternalDepsCh

[PATCH] D51239: [ubsan] Enable -fsanitize=vptr on Apple devices and simulators

2018-08-28 Thread Dan Liew via Phabricator via cfe-commits
delcypher accepted this revision. delcypher added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/test/Driver/fsanitize.c:426 +// RUN: %clang -target arm-apple-ios4 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-IOS-

r340845 - [Driver] Delete last reference of lld -flavor old-gnu

2018-08-28 Thread Fangrui Song via cfe-commits
Author: maskray Date: Tue Aug 28 10:20:28 2018 New Revision: 340845 URL: http://llvm.org/viewvc/llvm-project?rev=340845&view=rev Log: [Driver] Delete last reference of lld -flavor old-gnu This is dead code because lld -flavor old-gnu was removed in 2016 by rLLD262158. Modified: cfe/trunk/lib

[PATCH] D51291: [clangd] *Prototype* Support multiple #include headers in one symbol.

2018-08-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 162897. ioeric marked 3 inline comments as done. ioeric retitled this revision from "[clangd] Support multiple #include headers in one symbol." to "[clangd] *Prototype* Support multiple #include headers in one symbol.". ioeric edited the summary of this revisi

[PATCH] D51291: [clangd] Support multiple #include headers in one symbol.

2018-08-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! I reduced the scope of the patch. PTAL Comment at: clangd/CodeComplete.cpp:1396 + if (IndexResult && !IndexResult->IncludeHeaders.empty()) { +for (const auto &P : IndexResult->IncludeHeaders) + AddWithInclude(

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-08-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 162902. teemperor added a comment. - Now using UpdateExceptionSpec. - Added a comment to the SemaExceptionSpec.cpp code why we are permitting this. https://reviews.llvm.org/D43871 Files: lib/Headers/mm_malloc.h lib/Sema/SemaExceptionSpec.cpp test/CX

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-08-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor marked 3 inline comments as done. teemperor added inline comments. Comment at: test/CXX/except/except.spec/libc-empty-except.cpp:6 +#include "libc-empty-except.h" + +void f() { bruno wrote: > In a testcase like this but using the actual real headers, if

r340849 - [ubsan] Enable -fsanitize=vptr on Apple devices and simulators

2018-08-28 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Aug 28 11:01:42 2018 New Revision: 340849 URL: http://llvm.org/viewvc/llvm-project?rev=340849&view=rev Log: [ubsan] Enable -fsanitize=vptr on Apple devices and simulators It seems like an oversight that this check was not always enabled for on-device or device simulator

[PATCH] D51239: [ubsan] Enable -fsanitize=vptr on Apple devices and simulators

2018-08-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340849: [ubsan] Enable -fsanitize=vptr on Apple devices and simulators (authored by vedantk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D5

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 162908. nickdesaulniers added a comment. - Take rsmith's sugguested wording. Add info about __GNUC_STDC_INLINE__. Repository: rC Clang https://reviews.llvm.org/D51190 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td Index:

r340854 - Define variables in test case rather than using values from functions

2018-08-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Aug 28 11:18:01 2018 New Revision: 340854 URL: http://llvm.org/viewvc/llvm-project?rev=340854&view=rev Log: Define variables in test case rather than using values from functions emitted ealier. Modified: cfe/trunk/test/CodeGenObjCXX/arc-blocks.mm Modified: cfe/trun

[PATCH] D51321: [Tooling] Improve handling of CL-style options

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for fixing this! Mostly just picky style comments. In particular, I know that some of the other maintainers here are just as ignorant of the cl driver as I am, and I want to make sure that it's still possible to follow the logic and debug unrelated problems with

[PATCH] D51221: [clangd] Some nitpicking around the new split (preamble/main) dynamic index

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added inline comments. Comment at: clangd/ClangdServer.cpp:122 + // - symbols declared both in the main file and the preamble + // (Note that symbols *only* in the main file are not indexed). FileIndex MainFileIdx; -

r340860 - [libFuzzer] Port to Windows

2018-08-28 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Tue Aug 28 11:34:32 2018 New Revision: 340860 URL: http://llvm.org/viewvc/llvm-project?rev=340860&view=rev Log: [libFuzzer] Port to Windows Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-28 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 162918. vsk marked 2 inline comments as done. vsk added a comment. Address the latest round of review feedback. https://reviews.llvm.org/D50927 Files: clang/lib/Sema/SemaLambda.cpp clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp clang/test/CXX/expr

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-28 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1422-1424 auto Entity = InitializedEntity::InitializeLambdaCapture( Var->getIdentifier(), Field->getType(), Loc); InitializationKind InitKind = InitializationKind::CreateDirect(Loc, Loc, Loc);

[PATCH] D49244: Always search sysroot for GCC installs

2018-08-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I think `-gcc-toolchain`, if specified, should simply be taken as the location of the GCC toolchain; we should never go looking for it anywhere else if `-gcc-toolchain` is specified. So I think the patch is not quite right as-is, as it also affects that case. I think the

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162921. hugoeg added a comment. renamed check as suggested https://reviews.llvm.org/D50542 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/NoInternalDependenciesCheck.cpp clang-tidy/abseil/NoInternalDe

  1   2   >