[PATCH] D50814: [clangd] transfer the fixits with the notes instead of adding them to the main diagnostic if request by the client

2018-09-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for the delayed response. It seems we absolutely need this if mirroring libclang is an absolute requirement. We seem to have multiple implementation options: Which classes to use for representing diagnostics? We can: 1. Reuse existing hierarchy for diagnost

Re: [clang-tools-extra] r341375 - [clangd] Define a compact binary serialization fomat for symbol slab/index.

2018-09-04 Thread Mikael Holmén via cfe-commits
Hi Sam, This doesn't compile for me. Both clang 3.6.0 and gcc 5.4.0 complain: [1/6] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/clangDaemon.dir/index/Serialization.cpp.o FAILED: tools/clang/tools/extra/clangd/CMakeFiles/clangDaemon.dir/index/Serialization.cpp.o /usr/bin/cla

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

2018-09-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D50438#1224287, @ilya-biryukov wrote: > @hokein, would it be fine if I submit this change for you? > It would be nice to get this fix in before you get back from vacation. Thanks, and sorry for the delay here, I was planning to submit it afte

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

2018-09-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @hokein, would it be fine if I submit this change for you? It would be nice to get this fix in before you get back from vacation. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50438 ___ cfe-commits ma

[PATCH] D51036: clang-format: Fix formatting C++ namespaces with preceding 'inline' or 'export' specifier

2018-09-04 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D51036#1223254, @sammccall wrote: > In https://reviews.llvm.org/D51036#1223230, @melver wrote: > > > Awaiting remaining reviewer acceptance. > > > > FYI: I do not

Re: r341373 - Fix the -print-multi-directory flag to print the selected multilib.

2018-09-04 Thread Christian BRUEL via cfe-commits
Oh, yes, sure Best Regards Christian On 09/05/2018 12:05 AM, Richard Smith wrote: This is breaking buildbots: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/19509 Can you take a look? Thanks! On Tue, 4 Sep 2018 at 08:36, Christian Bruel via cfe-commits mailto:

[PATCH] D51200: Introduce per-callsite inline intrinsics

2018-09-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Please also teach constant expression evaluation (lib/AST/ExprConstant.cpp) to look through these builtins when evaluating. https://reviews.llvm.org/D51200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 163971. kadircet added a comment. - Update comments. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/CodeCompletion/function-overloads-inside-param.cpp test/CodeCompletion/fun

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 163970. kadircet added a comment. - Update tests. - Update comment. - Rebase. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/CodeCompletion/function-overloads-inside-param.cpp

[PATCH] D51039: [clangd] Add unittests for D51038

2018-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 163968. kadircet added a comment. Rebase Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51039 Files: unittests/clangd/CodeCompleteTests.cpp Index: unittests/clangd/CodeCompleteTests.cpp =

[PATCH] D50947: lambdas in modules: make PendingFakeDefinitionData a set

2018-09-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Serialization/ASTReaderDecl.cpp:1766 + +// FIXME: handle serialized lambdas assert(!DD.IsLambda && !MergeDD.IsLambda && "faked up lambda definition?"); Did you mean to add this FIXME? Comme

[PATCH] D51200: Introduce per-callsite inline intrinsics

2018-09-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D51200#1223768, @kuhar wrote: > In https://reviews.llvm.org/D51200#1223752, @rsmith wrote: > > > +rjmccall for CodeGen changes > > > @rsmith @rjmccall > I have one high-level question about the CodeGen part that I wasn't able to > figure ou

[PATCH] D51608: [modules] when deserializing method, ensure it has correct exception spec

2018-09-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I think this is addressing a symptom rather than the cause. The bug appears to be that when parsing a.h, we end up with inconsistent exception specifications along the redeclaration chain. It looks like `Sema::AdjustDestructorExceptionSpec` doesn't do the right thing whe

[PATCH] D51507: Allow all supportable attributes to be used with #pragma clang attribute.

2018-09-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341437: Allow all supportable non-type attributes to be used with #pragma clang… (authored by rsmith, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.o

r341437 - Allow all supportable non-type attributes to be used with #pragma clang attribute.

2018-09-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 4 17:28:57 2018 New Revision: 341437 URL: http://llvm.org/viewvc/llvm-project?rev=341437&view=rev Log: Allow all supportable non-type attributes to be used with #pragma clang attribute. Summary: We previously disallowed use of undocumented attributes with #pragma cl

