[PATCH] D84322: [AST][RecoveryExpr] Part3: Support dependent conditional operators in C for error recovery.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/test/Sema/error-dependence.c:18 + // type is required" is not emitted. + ptr > f ? ptr : f; // expected-error {{invalid operands to binary expression}} +} sammccall wrote: > hokein wrote: > > sammccall wrote: > >

[PATCH] D84322: [AST][RecoveryExpr] Part3: Support dependent conditional operators in C for error recovery.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 296609. hokein marked 2 inline comments as done. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84322/new/ https://reviews.llvm.org/D84322 Files: clang/lib/Sema/SemaExp

[PATCH] D84322: [AST][RecoveryExpr] Part3: Support dependent conditional operators in C for error recovery.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG334ec6f807fa: [AST][RecoveryExpr] Support dependent conditional operators in C for error… (authored by hokein). Repository: rG LLVM Github Monorep

[clang] 334ec6f - [AST][RecoveryExpr] Support dependent conditional operators in C for error recovery.

2020-10-07 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-10-07T09:33:57+02:00 New Revision: 334ec6f807fa65e09571fa42a0c3be0eb39e7c0f URL: https://github.com/llvm/llvm-project/commit/334ec6f807fa65e09571fa42a0c3be0eb39e7c0f DIFF: https://github.com/llvm/llvm-project/commit/334ec6f807fa65e09571fa42a0c3be0eb39e7c0f.diff LO

[PATCH] D84387: [AST][RecoveryExpr] Part4: Suppress spurious "err_typecheck_expect_scalar_operand" diagnostic

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 296611. hokein marked an inline comment as done. hokein added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84387/new/ https://reviews.llvm.org/D84387 Files: clang/lib/Sema/SemaCast.cpp cl

[PATCH] D84387: [AST][RecoveryExpr] Part4: Suppress spurious "err_typecheck_expect_scalar_operand" diagnostic

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > I'm not sure I love having the assertion for contains-errors every place that > handles dependent code in C. My feeling is that the assertion would help for understanding the code (comparing with documenting it somewhere), and we don't have too many places. Repositor

[clang] 31dc908 - [clang] Use isCompoundAssignmentOp to simplify the code, NFC.

2020-10-07 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-10-07T09:50:43+02:00 New Revision: 31dc90801746e12d6ae1f967f455cf43a5bbb039 URL: https://github.com/llvm/llvm-project/commit/31dc90801746e12d6ae1f967f455cf43a5bbb039 DIFF: https://github.com/llvm/llvm-project/commit/31dc90801746e12d6ae1f967f455cf43a5bbb039.diff LO

[PATCH] D88472: [clangd] Don't set the Underlying bit on targets of UsingDecls.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 296612. hokein marked 2 inline comments as done. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88472/new/ https://reviews.llvm.org/D88472 Files: clang-tools-extra/cla

[PATCH] D88472: [clangd] Don't set the Underlying bit on targets of UsingDecls.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:1121 namespace ns { class [[Foo]] {}; } - using ns::F^oo; + using ns::[[F^oo]]; )cpp", sammccall wrote: > I'd like to make a plan to solve this regre

[clang-tools-extra] f24649b - [clangd] Don't set the Underlying bit on targets of UsingDecls.

2020-10-07 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-10-07T10:01:04+02:00 New Revision: f24649b77d856157c64841457dcc4f70530d607c URL: https://github.com/llvm/llvm-project/commit/f24649b77d856157c64841457dcc4f70530d607c DIFF: https://github.com/llvm/llvm-project/commit/f24649b77d856157c64841457dcc4f70530d607c.diff LO

[PATCH] D88472: [clangd] Don't set the Underlying bit on targets of UsingDecls.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf24649b77d85: [clangd] Don't set the Underlying bit on targets of UsingDecls. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D88949: DeferredDiagnosticsEmitter crashes

2020-10-07 Thread Geoff Levner via Phabricator via cfe-commits
glevner created this revision. glevner added reviewers: lhames, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. glevner requested review of this revision. Patch VisitCXXDeleteExpr() in clang::UsedDeclVisitor to avoid it crashing when the expression's destroyed type

[PATCH] D88949: DeferredDiagnosticsEmitter crashes

