[PATCH] D115068: [clang-format][NFC] Move static variable in scope

2021-12-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115068/new/ https://reviews.llvm.org/D115068 __

[PATCH] D115067: [clang-format][NFC] Use range based for

2021-12-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/lib/Format/TokenAnnotator.cpp:2376 void TokenAnnotator::annotate(AnnotatedLine &Line) { - for (SmallVectorImpl::iterator I = Line.Children.begin

[PATCH] D115066: [clang-format][NFC] Reorder conditions

2021-12-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115066/new/ https://reviews.llvm.org/D115066 __

[PATCH] D115060: [clang-format][NFC] Code Tidies in UnwrappedLineFormatter

2021-12-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Don't forget to reformat please. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115060/new/ https://reviews.llvm.org/D115060 _

[PATCH] D115045: [Clang] Ignore CLANG_DEFAULT_LINKER for custom-linker toolchains

2021-12-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115045/new/ https://reviews.llvm.org/D115045 ___

[PATCH] D115061: [clang-format][NFC] Prefer pass by reference

2021-12-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. What do we usually do for output parameters? I'm ok with both refs and pointers. It seems to me to be google-style thingy to pass by pointer. It is indeed clearer at the caller site that the passed variable will be modified. Are you worried about any performance penalty

[PATCH] D115031: [AST] Print NTTP args as string-literals when possible

2021-12-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 391717. lichray added a comment. - Add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115031/new/ https://reviews.llvm.org/D115031 Files: clang/lib/AST/APValue.cpp clang/test/SemaTemplate/temp_arg_str

[PATCH] D115031: [AST] Print NTTP args as string-literals when possible

2021-12-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 391718. lichray added a comment. Add EOL to source file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115031/new/ https://reviews.llvm.org/D115031 Files: clang/lib/AST/APValue.cpp clang/test/SemaTemplate/t

[PATCH] D115063: [clang-format][NFC] Rename variable so no shadowing happens

2021-12-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115063/new/ https://reviews.llvm.org/D115063 __

[PATCH] D115064: [clang-format][NFC] Replace deque with vector

2021-12-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Deque, contrary to the vector, doesn't need to move the elements when growing. I'm not sure if that's relevant here though. Have you checked what's on average the maximum size of `Path` on some larger repo? Maybe using `llvm::SmallVector` with some well-thought (data-ba

[PATCH] D115061: [clang-format][NFC] Prefer pass by reference

2021-12-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. FWLIW, I'm strongly in favor of "Pass out-parameters by pointer," for the reason Marek said (and the reason Google, Bloomberg, Facebook, Mongo, etc, do it) — it makes life easier for the reader of the calling code. Especially for e.g. `addNextStateToQueue(Penalty, N

[PATCH] D115065: [clang-format][NFC] Merge two calls of isOneOf

2021-12-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. I guess this is matter of taste whether to call `isOneOf` separately for `TokenKind`s and for `TokenType`s (but +1 for removing the repetition). Repository: rG LLVM Github Monorepo CHA

[PATCH] D113319: [clang-format] Improve require and concept handling

2021-12-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3424 +templates or between template and function delcarations. In case of +after the function delcaration it tries to stick to this. + `s/delca/decla/g` `s/Preceeding/Pr

[clang] 9f95bc7 - [clang][ARM] relax -mtp=cp15 for non-thumb cases

2021-12-03 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2021-12-03T14:00:00-08:00 New Revision: 9f95bc7dc18390199553cf2ea3bfcdc6a95717ef URL: https://github.com/llvm/llvm-project/commit/9f95bc7dc18390199553cf2ea3bfcdc6a95717ef DIFF: https://github.com/llvm/llvm-project/commit/9f95bc7dc18390199553cf2ea3bfcdc6a95717ef.di

[PATCH] D114116: [clang][ARM] relax -mtp=cp15 for non-thumb cases

2021-12-03 Thread Nick Desaulniers 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 rG9f95bc7dc183: [clang][ARM] relax -mtp=cp15 for non-thumb cases (authored by nickdesaulniers). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D115031: [AST] Print NTTP args as string-literals when possible

2021-12-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/APValue.cpp:628-629 +static bool TryPrintAsStringLiteral(raw_ostream &Out, const ArrayType *ATy, +const APValue *Data, size_t Size) { + if (Size == 0) Is there anything

[PATCH] D113422: [clang-tidy][NFC] Move CachedGlobList to GlobList.h

2021-12-03 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz accepted this revision. salman-javed-nz added a comment. This revision is now accepted and ready to land. LGTM. The use of `mutable` with public inheritence is all over the clang-tools-extra code. See `class SwapIndex : public SymbolIndex`. CHANGES SINCE LAST ACTION https://re

[PATCH] D115031: [AST] Print NTTP args as string-literals when possible

2021-12-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 391744. lichray added a comment. Ensure the ellipses output is never shorter than the normal ones (will look at review comments later) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115031/new/ https://reviews.

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-03 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:961 + DB.finalize(); +} + } kyulee wrote: > I think when `-debug-info-correlate` is used without debug info, we should > fail or emit a warning here instead

[PATCH] D115069: [clang-format][NFC] Merge another two calls to isOneOf

2021-12-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1294-1296 + Previous->isOneOf(tok::l_paren, tok::comma, tok::colon, TT_BinaryOperator, +TT_ConditionalExpr) && !Previous->isOneOf(TT_DictLiteral, T

[PATCH] D114124: [clang][ARM] only check -mtp=cp15 for non-asm sources

2021-12-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 391752. nickdesaulniers added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114124/new/ https://reviews.llvm.org/D114124 Files: clang/lib/Driver/ToolChains/Arch/ARM.cpp clang/li

[PATCH] D114124: [clang][ARM] only check -mtp=cp15 for non-asm sources

2021-12-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 391754. nickdesaulniers edited the summary of this revision. nickdesaulniers added a comment. - update description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114124/new/ https://reviews.llvm.org/D114

[PATCH] D115061: [clang-format][NFC] Prefer pass by reference

2021-12-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. No I don't think there is a performance penalty. **I** just don't like using pointers. I'm happy to drop this, if the Style says to use pointers. But from what I've seen in clang-format pointers are mostly used when it can be null, but there is a wild mix.

[PATCH] D114124: [clang][ARM] only check -mtp=cp15 for non-asm sources

2021-12-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 391755. nickdesaulniers added a comment. - try to fix rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114124/new/ https://reviews.llvm.org/D114124 Files: clang/lib/Driver/ToolChains/Arch/ARM.cpp

[PATCH] D115031: [AST] Print NTTP args as string-literals when possible

2021-12-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: clang/lib/AST/APValue.cpp:628-629 +static bool TryPrintAsStringLiteral(raw_ostream &Out, const ArrayType *ATy, +const APValue *Data, size_t Size) { + if (Size == 0) rsmith wrote: >

[PATCH] D115031: [AST] Print NTTP args as string-literals when possible

2021-12-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/APValue.cpp:637-639 + // Nothing we can do about a sequence that is not null-terminated + if (!Data[--Size].getInt().isZero()) +return false; lichray wrote: > rsmith wrote: > > We should drop all trail

[PATCH] D115045: [Clang] Ignore CLANG_DEFAULT_LINKER for custom-linker toolchains

2021-12-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. LGTM. Comment at: clang/lib/Driver/ToolChain.cpp:545 +const char *ToolChain::getDefaultLinker() const { + if (StringRef(CLANG_DEFAULT_LINKER).empty()) +return "ld"; `CLANG_DEFAUALT_LINKER[0] == '\0'`

[PATCH] D113319: [clang-format] Improve require and concept handling

2021-12-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked 4 inline comments as done. HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3464-3483 + * ``RCPS_TwoLines`` (in configuration: ``TwoLines``) +The clause always gets its own line, and the content of the cla

Maintenance works at llvm lab today at 6PM PST

2021-12-03 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM lab and build bot will be unavailable for about an hour starting from 6:00 PM PST today for maintenance works. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-12-03 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 391780. ellis added a comment. Add warning when debug info is missing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114565/new/ https://reviews.llvm.org/D114565 Files: clang/lib/CodeGen/BackendUtil.cpp comp

[PATCH] D115060: [clang-format][NFC] Code Tidies in UnwrappedLineFormatter

2021-12-03 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. How about naming `I[-1]` as well? And maybe `I[i + 1]` too? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115060/new/ https://reviews.llvm.org/D115060 ___ cfe-commits mailing lis

[PATCH] D115061: [clang-format][NFC] Prefer pass by reference

2021-12-03 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 D115061#3170908 , @HazardyKnusperkeks wrote: > No I don't think there is a performance penalty. **I** just don't like using > pointers. I'm happ

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1540 // Diagnose attempts to convert between __ibm128, __float128 and long double - // where such conversions currently can't be handled. + // in arithmetic or comparison. if (unsupporte

Re: Maintenance works at llvm lab today at 7PM PST

2021-12-03 Thread Galina Kistanova via cfe-commits
LLVM lab and build bot are back to normal work. Thanks Galina On Fri, Oct 1, 2021 at 4:50 PM Galina Kistanova wrote: > Hello everyone, > > LLVM lab and build bot will be unavailable for about an hour starting from > 7:00 PM PST today for some maintenance work. > > Thank you for understanding.

[PATCH] D115031: [AST] Print NTTP args as string-literals when possible

2021-12-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: clang/lib/AST/APValue.cpp:637-639 + // Nothing we can do about a sequence that is not null-terminated + if (!Data[--Size].getInt().isZero()) +return false; rsmith wrote: > lichray wrote: > > rsmith wrote: > > > We

[clang] eeb4266 - [Sparc] Create an error when `__builtin_longjmp` is used

2021-12-03 Thread Brad Smith via cfe-commits
Author: Tee KOBAYASHI Date: 2021-12-03T23:41:50-05:00 New Revision: eeb4266f8137c232f0f218a727dd12b5d4f52adc URL: https://github.com/llvm/llvm-project/commit/eeb4266f8137c232f0f218a727dd12b5d4f52adc DIFF: https://github.com/llvm/llvm-project/commit/eeb4266f8137c232f0f218a727dd12b5d4f52adc.diff

[PATCH] D108901: [Sparc] Create an error when `__builtin_longjmp` is used

2021-12-03 Thread Brad Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeeb4266f8137: [Sparc] Create an error when `__builtin_longjmp` is used (authored by xtkoba, committed by brad). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/float128-ld-incompatibility.cpp:13 +long double ld{qf()}; // expected-error {{non-constant-expression cannot be narrowed from type '__float128' to 'long double' in initializer list}} expected-note {{inser

[PATCH] D115031: [AST] Print NTTP args as string-literals when possible

2021-12-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: clang/lib/AST/APValue.cpp:637-639 + // Nothing we can do about a sequence that is not null-terminated + if (!Data[--Size].getInt().isZero()) +return false; lichray wrote: > rsmith wrote: > > lichray wrote: > > > rs

<    1   2