[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Nice! Per Aaron's comment, it's probably worth expanding the patch description to explain the motivation. I assume that the key is making these first-class and therefore bindable? Comment at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:170

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-26 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:328 Opts["cert-str34-c.DiagnoseSignedUnsignedCharComparisons"] = "false"; +Opts["cert-err33-c.CheckedFunctions"] = CertErr33CCheckedFunctions; return Options; -

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-26 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. > I was not sure how the aliasing is to be handled if the check is not exactly > the same as the original. I agree that the alias situation is a bit of a mess. I'll leave it to people with stronger opinion/experience. Repository: rG LLVM Github Monorepo CHANG

[PATCH] D112209: [clangd] IncludeCleaner: Complicated rules for enum usage

2021-10-26 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Follow-up commit https://github.com/llvm/llvm-project/commit/1c2e249f938c50e1b331a1f7adc83c0a381f3897 (which doesn't seem to have its own phab link) broke clangd tests everywhere, e.g. http://45.33.8.238/linux/59134/step_9.txt Please take a look. This is like the third

[PATCH] D112527: [clangd] Fix a hover crash on templated spaceship operator.

2021-10-26 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 382326. adamcz marked 2 inline comments as done. adamcz added a comment. review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112527/new/ https://reviews.llvm.org/D112527 Files: clang-tools-extra/cla

Re: [PATCH] D112209: [clangd] IncludeCleaner: Complicated rules for enum usage

2021-10-26 Thread Kirill Bobyrev via cfe-commits
Yes, I'm aware and actively working on this one. I think I have the fix but I'm trying to run all the tests (Clang etc) to make sure it doesn't break anything else. On Tue, Oct 26, 2021 at 5:01 PM Nico Weber via Phabricator < revi...@reviews.llvm.org> wrote: > thakis added a comment. > > Follow-u

[PATCH] D112542: [clang] Convert ObjCAtTryStmt to llvm::TrailingObjects

2021-10-26 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. thakis requested review of this revision. And make it final while here. No behavior change. https://reviews.llvm.org/D112542 Files: clang/include/clang/AST/StmtObjC.h Index: clang/include/clang/AST/StmtObjC.h

[PATCH] D112543: [clang] Add range accessor for ObjCAtTryStmt catch_stmts and use it

2021-10-26 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. thakis requested review of this revision. No behavior change. https://reviews.llvm.org/D112543 Files: clang/include/clang/AST/StmtObjC.h clang/lib/AST/StmtPrinter.cpp clang/lib/Analysis/CFG.cpp clang/lib/CodeGen/CGObjCMac.cpp

[PATCH] D111654: [analyzer] Retrieve a value from list initialization of multi-dimensional array declaration.

2021-10-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/test/Analysis/initialization.cpp:17-23 -int const arr[2][2] = {}; -void arr2init() { - int i = 1; - // FIXME: Should recognize that it is 0. - clang_analyzer_eval(arr[i][0]); // expected-warning{{UNKNOWN}} -} - ---

[PATCH] D90996: [clang-format] Add --staged/--cached option to git-clang-format

2021-10-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @lodato are you blocking this review for a reason? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90996/new/ https://reviews.llvm.org/D90996 ___ cfe-commits mailing list cf

[PATCH] D112055: [PowerPC] Implement longdouble pack/unpack builtins

2021-10-26 Thread Jinsong Ji via Phabricator via cfe-commits
jsji accepted this revision as: jsji. jsji added a comment. This revision is now accepted and ready to land. LGTM with some nits. Comment at: clang/lib/Sema/SemaChecking.cpp:3382 +if (&TI.getLongDoubleFormat() != &llvm::APFloat::PPCDoubleDouble()) + return Diag(TheCall

[PATCH] D112530: [clangd] AddUsing: Fix support for template specializations.

2021-10-26 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz removed a reviewer: usaxena95. adamcz added a comment. Thanks Kadir! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112530/new/ https://reviews.llvm.org/D112530 ___ cfe-commits mailing list cfe-com

[PATCH] D112530: [clangd] AddUsing: Fix support for template specializations.

2021-10-26 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 382335. adamcz added a comment. review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112530/new/ https://reviews.llvm.org/D112530 Files: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp clang-

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unused-return-value.rst:31 semget, setjmp, shm_open, shmget, sigismember, strcasecmp, strsignal, ttyname`` Change this to a list? Repository: rG LLVM Gith

[clang] 0350672 - [clang] Do not traverse EnumDecl's type in RecursiveASTVisitor

2021-10-26 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2021-10-26T17:17:10+02:00 New Revision: 03506722e0c348ce52d87f7f37f024d7adec5c43 URL: https://github.com/llvm/llvm-project/commit/03506722e0c348ce52d87f7f37f024d7adec5c43 DIFF: https://github.com/llvm/llvm-project/commit/03506722e0c348ce52d87f7f37f024d7adec5c43.diff

[PATCH] D90996: [clang-format] Add --staged/--cached option to git-clang-format

2021-10-26 Thread Mark Lodato via Phabricator via cfe-commits
lodato accepted this revision. lodato added a comment. This revision is now accepted and ready to land. Oops, I'm sorry. I meant to test it but ran out of time and then forgot to click approve. My apologies. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-26 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 382337. serge-sans-paille added a comment. - Add a test case to ensure we keep the right behavior for non-intrinsic gnu inline - walk the redecl chain before doing an extra string alloc CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112059/

[clang-tools-extra] e8f4a01 - [clangd] Fix a hover crash on templated spaceship operator.

2021-10-26 Thread Adam Czachorowski via cfe-commits
Author: Adam Czachorowski Date: 2021-10-26T17:28:40+02:00 New Revision: e8f4a01189143854f30e2bb622baa729a42f152d URL: https://github.com/llvm/llvm-project/commit/e8f4a01189143854f30e2bb622baa729a42f152d DIFF: https://github.com/llvm/llvm-project/commit/e8f4a01189143854f30e2bb622baa729a42f152d.d

[PATCH] D112527: [clangd] Fix a hover crash on templated spaceship operator.

2021-10-26 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe8f4a0118914: [clangd] Fix a hover crash on templated spaceship operator. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112527/new/ ht

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-26 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 382344. serge-sans-paille added a comment. Formatting nits CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112059/new/ https://reviews.llvm.org/D112059 Files: clang/lib/CodeGen/CodeGenFunction.cpp clang/test/CodeGen/strlen-inline-builti

[PATCH] D112401: [Clang] Mutate printf bulitin names under IEEE128 on PPC64

2021-10-26 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:100 + static SmallDenseMap F128Builtins{ + {Builtin::BI__builtin_printf, "__printfieee128"}, + {Builtin::BI__builtin_vsnprintf, "__vsnprintfieee128"}, Why only these printf builtin

[PATCH] D112530: [clangd] AddUsing: Fix support for template specializations.

2021-10-26 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 rG2174524116a8: [clangd] AddUsing: Fix support for template specializations. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINC

[clang-tools-extra] 2174524 - [clangd] AddUsing: Fix support for template specializations.

2021-10-26 Thread Adam Czachorowski via cfe-commits
Author: Adam Czachorowski Date: 2021-10-26T17:32:33+02:00 New Revision: 2174524116a8379fb7a6453253524ec972b158df URL: https://github.com/llvm/llvm-project/commit/2174524116a8379fb7a6453253524ec972b158df DIFF: https://github.com/llvm/llvm-project/commit/2174524116a8379fb7a6453253524ec972b158df.d

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: alexfh. aaron.ballman added a comment. In D112409#3087517 , @carlosgalvezp wrote: >> I was not sure how the aliasing is to be handled if the check is not exactly >> the same as the original. > > I agree that the alias sit

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2021-10-26 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. `check-llvm` does not pass with this revision nor does it resolve the boot failure that Nick mentioned, just in case that was the intention of the revision :) I ran the kernel through `gdb` and it still does not appear to get to `start_kernel`. Repository: rG L

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-26 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. LGTM, though codegen is not my area of expertise. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112059/new/ https://reviews.llvm.org/D112059 ___

[clang] 1ef25d2 - [Clang] Add elementwise min/max builtins.

2021-10-26 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2021-10-26T16:53:40+01:00 New Revision: 1ef25d28c19e3b2e956ffcb39c91f98c154f9b3f URL: https://github.com/llvm/llvm-project/commit/1ef25d28c19e3b2e956ffcb39c91f98c154f9b3f DIFF: https://github.com/llvm/llvm-project/commit/1ef25d28c19e3b2e956ffcb39c91f98c154f9b3f.diff

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. fhahn marked 3 inline comments as done. Closed by commit rG1ef25d28c19e: [Clang] Add elementwise min/max builtins. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D112447: [clangd] IncludeCleaner: Support macros

2021-10-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 382358. kbobyrev added a comment. Add an elaborate comment on potential future improvements. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112447/new/ https://reviews.llvm.org/D112447 Files: clang-tools-ext

[PATCH] D111400: [Clang] Implement P2242R3

2021-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added a comment. In D111400#3052314 , @hubert.reinterpretcast wrote: > I am concerned that the general direction of this patch (to allow the > previously ill-formed constexpr functions as an extensio

[PATCH] D111654: [analyzer] Retrieve a value from list initialization of multi-dimensional array declaration.

2021-10-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1706-1743 + // Check offsets for being out of bounds. // C++20 [expr.add] 7.6.6.4 (excerpt): // If P points to an array element i of an array object x with n // elements,

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1623 if (!Constraint.containsZero()) { - State = RCM.assumeSymNE(State, LHS, Zero, Zero); + State = RCM.assumeSymRel(State,

[PATCH] D110065: [AArch64] Add support for the 'R' architecture profile.

2021-10-26 Thread John Brawn via Phabricator via cfe-commits
john.brawn added a comment. In D110065#3087330 , @labrinea wrote: > Added v8.1a_ops on AppleA10. However, the target parser lists it as v8.0a, > which seems odd. Out of the scope of this patch anyway. Looking at the definition of A10 in target parser it

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 382362. martong added a comment. - Handle adjustment in `assumeSym` for non-comparison ops. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112296/new/ https://reviews.llvm.org/D112296 Files: clang/include/cl

[clang] c184072 - [analyzer] Fix StringChecker for Unknown params

2021-10-26 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2021-10-26T18:15:00+02:00 New Revision: c18407217e91abea73555e07956d7132dd093bd2 URL: https://github.com/llvm/llvm-project/commit/c18407217e91abea73555e07956d7132dd093bd2 DIFF: https://github.com/llvm/llvm-project/commit/c18407217e91abea73555e07956d7132dd093bd2.diff

[PATCH] D112551: [analyzer] Fix StringChecker for Unknown params

2021-10-26 Thread Balázs Benics 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 rGc18407217e91: [analyzer] Fix StringChecker for Unknown params (authored by steakhal). Herald added a project: clang. Herald added a subscriber: cfe-c

[PATCH] D111654: [analyzer] Retrieve a value from list initialization of multi-dimensional array declaration.

2021-10-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 382361. ASDenysPetrov added a comment. @martong @steakhal Thank you for your remarks. Updated according to them (at least the best I could do for now). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111654/new/ https://reviews.llvm.org/D11165

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 382367. martong added a comment. - Remove superflous change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112296/new/ https://reviews.llvm.org/D112296 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintMan

[PATCH] D112532: [Matrix] Replace some err kinds with err_builtin_invalid_arg_type. (NFC)

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 382373. fhahn marked an inline comment as done. fhahn added a comment. Reabsed after landing D111985 . Also turned the custom message parts into a select as suggested. In D112532#3087371

[PATCH] D112532: [Matrix] Replace some err kinds with err_builtin_invalid_arg_type. (NFC)

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16654 +Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type) +<< PtrArgIdx + 1 << "pointer to a valid matrix element type" +<< PtrExpr->getType(); erichkeane w

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp:46-49 +if (Assumption) { + return assumeSymRel(State, SIE, BO_NE, Zero); +} +return assumeSymRel(State, SIE, BO_EQ, Zero); Repository:

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp:52 + + if (const SymSymExpr *SSE = dyn_cast(Sym)) { BinaryOperator::Opcode Op = SSE->getOpcode(); Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D112481: [Sema] fix nondeterminism in ASTContext::getDeducedTemplateSpecializationType

2021-10-26 Thread Igor Sugak via Phabricator via cfe-commits
sugak added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5640 + DeducedTemplateSpecializationType::Profile( + ID, Template, DeducedType, IsDependent || Template.isDependent()); if (DeducedTemplateSpecializationType *DTST = bruno wrote: > Sho

Re: [PATCH] D112209: [clangd] IncludeCleaner: Complicated rules for enum usage

2021-10-26 Thread Sam McCall via cfe-commits
Hey Kirill, If you mean removing traversal of the enumdecl->enumtype in RecursiveASTVisitor, that's a subtle change that potentially affects a lot of callers. We'd need to be able to revert it, so we shouldn't rely on it to get the tests back to green. It looks like there's a single assertion fai

[PATCH] D112408: [WIP][RISCV] Add the zve extension according to the v1.0-rc2 spec

2021-10-26 Thread Zakk Chen via Phabricator via cfe-commits
khchen added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:181 } + if (MinVLen) { please add a note in commit or comment here for those macros are proposed in the PR https://github.com/riscv-non-isa/riscv-c-api-doc/pull/21 ==

[PATCH] D112481: [Sema] fix nondeterminism in ASTContext::getDeducedTemplateSpecializationType

2021-10-26 Thread Igor Sugak via Phabricator via cfe-commits
sugak updated this revision to Diff 382375. sugak added a comment. Updated following @bruno's suggestion, and fixed tests (thanks @weiwang)! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112481/new/ https://reviews.llvm.org/D112481 Files: clang/

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov requested changes to this revision. ASDenysPetrov added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp:44-49 +// Handle adjustment with non-comparison ops. +const llvm::AP

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 382376. fhahn marked 2 inline comments as done. fhahn added a comment. Rebased and updated to use `err_builtin_invalid_arg_type`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111986/new/ https://reviews.llvm.org

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8754 +def err_elementwise_math_invalid_arg_type_2: Error < + "argument must have a %0 type, but was %1">; + aaron.ballman wrote: > I feel like we must already have a diagno

[PATCH] D100756: [llvm-rc] [4/4] Add a GNU windres-like frontend to llvm-rc

2021-10-26 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. thanks for this patch @mstorsjo ! This is help AOSP LLVM move our windows builds of LLVM away from MinGW to LLVM! https://android-review.googlesource.com/c/toolchain/llvm_android/+/1867380/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D112519: parallel-libs: remove some artifacts

2021-10-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/docs/ClangFormattedStatus.rst:7807-7821 - * - parallel-libs/acxxel - - `6` - - `4` - - `2` - - :part:`66%` - * - parallel-libs/acxxel/examples - - `1` I didn't touch this because I think it

[PATCH] D112532: [Matrix] Replace some err kinds with err_builtin_invalid_arg_type. (NFC)

2021-10-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16582 +Diag(Matrix->getBeginLoc(), diag::err_builtin_invalid_arg_type) +<< 1 << 1 << Matrix->getType(); return ExprError(); 1 nit: On the 'select' lines, please put a /

[PATCH] D112559: [clangd] Fix filename ranges while replaying preamble

2021-10-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, nridge. Herald added subscribers: usaxena95, arphaman. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Clangd used first token

[PATCH] D100756: [llvm-rc] [4/4] Add a GNU windres-like frontend to llvm-rc

2021-10-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D100756#3088035 , @nickdesaulniers wrote: > thanks for this patch @mstorsjo ! This is help AOSP LLVM move our windows > builds of LLVM away from MinGW to LLVM! > https://android-review.googlesource.com/c/toolchain/llvm_andr

[PATCH] D112559: [clangd] Fix filename ranges while replaying preamble

2021-10-26 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. Wow, nice find! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112559/new/ https://reviews.llvm.org/D112559 __

[PATCH] D111400: [Clang] Implement P2242R3

2021-10-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D111400#3087877 , @aaron.ballman wrote: > So your concern is that allowing this patch to be used as an extension in > older language modes may change the behavior of existing code? Or is your > concern more br

[PATCH] D112186: [WebAssembly] Add prototype relaxed float to int trunc instructions

2021-10-26 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:18262-18267 +case WebAssembly::BI__builtin_wasm_relaxed_trunc_zero_s_i32x4_f64x2: + IntNo = Intrinsic::wasm_relaxed_trunc_zero_signed; + break; +case WebAssembly::BI__builtin_wasm_relaxed

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-26 Thread James King via Phabricator via cfe-commits
jcking1034 updated this revision to Diff 382391. jcking1034 marked 3 inline comments as done. jcking1034 added a comment. Revert changes to ASTMatchFinder Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112491/new/ https://reviews.llvm.org/D112491 F

[PATCH] D112094: Add support for floating-point option `ffp-eval-method` and for `pragma clang fp eval_method`.

2021-10-26 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 382392. zahiraam marked 6 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112094/new/ https://reviews.llvm.org/D112094 Files: clang/docs/LanguageExtensions.rst clang/docs/UsersManual.rst clang/include/clang/Basic/FPOptio

[PATCH] D112094: Add support for floating-point option `ffp-eval-method` and for `pragma clang fp eval_method`.

2021-10-26 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3608-3609 +within a language linkage specification or at the start of a compound statement +(excluding comments). When used within a compound statement, the pragma is +active within the scope of the com

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-26 Thread James King via Phabricator via cfe-commits
jcking1034 updated this revision to Diff 382397. jcking1034 marked an inline comment as done. jcking1034 added a comment. Update comment with example Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112491/new/ https://reviews.llvm.org/D112491 Files:

[clang] e84c541 - Fix indentation and pragma name.

2021-10-26 Thread Zahira Ammarguellat via cfe-commits
Author: Zahira Ammarguellat Date: 2021-10-26T13:58:43-04:00 New Revision: e84c5419e2264375e9fef9b025a0dd8ecb251429 URL: https://github.com/llvm/llvm-project/commit/e84c5419e2264375e9fef9b025a0dd8ecb251429 DIFF: https://github.com/llvm/llvm-project/commit/e84c5419e2264375e9fef9b025a0dd8ecb251429

[clang] a9db0a8 - [AST] Fix the EndLoc calculation for ObjCObjectPointer

2021-10-26 Thread Aaron Ballman via cfe-commits
Author: Luke Petre Date: 2021-10-26T14:03:29-04:00 New Revision: a9db0a804a5335b6534995c54ab9d6fcef06e739 URL: https://github.com/llvm/llvm-project/commit/a9db0a804a5335b6534995c54ab9d6fcef06e739 DIFF: https://github.com/llvm/llvm-project/commit/a9db0a804a5335b6534995c54ab9d6fcef06e739.diff LO

[PATCH] D112530: [clangd] AddUsing: Fix support for template specializations.

2021-10-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. (oops, i didn't notice i wasn't the reviewer :D) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112530/new/ https://reviews.llvm.org/D112530 ___ cfe-commits mailing list cfe-comm

[PATCH] D112101: [AST] Fix the EndLoc calculation for ObjCObjectPointer

2021-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in a9db0a804a5335b6534995c54ab9d6fcef06e739 , thank you for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D112565: [clangd] Add integration test for crash handling

2021-10-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: kadircet, 0x1eaf. Herald added subscribers: usaxena95, arphaman, javed.absar. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This repl

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2021-10-26 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3087776 , @nathanchance wrote: > `check-llvm` does not pass with this revision nor does it resolve the boot > failure that Nick mentioned, just in case that was the intention of the > revision :) I ran the kernel throug

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-26 Thread James King via Phabricator via cfe-commits
jcking1034 updated this revision to Diff 382410. jcking1034 added a comment. Update comments and tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112491/new/ https://reviews.llvm.org/D112491 Files: clang/docs/LibASTMatchersReference.html cl

[PATCH] D111400: [Clang] Implement P2242R3

2021-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D111400#3088133 , @hubert.reinterpretcast wrote: > In D111400#3087877 , @aaron.ballman > wrote: > >> So your concern is that allowing this patch to be used as an extension in >

[PATCH] D112532: [Matrix] Replace some err kinds with err_builtin_invalid_arg_type. (NFC)

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 382413. fhahn added a comment. Add comment to int selecting message as suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112532/new/ https://reviews.llvm.org/D112532 Files: clang/include/clang/Basic/Dia

[PATCH] D112532: [Matrix] Replace some err kinds with err_builtin_invalid_arg_type. (NFC)

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16582 +Diag(Matrix->getBeginLoc(), diag::err_builtin_invalid_arg_type) +<< 1 << 1 << Matrix->getType(); return ExprError(); erichkean

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16547 + Expr *A = TheCall->getArg(0); + QualType TyA = A->getType(); + fhahn wrote: > aaron.ballman wrote: > > Should this type undergo the usual promotions? > I'm not sure, but gi

[PATCH] D112532: [Matrix] Replace some err kinds with err_builtin_invalid_arg_type. (NFC)

2021-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112532/new/ https://reviews.llvm.org/D112532 ___ cfe-commits mailing list cfe-commi

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-26 Thread James King via Phabricator via cfe-commits
jcking1034 added a comment. @aaron.ballman for the purpose of these matchers, what @ymandel said is correct - the goal is to allow `LambdaCapture`s themselves to be bindable. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4629-4630 +/// matches `[x](){}`. +AST_MAT

[PATCH] D112408: [WIP][RISCV] Add the zve extension according to the v1.0-rc2 spec

2021-10-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:184 Builder.defineMacro("__riscv_v_min_vlen", Twine(MinVLen)); +Builder.defineMacro("__riscv_v_max_eew", Twine(MaxEew)); +Builder.defineMacro("__riscv_v_max_eew_fp", Twine(MaxEewFp)); -

[PATCH] D111669: No longer crash when a consteval function returns a structure

2021-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111669/new/ https://reviews.llvm.org/D111669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D111814: Fix consteval crash when transforming 'this' expressions

2021-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111814/new/ https://reviews.llvm.org/D111814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D111814: Fix consteval crash when transforming 'this' expressions

2021-10-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. I think the others had enough time on this one, it LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111814/new/ https://reviews.llvm.

[PATCH] D112404: [SPIR-V] Add translator tool

2021-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. This direction of creating a common translator tool makes sense to me! Thanks! Comment at: clang/include/clang/Driver/Options.td:1534 +HelpText<"Specify maximum SPIR-V version which can be emitted">; +def spirv_ext_EQ : CommaJoined<["--"], "spirv-

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-26 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 382421. JonChesterfield added a comment. - Enable tests on amdgpu, with same ones marked xfail/unsupported as on the old runtime Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112227/new/ https://review

[PATCH] D112569: -Wformat-nonliteral should not trigger for format strings passed to blocks with __attribute__((format))

2021-10-26 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier created this revision. fcloutier added reviewers: doug.gregor, dcoughlin, rsmith. fcloutier added a project: clang. fcloutier requested review of this revision. Herald added a subscriber: cfe-commits. The checker that implements `-Wformat-nonliteral` does not understand `__attribute__((

[PATCH] D112410: [SPIR-V] Add a tool chain for SPIR-V (incomplete)

2021-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Cool. I like the direction... In the end it probably makes sense to separate clang compilation flow into more separate steps. This makes it more suitable to non-LLVM based backends or even MLIR towards Clang Intermediate Language. This looks like a fairly good startin

[PATCH] D112569: -Wformat-nonliteral should not trigger for format strings passed to blocks with __attribute__((format))

2021-10-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7785 +int PVIndex = 1; +if (const NamedDecl *ND = dyn_cast(D)) { + PVIndex += PV->getFunctionScopeIndex(); This code now says that all block parameters hav

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D109632#3086044 , @rmaz wrote: > @vsapsai i'll abandon this diff then, thanks for your extensive feedback on > the approach. Is D110123 shippable > already, or are there some more corner cas

[clang] d7fbad0 - [Matrix] Replace some err kinds with err_builtin_invalid_arg_type. (NFC)

2021-10-26 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2021-10-26T20:28:16+01:00 New Revision: d7fbad0dcfc950d76df6b52fc10cdfe945d07eb7 URL: https://github.com/llvm/llvm-project/commit/d7fbad0dcfc950d76df6b52fc10cdfe945d07eb7 DIFF: https://github.com/llvm/llvm-project/commit/d7fbad0dcfc950d76df6b52fc10cdfe945d07eb7.diff

[PATCH] D112532: [Matrix] Replace some err kinds with err_builtin_invalid_arg_type. (NFC)

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. fhahn marked an inline comment as done. Closed by commit rGd7fbad0dcfc9: [Matrix] Replace some err kinds with err_builtin_invalid_arg_type. (NFC) (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[clang] c24a580 - Reinstate "[clang-repl] Re-implement clang-interpreter as a test case."

2021-10-26 Thread Vassil Vassilev via cfe-commits
Author: Vassil Vassilev Date: 2021-10-26T19:29:56Z New Revision: c24a58081b527fa8c61222b67af5f17f4c2cc63b URL: https://github.com/llvm/llvm-project/commit/c24a58081b527fa8c61222b67af5f17f4c2cc63b DIFF: https://github.com/llvm/llvm-project/commit/c24a58081b527fa8c61222b67af5f17f4c2cc63b.diff LO

[PATCH] D112110: [OpenCL] queue_t and ndrange_t can't be defined in program scope.

2021-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:6844 // scope. + // OpenCL v2.0 s6.5.1: + // Variables defined at program scope and static variables inside a function To make things concise I would suggest dropping OpenCL v2.0 quote

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-26 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 382430. JonChesterfield added a comment. - drop outdated comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112227/new/ https://reviews.llvm.org/D112227 Files: clang/lib/Driver/ToolChains/AMDGPUOp

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D109144#3066194 , @linjamaki wrote: >> Thanks for the clarifications. So it seems that you are not expecting that >> the device target triple is being explicitly passed anywhere then and that >> means you pass the device tr

[PATCH] D112284: [Clang][NFC] Clang CUDA codegen clean-up

2021-10-26 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D112284#3086499 , @bondhugula wrote: > @tra While on this, I also wanted to ask as to why clang cuda codegen is > using an argument on the global ctor and the dtor it's generating. It's a good question, and I don't have a good a

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-26 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 382433. JonChesterfield added a comment. - delete the extern debug_kind variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112227/new/ https://reviews.llvm.org/D112227 Files: clang/lib/Driver/Too

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-26 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. I think this is good enough for now. It drops the not yet used debug variable and writes out the lowering for runtime values of memory ordering manually. The latter will be simplified once clang learns to emit the switch instead of error. Omp lock is a problem I

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-26 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. In D109632#3088479 , @vsapsai wrote: > Code-wise I'm not aware of any remaining issues. Still need to update the > commit message and to re-run the clang test suite. But you can totally use > the patch for testing. I plan to updat

[PATCH] D112571: [clangd] IncludeCleaner: Don't warn on system headers

2021-10-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This is a temporary hack to dis

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-26 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 382441. JonChesterfield added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112227/new/ https://reviews.llvm.org/D112227 Files: clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp open

[PATCH] D104058: ThinLTO: Fix inline assembly references to static functions with CFI

2021-10-26 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Mentioning it here in case others run into the same thing: We bisected a 7x (!) binary size regression to this. Details at https://bugs.chromium.org/p/chromium/issues/detail?id=1261715 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-26 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 382442. JonChesterfield added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112227/new/ https://reviews.llvm.org/D112227 Files: clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp open

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 382443. fhahn added a comment. Apply UsualUnaryConversions to input argument. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111986/new/ https://reviews.llvm.org/D111986 Files: clang/include/clang/Basic/Builtin

[PATCH] D111986: [Clang] Add elementwise abs builtin.

2021-10-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16547 + Expr *A = TheCall->getArg(0); + QualType TyA = A->getType(); + aaron.ballman wrote: > fhahn wrote: > > aaron.ballman wrote: > > > Should thi

<    1   2   3   >