[PATCH] D51649: [Sema] Don't warn about omitting unavailable enum constants in a switch

2018-09-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D51649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-09-04 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: lib/Parse/ParseDecl.cpp:244-252 +// If this was declared in a macro, attatch the macro IdentifierInfo to the +// parsed attribute. +for (const auto &MacroPair : PP.getAttributeMacros()) { + if (SourceLocInSourceRange(At

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-09-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I think this patch is nearly ready to commit. However... if you want to handle macros that specify a sequence of attributes, we should switch to treating the macro name as a separate type sugar node rather than modeling it as a name for the `AttributedType` node. Up to y

[PATCH] D51391: [clang-cl,PCH] Add support for #pragma hdrstop

2018-09-04 Thread Mike Rice via Phabricator via cfe-commits
mikerice added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:2862 + Opts.PCHWithHdrStopCreate = + Args.getLastArgValue(OPT_pch_through_hdrstop_EQ) == "create"; Opts.PCHThroughHeader = Args.getLastArgValue(OPT_pch_through_header_EQ); ha

[PATCH] D51391: [clang-cl,PCH] Add support for #pragma hdrstop

2018-09-04 Thread Mike Rice via Phabricator via cfe-commits
mikerice updated this revision to Diff 163946. mikerice marked 7 inline comments as done. mikerice added a comment. Thanks for the review. Updated based on comments from Hans. https://reviews.llvm.org/D51391 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Basic/Diagnostic