2020-10-07 Thread Geoff Levner via Phabricator via cfe-commits
glevner added a comment. See https://bugs.llvm.org/show_bug.cgi?id=47742 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88949/new/ https://reviews.llvm.org/D88949 ___ cfe-commits mailing list cfe-commits@

[PATCH] D87279: [clang] Fix handling of physical registers in inline assembly operands.

2020-10-07 Thread Jonas Paulsson via Phabricator via cfe-commits
jonpa updated this revision to Diff 296618. jonpa marked an inline comment as done. jonpa added a comment. Updated per review by eliminating the call to 'count'. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87279/new/ https://reviews.llvm.org/D87279 Files: clang/lib/CodeGen/CGStmt.c

[PATCH] D87279: [clang] Fix handling of physical registers in inline assembly operands.

2020-10-07 Thread Jonas Paulsson via Phabricator via cfe-commits
jonpa added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2090 +CGM.Error(S.getAsmLoc(), "Multiple outputs to hard register: " + GCCReg); + PhysRegOutputs.insert(GCCReg); +} craig.topper wrote: > Can we get rid of the count call abov

[PATCH] D88881: [clangd] Add a NewName optional parameter to clangdServer::prepareRename.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 296622. hokein marked an inline comment as done. hokein added a comment. make NewName optional. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1/new/ https://reviews.llvm.org/D1 Files: clang-tools-extr

[PATCH] D88881: [clangd] Add a NewName optional parameter to clangdServer::prepareRename.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D1#2313863 , @sammccall wrote: > Can you add a bit more context to the commit message? > > And should we expose this as an extension on `textDocument/prepareRename`? no needed right now. AFAIK, there are no lsp clients that

[PATCH] D88916: [AMDGPU] Add gfx602, gfx705, gfx805 targets

2020-10-07 Thread Tim Renouf via Phabricator via cfe-commits
tpr updated this revision to Diff 296623. tpr added a comment. Herald added subscribers: cfe-commits, jholewinski. Herald added a project: clang. V2: Add clang changes. Put TargetParser list in order. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 296625. sepavloff marked an inline comment as done. sepavloff added a comment. Add default argument for parameter Output in constructors of Command* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78902/new/ ht

[PATCH] D85354: [clangd] Reduce availability of extract function

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:291 + llvm::SmallSet DeclsInExtZone; + for (const Node *Child : ExtZone.Parent->Children) { +auto *RootStmt = Child->ASTNode.get(); sammccall wrote: > I

[PATCH] D88088: [clang] improve accuracy of ExprMutAnalyzer

2020-10-07 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 296628. JonasToth added a comment. - fix imprecisions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88088/new/ https://reviews.llvm.org/D88088 Files: clang/lib/Analysis/ExprMutationAnalyzer.cpp clang/uni

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/include/clang/Driver/Job.h:165 + const llvm::opt::ArgStringList &Arguments, ArrayRef Inputs, + ArrayRef Outputs); // FIXME: This really shouldn't be copyable, but is currently copied in some

[PATCH] D88680: Add ability to turn off -fpch-instantiate-templates in clang-cl

2020-10-07 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D88680#2314415 , @hans wrote: > I've committed this as 66e4f07198761bbb4dcd55235024c1081ed15c75 > so it > has a chance to make it into the 11.0.0 release. Pus

[PATCH] D88952: [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: klimek, sammccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. While debugging a different clang-format failure, I tried to reuse the MacroExpander lexer, but w

[PATCH] D84304: [AST][RecoveryExpr] Part 2: Build dependent callexpr in C for error-recovery.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 296633. hokein marked 4 inline comments as done. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84304/new/ https://reviews.llvm.org/D84304 Files: clang/lib/Sema/SemaEx

[PATCH] D84304: [AST][RecoveryExpr] Part 2: Build dependent callexpr in C for error-recovery.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 296634. hokein added a comment. fix format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84304/new/ https://reviews.llvm.org/D84304 Files: clang/lib/Sema/SemaExpr.cpp clang/test/AST/ast-dump-recovery.c c

[PATCH] D84304: [AST][RecoveryExpr] Part 2: Build dependent callexpr in C for error-recovery.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:6444 + "should only occur in error-recovery path."); +return CallExpr::Create(Context, Fn, ArgExprs, Context.DependentTy, +VK_RValue, RParenLoc); s

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86959#2313631 , @sammccall wrote: > Sorry to be really late here, but this patch regressed some macro definitions > like: > > #define lambda [](const decltype(x) &ptr) {} > > which now formats as > > #define lambda [](

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:139 + + switch (E->getStmtClass()) { + case Stmt::UnaryOperatorClass: { Actually this is not correct, because subclass relations are not preserved in this case. For instance, `C

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, sammccall, klimek, JakeMerdichAMD, curdeius. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. arichardson requested review of this revision. After D86959 the

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 296640. arichardson added a comment. remove unneccessary include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88956/new/ https://reviews.llvm.org/D88956 Files: clang/lib/Format/TokenAnnotator.cpp clan

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86959#2316351 , @arichardson wrote: > In D86959#2313631 , @sammccall wrote: > >> Sorry to be really late here, but this patch regressed some macro >> definitions like: >> >> #defi

[PATCH] D88949: DeferredDiagnosticsEmitter crashes

2020-10-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can we have a lit test? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88949/new/ https://reviews.llvm.org/D88949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78902/new/ https://reviews.llvm.org/D78902

[PATCH] D72932: [ARM] Follow AACPS standard for volatile bit-fields access width

2020-10-07 Thread Ties Stuij via Phabricator via cfe-commits
stuij reopened this revision. stuij added a comment. This revision is now accepted and ready to land. Reopening as this commit made clang/test/CodeGen/volatile.c fail on Arm/AArch64 buildbot hosts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7293

[PATCH] D88949: DeferredDiagnosticsEmitter crashes

2020-10-07 Thread Geoff Levner via Phabricator via cfe-commits
glevner added a comment. I'm sorry, but I don't know how to reproduce the problem in isolation. We are JIT-compiling fairly complex C++ code, and the crash //sometimes// occurs when, for example, an included header file is not found... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D88831: [clang-tidy] Remove obsolete checker google-runtime-references

2020-10-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a subscriber: hans. lebedev.ri added a comment. @hans it would be nice if this could make it into the release, removing stuff is usually a pretty safe thing to do :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88831/new/ https://

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8333 +TEST_F(FormatTest, UnderstandsUsesOfStarAndAmpInMacroDefinition) { + // This is a regression test for mis-parsing the & after decltype as a binary I'd put this into a new tes

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8333 +TEST_F(FormatTest, UnderstandsUsesOfStarAndAmpInMacroDefinition) { + // This is a regression test for mis-parsing the & after decltype as a binary klimek wrote: > I'd pu

[PATCH] D84962: [PowerPC] Correct cpsgn's behaviour on PowerPC to match that of the ABI

2020-10-07 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-vsx.c:1 -// REQUIRES: powerpc-registered-target +// requires: powerpc-registered-target // RUN: %clang_cc1 -target-feature +altivec -target-feature +vsx -triple powerpc64-unknown-unknown -emit-llvm %s -

[PATCH] D88831: [clang-tidy] Remove obsolete checker google-runtime-references

2020-10-07 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D88831#2316453 , @lebedev.ri wrote: > @hans it would be nice if this could make it into the release, > removing stuff is usually a pretty safe thing to do :) I think it's too late for this release, sorry. I also don't see any part

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-10-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D88275#2313342 , @ymandel wrote: > In D88275#2305989 , @aaron.ballman > wrote: > >> In D88275#2303283 , @ymandel wrote: >> I'm not con

[PATCH] D88916: [AMDGPU] Add gfx602, gfx705, gfx805 targets

2020-10-07 Thread Tim Renouf via Phabricator via cfe-commits
tpr updated this revision to Diff 296648. tpr added a comment. V3: AMDGCNGPUs table in TargetParser.cpp needs to be in GPUKind order, so fix the GPUKind order. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88916/new/ https://reviews.llvm.org/D88

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D88275#2316484 , @aaron.ballman wrote: > Thank you for your patience while we sort this out. I've pinged @steveire > off-list, so hopefully he'll respond with his thoughts. If we don't hear from > Stephen in the next week or

[PATCH] D17053: [libcxx]: vector: Use < instead of != to improve failure mode

2020-10-07 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D17053#2315384 , @dexonsmith wrote: > In D17053#632700 , @EricWF wrote: > >> Maybe if we want to improve the failure mode we can add a >> `_LIBCPP_ASSERT(__new_last <= __end, "invalid ran

[PATCH] D17053: [libcxx]: vector: Use < instead of != to improve failure mode

2020-10-07 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Also, regarding `allocator::pointer` vs raw pointers -- if someone defines a fancy pointer type whose `operator<` is significantly more costly than `operator!=`, I think this loop in libc++ is not the first thing that's going to bite them. I don't think that's the right

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8333 +TEST_F(FormatTest, UnderstandsUsesOfStarAndAmpInMacroDefinition) { + // This is a regression test for mis-parsing the & after decltype as a binary arichardson wrote: > aricha

[PATCH] D88952: [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords

2020-10-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. Nice catch, thanks! LG! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88952/new/ https://reviews.llvm.org/D88952 __

[PATCH] D88963: [SystemZ][z/OS] Add test of zero length bitfield type larger than zero length bitfield boundary

2020-10-07 Thread Fanbo Meng via Phabricator via cfe-commits
fanbo-meng created this revision. fanbo-meng added reviewers: abhina.sreeskantharajan, hubert.reinterpretcast. Herald added a project: clang. Herald added a subscriber: cfe-commits. fanbo-meng requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D88963

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2020-10-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Despite my earlier happiness with the patch, it's now a bit unclear to me from the C++ Core Guideline wording what the right behavior here actually is. The bounds profile is trying to ensure you don't access out-of-range elements of a container and the decay part

[PATCH] D88964: [clangd] Add a missing include-fixer test for incomplete_type, NFC.

2020-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman. Herald added a project: clang. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Also sort the list to make it easier to verify with the impleme

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C

2020-10-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/SignalHandlerCheck.cpp:117-118 +FunctionCallCollector Collector{[&CalledFunctions](const CallExpr *CE) { + if (isa(CE->getCalleeDecl())) +CalledFunctions.push_back(CE); +}}; --

[PATCH] D88964: [clangd] Add a missing include-fixer test for incomplete_type, NFC.

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/IncludeFixer.cpp:71 switch (Info.getID()) { + case diag::err_incomplete_base_class: case diag::err_incomplete_type: nit: maybe revert this change, or put `err_incomplete_type` to the last

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-07 Thread Jason Liu via Phabricator via cfe-commits
jasonliu marked an inline comment as done. jasonliu added inline comments. Comment at: clang/test/Driver/aix-data-sections.c:7 +// RUN: | FileCheck %s +// CHECK: "-fdata-sections" DiggerLin wrote: > may be good to check the whether other OS platform behavior be

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-07 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 296665. jasonliu added a comment. Change lld's forwarder function's signature to match LLVM style. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88737/new/ https://reviews.llvm.org/D88737 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test

[PATCH] D88411: [clangd] Introduce MemoryTrees

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 296667. kadircet marked 9 inline comments as done. kadircet added a comment. - Rename add{Detail,Child} -> {detail,child} - Get rid of `traverseTree` API and only expose `total` - Add a `children()` getter Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D88411: [clangd] Introduce MemoryTrees

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/support/MemoryTree.h:36 + /// No copy of the \p Name. + MemoryTree *addChild(llvm::StringLiteral Name) { return &createChild(Name); } + sammccall wrote: > sammccall wrote: > > actually, why do

[PATCH] D88411: [clangd] Introduce MemoryTrees

2020-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. LGTM, thanks! Comment at: clang-tools-extra/clangd/support/MemoryTree.h:57 + /// Returns total number of bytes used by this sub-tree. Performs a traversal. + size_t total() const; + oops, we should

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C

2020-10-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/SignalHandlerCheck.cpp:117-118 +FunctionCallCollector Collector{[&CalledFunctions](const CallExpr *CE) { + if (isa(CE->getCalleeDecl())) +CalledFunctions.push_back(CE); +}}; --

[PATCH] D88411: [clangd] Introduce MemoryTrees

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 296675. kadircet added a comment. - Add self Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88411/new/ https://reviews.llvm.org/D88411 Files: clang-tools-extra/clangd/support/CMakeLists.txt clang-tools-ext

[PATCH] D88963: [SystemZ][z/OS] Add test of zero length bitfield type size larger than target zero length bitfield boundary

2020-10-07 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88963/new/ https://reviews.llvm.org/D88963

[PATCH] D88411: [clangd] Introduce MemoryTrees

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 296677. kadircet marked 2 inline comments as done. kadircet added a comment. - Make MemoryTree move-only and return refs instead of pointers on child and detail. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8

[PATCH] D87279: [clang] Fix handling of physical registers in inline assembly operands.

2020-10-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2066 + // Keep track of defined physregs. + std::set PhysRegOutputs; + Use llvm::SmallSet? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87279/new/ https://reviews.llvm.org/D87279

[PATCH] D88413: [clangd] Add a metric for tracking memory usage

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 296678. kadircet added a comment. - Rebase and introduce helper for recording a MemoryTree. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88413/new/ https://reviews.llvm.org/D88413 Files: clang-tools-extra/

[PATCH] D88968: [WebAssembly] Prototype i16x8.q15mulr_sat_s

2020-10-07 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: llvm-commits, cfe-commits, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added projects: clang, LLVM. tlively requested review of this revision. This saturating, rounding, Q-form

[PATCH] D88970: [clangd] Fix argument type (bool->float).

2020-10-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. adamcz added a reviewer: usaxena95. Herald added subscribers: cfe-commits, kadircet, arphaman. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. The default value is 1.3f, but it was cast to true

[PATCH] D88414: [clangd] Introduce memory dumping to FileIndex, FileSymbols and BackgroundIndex

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 296684. kadircet marked 4 inline comments as done. kadircet added a comment. - Rename attachMemoryUsage to profile - Split file symbols into symbols/refs/relations granularity - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[clang-tools-extra] bcd8422 - [clangd] Fix argument type (bool->float).

2020-10-07 Thread Adam Czachorowski via cfe-commits
Author: Adam Czachorowski Date: 2020-10-07T17:22:00+02:00 New Revision: bcd8422d75069624dc2daf7e5ff4b4f6cbcd6b71 URL: https://github.com/llvm/llvm-project/commit/bcd8422d75069624dc2daf7e5ff4b4f6cbcd6b71 DIFF: https://github.com/llvm/llvm-project/commit/bcd8422d75069624dc2daf7e5ff4b4f6cbcd6b71.d

[PATCH] D88970: [clangd] Fix argument type (bool->float).

2020-10-07 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbcd8422d7506: [clangd] Fix argument type (bool->float). (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 296689. arichardson added a comment. Use an enum config option instead Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88227/new/ https://reviews.llvm.org/D88227 Files: clang/docs/ClangFormatStyleOptions.r

[PATCH] D88415: [clangd] Introduce memory usage dumping to TUScheduler, for Preambles and ASTCache

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 296691. kadircet marked 3 inline comments as done. kadircet added a comment. - Rename attachMemoryUsage to profile - Group by filename, rather than ast_cache vs preamble - Make use of UsedBytesAST rather than profiling IdleASTs - Rebase Repository: rG LLV

[clang] 9908ee5 - [SystemZ][z/OS] Add test of zero length bitfield type size larger than target zero length bitfield boundary

2020-10-07 Thread Abhina Sreeskantharajan via cfe-commits
Author: Fanbo Meng Date: 2020-10-07T11:34:13-04:00 New Revision: 9908ee5670596db4fdc2bd7ea7c3071c0e02a784 URL: https://github.com/llvm/llvm-project/commit/9908ee5670596db4fdc2bd7ea7c3071c0e02a784 DIFF: https://github.com/llvm/llvm-project/commit/9908ee5670596db4fdc2bd7ea7c3071c0e02a784.diff LO

[PATCH] D88963: [SystemZ][z/OS] Add test of zero length bitfield type size larger than target zero length bitfield boundary

2020-10-07 Thread Abhina Sree via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9908ee567059: [SystemZ][z/OS] Add test of zero length bitfield type size larger than target… (authored by fanbo-meng, committed by abhina.sreeskantharajan). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D88417: [clangd] Record memory usages after each notification

2020-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 296696. kadircet added a comment. - Rebase and add tests for ClangdLSPServer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88417/new/ https://reviews.llvm.org/D88417 Files: clang-tools-extra/clangd/ClangdLS

[PATCH] D88976: [clang] Use correct address space for global variable debug info

2020-10-07 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. Herald added subscribers: cfe-commits, jholewinski. Herald added a project: clang. scott.linder requested review of this revision. The target needs to be queried here, but previously we seemed to only duplicate CUDA's (and so HIP's) behavior, and only partially.

[PATCH] D88976: [clang] Use correct address space for global variable debug info

2020-10-07 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. I'm not certain I fully understand NVPTX's relationship with its debugger, but from https://reviews.llvm.org/D57162 I gather the "default" address space in the debugger is global, and so the frontend omits it rather than explicitly mentioning it. I think it would b

[clang] ff6e444 - [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords

2020-10-07 Thread Alex Richardson via cfe-commits
Author: Alex Richardson Date: 2020-10-07T17:17:41+01:00 New Revision: ff6e4441b93953efb2c52995e79e211a49ffac06 URL: https://github.com/llvm/llvm-project/commit/ff6e4441b93953efb2c52995e79e211a49ffac06 DIFF: https://github.com/llvm/llvm-project/commit/ff6e4441b93953efb2c52995e79e211a49ffac06.dif

[clang] 0a3c82e - [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield

2020-10-07 Thread Alex Richardson via cfe-commits
Author: Alex Richardson Date: 2020-10-07T17:17:40+01:00 New Revision: 0a3c82e85b73e51e830b57844b2f5b98cb59afd1 URL: https://github.com/llvm/llvm-project/commit/0a3c82e85b73e51e830b57844b2f5b98cb59afd1 DIFF: https://github.com/llvm/llvm-project/commit/0a3c82e85b73e51e830b57844b2f5b98cb59afd1.dif

[PATCH] D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0a3c82e85b73: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield (authored by arichardson). Repository: rG LLVM Github Mon

[PATCH] D88952: [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGff6e4441b939: [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I have noticed that clang-format has a tendency to over eagerly make * and & a TT_BinaryOperator, I know its too late to change it now, but sometimes I wonder if they should be detected as TT_PointerOrReference and then the clauses try and expose when they are be

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8365 + EXPECT_TOKEN(Tokens[11], tok::star, TT_PointerOrReference); + verifyFormat("#define lambda [](const decltype(x) *ptr) {}"); +} I like this style of test, I think some

[PATCH] D88411: [clangd] Introduce MemoryTrees

2020-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. Still LGTM, commit it already :-D Comment at: clang-tools-extra/clangd/support/MemoryTree.cpp:26 + +size_t MemoryTree::self() const { return Size; } +} // namespace clangd nit: could inline this consi

[PATCH] D88978: [WIP] Attach debug intrinsics to allocas, and use correct address space

2020-10-07 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. scott.linder requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. A dbg.declare for a local/parameter describes the hardware location of

[PATCH] D88417: [clangd] Record memory usages after each notification

2020-10-07 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: clang-tools-extra/clangd/ClangdLSPServer.cpp:182 +Server.Server->profile(MT); +trace::recordMemoryUsage(MT, "clangd_server"); return true;

[PATCH] D88978: [WIP] Attach debug intrinsics to allocas, and use correct address space

2020-10-07 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. I need to add more tests, but I wanted to float the idea of the change and get feedback first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88978/new/ https://reviews.llvm.org/D88978

[PATCH] D88414: [clangd] Introduce memory dumping to FileIndex, FileSymbols and BackgroundIndex

2020-10-07 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. Now there's lots of usage (which looks good!) i'm finding it a bit hard to keep track of what the tree will look like overall. At some point it'd be great to: a) bind this to an LSP ext

[PATCH] D88417: [clangd] Record memory usages after each notification

2020-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. this is at least going to take some important locks, hopefully only briefly. We should watch the timing here carefully and consider guarding it - apart from the minimum time interval we discussed, we could have a check whether metric tracing is actually enabled in a m

[PATCH] D88363: [CodeGen] Improve likelihood attribute branch weights

2020-10-07 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D88363#2312129 , @jmorse wrote: > Hi -- We (Sony) are running into a bit of difficulty with the test for this > change, as it relies on the configuration of the -O1 optimisation pipeline. > Would it be possible to reduce down

[PATCH] D88984: Prefer libc++ headers in the -isysroot over the toolchain

2020-10-07 Thread Louis Dionne via Phabricator via cfe-commits
ldionne created this revision. ldionne added reviewers: arphaman, dexonsmith. Herald added subscribers: cfe-commits, jkorous. Herald added a project: clang. ldionne requested review of this revision. Currently, Clang looks for libc++ headers alongside the installation directory of Clang, and it al

[PATCH] D88566: be more specific when testing for no fuse-ld warnings

2020-10-07 Thread Ties Stuij via Phabricator via cfe-commits
stuij added a comment. Hi @MaskRay. Yes, so we're seeing a warning specific to our Armcompiler toolchain, so I'm guessing that isn't relevant to OSS LLVM: `armclang: warning: '--target=x86_64-unknown-linux' is not supported.` As David Green pointed out, we have a perfectly fine workaround. But I

[PATCH] D88566: be more specific when testing for no fuse-ld warnings

2020-10-07 Thread Ties Stuij via Phabricator via cfe-commits
stuij added inline comments. Comment at: clang/test/Driver/fuse-ld.c:15 // RUN: FileCheck %s --check-prefix=CHECK-NO-WARN -// CHECK-NO-WARN-NOT: warning: +// CHECK-NO-WARN-NOT: warning: 'fuse-ld' MaskRay wrote: > How does this line trigger unrelated warnings

[PATCH] D88814: [clangd] Enable partial namespace matches for workspace symbols

2020-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:44 +// Returns true if \p Query can be found as a sub-scope inside \p Scope. +bool approximateScopeMatch(llvm::StringRef Scope, kadircet wrote: > sammccall wrote: > > I had a

[PATCH] D88985: [clangd] Temporary fix for bad inference in Decision Forest.

2020-10-07 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added a reviewer: adamcz. Herald added subscribers: cfe-commits, kadircet, arphaman. Herald added a project: clang. usaxena95 requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Unreachable file distances are represented a

[PATCH] D87451: add new option -mignore-xcoff-visibility

2020-10-07 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/include/llvm/Target/TargetOptions.h:126 FunctionSections(false), DataSections(false), - UniqueSectionNames(true), UniqueBasicBlockSectionNames(false), - TrapUnreachable(false), NoTrapAfterNoreturn(false

[PATCH] D88985: [clangd] Temporary fix for bad inference in Decision Forest.

2020-10-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added a comment. This revision is now accepted and ready to land. LG, but I'm not sure if we really need it. Up to you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88985/new/ https://reviews.llvm.org/D88985

[PATCH] D87029: [AIX] Implement AIX special bitfield related alignment rules

2020-10-07 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L marked an inline comment as done. Xiangling_L added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:16447 + +bool AIXBitfieldViolation = false; +if (const BuiltinType *BTy = FieldTy.getTypePtr()->getAs()) { sfertile wrote: > Xiangling

[PATCH] D88885: [clangd] Disambiguate overloads of std::move for header insertion.

2020-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 296734. sammccall marked an inline comment as done. sammccall added a comment. Refactor the hack into a more appropriate place. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5/new/ https://reviews.llvm.or

[PATCH] D88885: [clangd] Disambiguate overloads of std::move for header insertion.

2020-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added a comment. In D5#2314596 , @kadircet wrote: > Thanks, LGTM! As you mentioned I believe `std::move` is common enough to > deserve the special casing. Common enough and also literally the only

[PATCH] D88987: [FPEnv][Clang][Driver] Use MarshallingInfoFlag for -fexperimental-strict-floating-point

2020-10-07 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added a reviewer: dang. kpn added a project: clang. Herald added subscribers: cfe-commits, dexonsmith. kpn requested review of this revision. As of D80952 we are disabling strict floating point on all hosts except those that are exp

  1   2   >