[PATCH] D51554: [CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

2018-09-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In https://reviews.llvm.org/D51554#1224049, @echristo wrote: > The change in name here from "line tables" to "directives only" feels a bit > confusing. "Limited" seems to be a bit more clear, or even remaining line > tables only. Can you explain where you were going w

[PATCH] D51554: [CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

2018-09-04 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a reviewer: dblaikie. echristo added a comment. The change in name here from "line tables" to "directives only" feels a bit confusing. "Limited" seems to be a bit more clear, or even remaining line tables only. Can you explain where you were going with this particular set of cha

r341421 - [ODRHash] Extend hash to support all Type's.

2018-09-04 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Sep 4 15:53:19 2018 New Revision: 341421 URL: http://llvm.org/viewvc/llvm-project?rev=341421&view=rev Log: [ODRHash] Extend hash to support all Type's. Added: cfe/trunk/test/Modules/odr_hash-gnu.cpp cfe/trunk/test/Modules/odr_hash-vector.cpp cfe/trunk/test/Mo

r341418 - Revert r341373, since it fails on some targets.

2018-09-04 Thread Tim Shen via cfe-commits
Author: timshen Date: Tue Sep 4 15:20:11 2018 New Revision: 341418 URL: http://llvm.org/viewvc/llvm-project?rev=341418&view=rev Log: Revert r341373, since it fails on some targets. Differential Revision: https://reviews.llvm.org/D51354 Removed: cfe/trunk/test/Driver/print-multi-directory.c

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

2018-09-04 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. > The test fails on my system like so: I also observed the same failure. Bots also fail: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/19509/steps/check-all/logs/FAIL%3A%20Clang%3A%3Aprint-multi-directory.c I'm going to revert this patch.

Re: r341373 - Fix the -print-multi-directory flag to print the selected multilib.

2018-09-04 Thread Richard Smith via cfe-commits
This is breaking buildbots: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/19509 Can you take a look? Thanks! On Tue, 4 Sep 2018 at 08:36, Christian Bruel via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: chrib > Date: Tue Sep 4 08:22:13 2018 > New Re

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-09-04 Thread Francois JEAN via Phabricator via cfe-commits
Wawha marked an inline comment as done. Wawha added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1307 + (Style.BraceWrapping.BeforeLambdaBody && Current.Next != nullptr && +Current.Next->is(TT_LambdaLSquare))); State.Stack.back().IsInsideObjCA

[PATCH] D51657: [CMake] Link to compiler-rt if LIBUNWIND_USE_COMPILER_RT is ON.

2018-09-04 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x created this revision. cdavis5x added a reviewer: beanz. Herald added subscribers: cfe-commits, chrib, christof, mgorny, dberris. If `-nodefaultlibs` is given, we weren't actually linking to it. This was true irrespective of passing `-rtlib=compiler-rt` (see previous patch). Now we explic

[PATCH] D51645: [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs.

2018-09-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rUNW341404: [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs. (authored by cdavis, committed by ). Changed prior to commit: https://reviews.llvm.org/D51645?vs=163864&id=163907#toc Repository: r

[libunwind] r341404 - [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs.

2018-09-04 Thread Charles Davis via cfe-commits
Author: cdavis Date: Tue Sep 4 13:57:50 2018 New Revision: 341404 URL: http://llvm.org/viewvc/llvm-project?rev=341404&view=rev Log: [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs. Summary: This switch only has an effect at link time. It changes the default compiler support library to `

[PATCH] D51645: [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs.

2018-09-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM. Repository: rUNW libunwind https://reviews.llvm.org/D51645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D51507: Allow all supportable attributes to be used with #pragma clang attribute.

2018-09-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. LGTM, Thank you! Repository: rC Clang https://reviews.llvm.org/D51507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51576: Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames)

2018-09-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Looks good to me & the answers to others various questions seem well addressed. Repository: rC Clang https://reviews.llvm.org/D51576 ___ c

[PATCH] D51507: Allow all supportable attributes to be used with #pragma clang attribute.

2018-09-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Thank you for pointing out that the new form of type attributes aren't automatically opted in from this change. With that (and the two problematic attributes opted out), this LGT

[PATCH] D51200: Introduce per-callsite inline intrinsics

2018-09-04 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added a comment. Thank you for the comments, Richard! In https://reviews.llvm.org/D51200#1223745, @rsmith wrote: > Have you considered whether the builtin should apply to `new` expressions? > (There are potentially three different top-level calls implied by a `new` > expression -- an `op

[PATCH] D51576: Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames)

2018-09-04 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. In https://reviews.llvm.org/D51576#1223562, @labath wrote: > The interactions here are a bit weird, but the short answer is no, this will > not affect apple tables in any way. Then I have no problem with this patch :-) Repository: rC Clang https://reviews.llvm.org

[PATCH] D51200: Introduce per-callsite inline intrinsics

2018-09-04 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added a comment. In https://reviews.llvm.org/D51200#1223752, @rsmith wrote: > +rjmccall for CodeGen changes @rsmith @rjmccall I have one high-level question about the CodeGen part that I wasn't able to figure out: is it possible to bail out of custom CodeGen in CGBuiltin and somehow sa

[PATCH] D51655: [analyzer] Remove traces of ubigraph visualization

2018-09-04 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: dcoughlin, NoQ. Herald added subscribers: Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, whisperity. Ubigraph project has been dead since about 2008, and to the best of my knowledge, no one w

[PATCH] D51200: Introduce per-callsite inline intrinsics

2018-09-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. +rjmccall for CodeGen changes https://reviews.llvm.org/D51200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51200: Introduce per-callsite inline intrinsics

2018-09-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. > Support for constructor calls (`CXXTemporaryExpr`) should also be possible, > but is not the part of this patch. (You should handle the base class (`CXXConstructExpr`) that describes the semantics, rather than the derived class (`CXXTemporaryObjectExpr`) that describe

[PATCH] D51575: [clang-tidy] Implement a clang-tidy check to verify Google Objective-C function naming conventions 📜

2018-09-04 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added inline comments. Comment at: clang-tidy/google/FunctionNamingCheck.cpp:50 + +void FunctionNamingCheck::registerMatchers(MatchFinder *Finder) { + // This check should only be applied to Objective-C sources. Can we do some simple check to see if some

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-09-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/include/llvm/Support/Allocator.h:295 +int64_t TotalSlabOffset = 0; +for (size_t Idx = 0; Idx < Slabs.size(); Idx++) { + const char *S = reinterpret_cast(Slabs[Idx]); for (size_t Idx = 0, e = Slabs.size

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-09-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: llvm/include/llvm/Support/Allocator.h:304 +// Use negative index to denote custom sized slabs. +int64_t CustomSlabOffset = 0; +for (size_t Idx = 0; Idx < CustomSizedSlabs.size(); Idx++) { We should start with -1

[PATCH] D51575: [clang-tidy] Implement a clang-tidy check to verify Google Objective-C function naming conventions 📜

2018-09-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/google/FunctionNamingCheck.cpp:57 + functionDecl( + isDefinition(), + unless(anyOf(isMain(), matchesName(validFunctionNameRegex(true)), stephanemoore wrote: > hokein wrote: > > any reason

[PATCH] D51645: [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs.

2018-09-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: beanz. mstorsjo added a comment. Sounds sensible to me, although it might be good with a second opinion I think. @beanz? Repository: rUNW libunwind https://reviews.llvm.org/D51645 ___ cfe-commits mailing list cfe-com

[PATCH] D50958: [clangd] Implement findReferences function

2018-09-04 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. Thanks, looks good from my side. Comment at: clangd/XRefs.cpp:328 + : AST(AST) { +for (const Decl *D : TargetDecls) + Targets.insert(D); nit: w

[PATCH] D51567: CMake: Consolidate gtest detection code

2018-09-04 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. In https://reviews.llvm.org/D51567#1222704, @chandlerc wrote: > I mean, sure. > > I really don't know that supporting this ever expanding diversity of build > strategies is worth its cost, but I don't see a specific reason to not take > this patch I actually agre

[PATCH] D51650: Implement target_clones multiversioning

2018-09-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: thiagomacieira, aaron.ballman. As discussed here: https://lwn.net/Articles/691932/ GCC6.0 adds target_clones multiversioning. This functionality is an odd cross between the cpu_dispatch and 'target' MV, but is compatible with neither.

[PATCH] D51576: Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames)

2018-09-04 Thread Pavel Labath via Phabricator via cfe-commits
labath added a comment. In https://reviews.llvm.org/D51576#1223596, @clayborg wrote: > We want to ensure that both Apple and DWARF5 tables never get generated > though. That would waste a lot of space. I would say if DWARF5 tables are > enabled, then we need ensure we disable Apple tables. Th

[PATCH] D51576: Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames)

2018-09-04 Thread Greg Clayton via Phabricator via cfe-commits
clayborg added a comment. Actually, we might need to still emit some Apple tables as the objective C and namespace tables might still be needed even with the DWARF5 tables. Repository: rC Clang https://reviews.llvm.org/D51576 ___ cfe-commits mai

[PATCH] D51576: Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames)

2018-09-04 Thread Greg Clayton via Phabricator via cfe-commits
clayborg added a comment. We want to ensure that both Apple and DWARF5 tables never get generated though. That would waste a lot of space. I would say if DWARF5 tables are enabled, then we need ensure we disable Apple tables. Repository: rC Clang https://reviews.llvm.org/D51576 _

[PATCH] D51416: [RTTI] Align rtti types to prevent over-alignment

2018-09-04 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. getClassPointerAlignment is not really relevant here; that's the alignment of a pointer to an object with the type of the class. For the LLVM IR structs which don't have a corresponding clang type, you can probably just use DataLayout::getABITypeAlignment(). I think t

[PATCH] D51649: [Sema] Don't warn about omitting unavailable enum constants in a switch

2018-09-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: arphaman. Herald added a subscriber: dexonsmith. rdar://42717026 Thanks for taking a look! Repository: rC Clang https://reviews.llvm.org/D51649 Files: clang/lib/Sema/SemaStmt.cpp clang/test/Sema/switch-availability

[PATCH] D51440: [ToolChains] Link to compiler-rt with -L + -l when possible

2018-09-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a subscriber: dexonsmith. beanz added a comment. Unfortunately I can't make this kind of policy decision about whether or not this would be acceptable for Darwin. That would probably need to be @dexonsmith. Repository: rC Clang https://reviews.llvm.org/D51440 _

[PATCH] D51576: Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames)

2018-09-04 Thread Pavel Labath via Phabricator via cfe-commits
labath added a comment. In https://reviews.llvm.org/D51576#1223234, @aprantl wrote: > This is DWARF5+ only, right? (We shouldn't change the preference of Apple > accelerator tables for DWARF 4 and earlier). The interactions here are a bit weird, but the short answer is no, this will not affec

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2018-09-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D50488#1207398, @Szelethus wrote: > In https://reviews.llvm.org/D50488#1204655, @mgrang wrote: > > > This is my first time with ASTMatchers and I am not sure how to get the > > value_type from hasType (I don't see a matcher for value_types in

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2018-09-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D50488#1222837, @whisperity wrote: > > I'm not sure if we discussed, has this checker been tried on some in-the-wild > examples? To see if there are some real findings or crashes? > There is a good selection of projects here in this tool:

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like keys

2018-09-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 163876. mgrang added a comment. Addressed comments. https://reviews.llvm.org/D50488 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp test/Analysi

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-09-04 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 163871. ahatanak marked 2 inline comments as done. ahatanak added a comment. Point the diagnostic at either the relevant init list element or at the close brace. Repository: rC Clang https://reviews.llvm.org/D45898 Files: lib/Sema/SemaInit.cpp test

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-09-04 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaInit.cpp:1827-1829 + if (SemaRef.DiagnoseUseOfDecl(Destructor, Loc)) +return false; + return true; rsmith wrote: > Usual Clang convention is to return `true` on error. I also renamed the function to h

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

2018-09-04 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. The test fails on my system like so: -- FAIL: Clang :: Driver/print-multi-directory.c (4696 of 13174) TEST 'Clang :: Driver/print-multi-directory.c' FAILED Script: -- : 'RUN: at line 1'; /u

[PATCH] D51635: clang-cl: Pass /Brepro to linker if it was passed to the compiler

2018-09-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341390: clang-cl: Pass /Brepro to linker if it was passed to the compiler (authored by nico, committed by ). Changed prior to commit: https://reviews.llvm.org/D51635?vs=163829&id=163870#toc Repository:

r341390 - clang-cl: Pass /Brepro to linker if it was passed to the compiler

2018-09-04 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Sep 4 11:00:14 2018 New Revision: 341390 URL: http://llvm.org/viewvc/llvm-project?rev=341390&view=rev Log: clang-cl: Pass /Brepro to linker if it was passed to the compiler Differential Revision: https://reviews.llvm.org/D51635 Modified: cfe/trunk/lib/Driver/ToolChain

[PATCH] D50229: +fp16fml feature for ARM and AArch64

2018-09-04 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Do you expect that the regression tests will be affected by the TargetParser fixes? If not, I guess this is okay... but please add clear comments explaining which bits of code you expect to go away after the TargetParser rewrite. Repository: rC Clang https://revi

[PATCH] D51645: [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs.

2018-09-04 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x created this revision. cdavis5x added reviewers: mstorsjo, rnk. Herald added subscribers: cfe-commits, christof, mgorny, dberris. This switch only has an effect at link time. It changes the default compiler support library to `compiler-rt`. With `-nodefaultlibs`, this library won't get li

[PATCH] D51644: [CMake] Remove variable reference that isn't used.

2018-09-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341388: [CMake] Remove variable reference that isn't used. (authored by cdavis, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D51644 Files: li

[libunwind] r341388 - [CMake] Remove variable reference that isn't used.

2018-09-04 Thread Charles Davis via cfe-commits
Author: cdavis Date: Tue Sep 4 10:40:26 2018 New Revision: 341388 URL: http://llvm.org/viewvc/llvm-project?rev=341388&view=rev Log: [CMake] Remove variable reference that isn't used. Summary: This variable is never defined, so its value is always empty. Since `libunwind` is needed to build the C

[PATCH] D51300: [analyzer][UninitializedObjectChecker] No longer using nonloc::LazyCompoundVal

2018-09-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D51300#1220537, @Szelethus wrote: > Would you be comfortable me commiting this without that assert Yup sure. In https://reviews.llvm.org/D51300#1223042, @Szelethus wrote: > I'm not even sure how this is possible -- and unfortunately I've been u

[PATCH] D51644: [CMake] Remove variable reference that isn't used.

2018-09-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added inline comments. This revision is now accepted and ready to land. Comment at: src/CMakeLists.txt:54 # Generate library list. -set(libraries ${LIBUNWINDCXX_ABI_LIBRARIES}) +set(libraries) append_if(libraries LIBUNWIND_HAS_C_LIB c)

[PATCH] D51641: [VFS] Cache the current working directory for the real FS.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Basic/VirtualFileSystem.cpp:275 return EC; - return Dir.str().str(); + CWDCache = Dir.str(); + return CWDCache; sammccall wrote: > Doesn't this need to be guarded by a lock? I know the current version is > th

[PATCH] D51641: [VFS] Cache the current working directory for the real FS.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 163858. ioeric marked an inline comment as done. ioeric added a comment. - Guard CWDCache with mutex. Repository: rC Clang https://reviews.llvm.org/D51641 Files: lib/Basic/VirtualFileSystem.cpp Index: lib/Basic/VirtualFileSystem.cpp ==

[PATCH] D51644: [CMake] Remove variable reference that isn't used.

2018-09-04 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x added inline comments. Comment at: src/CMakeLists.txt:54 # Generate library list. -set(libraries ${LIBUNWINDCXX_ABI_LIBRARIES}) +set(libraries) append_if(libraries LIBUNWIND_HAS_C_LIB c) mstorsjo wrote: > Is there any point in this line at all now, or

[PATCH] D51644: [CMake] Remove variable reference that isn't used.

2018-09-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/CMakeLists.txt:54 # Generate library list. -set(libraries ${LIBUNWINDCXX_ABI_LIBRARIES}) +set(libraries) append_if(libraries LIBUNWIND_HAS_C_LIB c) Is there any point in this line at all now, or can it be removed

[PATCH] D51644: [CMake] Remove variable reference that isn't used.

2018-09-04 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x created this revision. cdavis5x added reviewers: mstorsjo, rnk. Herald added subscribers: cfe-commits, christof, mgorny. This variable is never defined, so its value is always empty. Since `libunwind` is needed to build the C++ ABI library in the first place, it should never be linked to

[PATCH] D51501: [CUDA] Fix CUDA compilation broken by D50845

2018-09-04 Thread Artem Belevich via Phabricator via cfe-commits
tra abandoned this revision. tra added a comment. > Not needed anymore after the reverts in https://reviews.llvm.org/rC341115 and > https://reviews.llvm.org/rC341118, right? Correct. https://reviews.llvm.org/D51501 ___ cfe-commits mailing list cfe

[PATCH] D51641: [VFS] Cache the current working directory for the real FS.

2018-09-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: lib/Basic/VirtualFileSystem.cpp:275 return EC; - return Dir.str().str(); + CWDCache = Dir.str(); + return CWDCache; Doesn't this need to be guarded by a lock? I know the current version is thread-hostile in pr

[PATCH] D51633: [ASTImporter] Added error handling for AST import.

2018-09-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. This patch is huge, but we change here almost all implementation functions of `ASTNodeImporter` to return with either `Error` or with `Expected`. We could not really come up with a cohesive but smaller patch because of the recursive nature of the importer. (We are open t

[PATCH] D51638: [clangd] Load static index asynchronously, add tracing.

2018-09-04 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341376: [clangd] Load static index asynchronously, add tracing. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51638?

[PATCH] D51641: [VFS] Cache the current working directory for the real FS.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D51641 Files: lib/Basic/VirtualFileSystem.cpp Index: lib/Basic/VirtualFileSystem.cpp =

[clang-tools-extra] r341376 - [clangd] Load static index asynchronously, add tracing.

2018-09-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Sep 4 09:19:40 2018 New Revision: 341376 URL: http://llvm.org/viewvc/llvm-project?rev=341376&view=rev Log: [clangd] Load static index asynchronously, add tracing. Summary: Like D51475 but simplified based on recent patches. While here, clarify that loadIndex() takes a

[PATCH] D51585: [clangd] Define a compact binary serialization fomat for symbol slab/index.

2018-09-04 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341375: [clangd] Define a compact binary serialization fomat for symbol slab/index. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

[clang-tools-extra] r341375 - [clangd] Define a compact binary serialization fomat for symbol slab/index.

2018-09-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Sep 4 09:16:50 2018 New Revision: 341375 URL: http://llvm.org/viewvc/llvm-project?rev=341375&view=rev Log: [clangd] Define a compact binary serialization fomat for symbol slab/index. Summary: This is intended to replace the current YAML format for general use. It's ~1

[PATCH] D50672: [ASTImporter] Change the return result of Decl import to Optional

2018-09-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Here is the `Expected` based patch: https://reviews.llvm.org/D51633 Repository: rC Clang https://reviews.llvm.org/D50672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D51475: [clangd] Load YAML static index asynchronously.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric abandoned this revision. ioeric added a comment. Dropping this in favor of https://reviews.llvm.org/D51638 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D51638: [clangd] Load static index asynchronously, add tracing.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg. Thanks! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

[PATCH] D51638: [clangd] Load static index asynchronously, add tracing.

2018-09-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Like https://reviews.llvm.org/D51475 but simplified based on recent patches. While here, clarify that loadIndex() takes a filename, not

[PATCH] D50147: clang-format: support external styles

2018-09-04 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. clang-format does indeed support .clang-format, which is great for *isolated* projects, and which is not affected by this patch. This patch addresses the issue of *centralizing* the definition of styles, e.g. allowing individual projects to reference externally defined sty

[PATCH] D51636: [clangd] NFC: Change quality type to float

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE341374: [clangd] NFC: Change quality type to float (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D51636?vs=163833&id=163837#toc Repository: rCTE Clang Tool

[clang-tools-extra] r341374 - [clangd] NFC: Change quality type to float

2018-09-04 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Tue Sep 4 08:45:56 2018 New Revision: 341374 URL: http://llvm.org/viewvc/llvm-project?rev=341374&view=rev Log: [clangd] NFC: Change quality type to float Reviewed by: sammccall Differential Revision: https://reviews.llvm.org/D51636 Modified: clang-tools-extra/trunk/cl

[PATCH] D51585: [clangd] Define a compact binary serialization fomat for symbol slab/index.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D51636: [clangd] NFC: Change quality type to float

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In https://reviews.llvm.org/D51636#1223204, @sammccall wrote: > If it's not too expensive, we can use the symbol quality metrics (from > Quality.h) to do a more accurate prescore. Worth a benchmark :-) Yes, I agree. We can investigate that quality/performance trade-of

[PATCH] D51036: clang-format: Fix formatting C++ namespaces with preceding 'inline' or 'export' specifier

2018-09-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D51036#1223230, @melver wrote: > Awaiting remaining reviewer acceptance. > > FYI: I do not have commit commit access -- what is the procedure to commit > once diff is accepted? > > Many thanks! Anyone with commit access can land it for you

[PATCH] D51585: [clangd] Define a compact binary serialization fomat for symbol slab/index.

2018-09-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 163836. sammccall marked an inline comment as done. sammccall added a comment. address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51585 Files: clangd/CMakeLists.txt clangd/RIFF.cpp clangd/RIFF.h clangd/global-s

[PATCH] D51585: [clangd] Define a compact binary serialization fomat for symbol slab/index.

2018-09-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: clangd/index/Serialization.cpp:50 + +void writeVar(uint32_t I, raw_ostream &OS) { + constexpr static uint8_t More = 1 << 7; ioeric wrote: > This function could use a comment

[PATCH] D51635: clang-cl: Pass /Brepro to linker if it was passed to the compiler

2018-09-04 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. I suppose the alternative would be to make /Brepro a non-alias flag, expand it to -mno-incremental-linker-compatible for the cc1 invocation and look for it for the linker invocation. But this is

r341373 - Fix the -print-multi-directory flag to print the selected multilib.

2018-09-04 Thread Christian Bruel via cfe-commits
Author: chrib Date: Tue Sep 4 08:22:13 2018 New Revision: 341373 URL: http://llvm.org/viewvc/llvm-project?rev=341373&view=rev Log: Fix the -print-multi-directory flag to print the selected multilib. Summary: Fix -print-multi-directory to print the selected multilib Reviewers: jroelofs Reviewed

[PATCH] D51576: Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames)

2018-09-04 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. This is DWARF5+ only, right? (We shouldn't change the preference of Apple accelerator tables for DWARF 4 and earlier). Repository: rC Clang https://reviews.llvm.org/D51576 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D51036: clang-format: Fix formatting C++ namespaces with preceding 'inline' or 'export' specifier

2018-09-04 Thread Marco Elver via Phabricator via cfe-commits
melver added a comment. Awaiting remaining reviewer acceptance. FYI: I do not have commit commit access -- what is the procedure to commit once diff is accepted? Many thanks! Repository: rC Clang https://reviews.llvm.org/D51036 ___ cfe-commits

[PATCH] D50958: [clangd] Implement findReferences function

2018-09-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Oops, and I rebased on head (Occurrences -> Refs) of course. @ilya-biryukov @ioeric, any interest in taking over review here? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50958 ___ cfe-commits mailing l

[PATCH] D51585: [clangd] Define a compact binary serialization fomat for symbol slab/index.

2018-09-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Super cool! Just a few nits. Comment at: clangd/RIFF.cpp:58 + if (RIFF->ID != fourCC("RIFF")) +return makeError("Extra content after RIFF chunk"); + if (RIFF->Data.size() < 4) The error message seems wrong? Comme

  1   2   >