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

2021-10-29 Thread James King via Phabricator via cfe-commits
jcking1034 added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4652 +/// matches `[this]() { return cc; }`. +AST_MATCHER(LambdaCapture, refersToThis) { return Node.capturesThis(); } + sammccall wrote: > Again, why `refersToThis` rat

[PATCH] D109950: [Clang] Enable IC/IF mode for __ibm128

2021-10-29 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. In D109950#3097161 , @rjmccall wrote: > Oh, yes, I think this should be preserving the old logic there and just > adding a new clause for explicit requests for ibm128, right? I think the old logic should be preserved yes. Howev

[PATCH] D112572: [docs][clang-format] warn on \code block indentation error

2021-10-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D112572#3089373 , @FederAndInk wrote: > In D112572#3089318 , > @HazardyKnusperkeks wrote: > >> Thanks for fixing my mistake. :) > > You're welcome ;) > > Thanks for your re

[PATCH] D112664: [clang-format][docs] fix indentation of rst code block

2021-10-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Hi, thanks for you contribution. But the `rst` is generated by a script, the error is in `Format.h`. And we already have a review for an even broader fix: D112572 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D112577: [clang][OpenMP] Initial parsing/sema for 'align' clause

2021-10-29 Thread David Pagan via Phabricator via cfe-commits
ddpagan updated this revision to Diff 383428. ddpagan added a comment. Thanks for the review, Aaron. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112577/new/ https://reviews.llvm.org/D112577 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/AST/RecursiveASTVisitor.

[clang] 68ffcd5 - Properly determine the end location of an ObjCObjectPointerType.

2021-10-29 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2021-10-29T13:15:53-07:00 New Revision: 68ffcd521347e3c8b97ca233239d503beff239f4 URL: https://github.com/llvm/llvm-project/commit/68ffcd521347e3c8b97ca233239d503beff239f4 DIFF: https://github.com/llvm/llvm-project/commit/68ffcd521347e3c8b97ca233239d503beff239f4.diff

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

2021-10-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D112101#3097387 , @rsmith wrote: > I think this is still not quite right Fixed in rG68ffcd521347e3c8b97ca233239d503beff239f4 . Repository: rG LLVM Github

[PATCH] D112577: [clang][OpenMP] Initial parsing/sema for 'align' clause

2021-10-29 Thread David Pagan via Phabricator via cfe-commits
ddpagan added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:362-364 + /// Sets the location of '('. + void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; } + aaron.ballman wrote: > ABataev wrote: > > Also worth to make it private > I

[PATCH] D109950: [Clang] Enable IC/IF mode for __ibm128

2021-10-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D109950#3097544 , @eandrews wrote: > In D109950#3097161 , @rjmccall > wrote: > >> Oh, yes, I think this should be preserving the old logic there and just >> adding a new clause for e

[clang] a43d1aa - [clang] Make 'align-mismatch' warning work without an associated function declaration

2021-10-29 Thread Alex Lorenz via cfe-commits
Author: Alex Lorenz Date: 2021-10-29T13:39:16-07:00 New Revision: a43d1aa8525649a64b1f0ed5a5c25718c28920c1 URL: https://github.com/llvm/llvm-project/commit/a43d1aa8525649a64b1f0ed5a5c25718c28920c1 DIFF: https://github.com/llvm/llvm-project/commit/a43d1aa8525649a64b1f0ed5a5c25718c28920c1.diff L

[PATCH] D109402: Make 'align-mismatch' warning work without an associated function declaration

2021-10-29 Thread Alex Lorenz 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 rGa43d1aa85256: [clang] Make 'align-mismatch' warning work without an associated function… (authored by arphaman). Herald added a project: clang. Repo

[clang] 8659b24 - [clang][NFC] Inclusive terms: Replace uses of whitelist in clang/lib/StaticAnalyzer

2021-10-29 Thread Zarko Todorovski via cfe-commits
Author: Zarko Todorovski Date: 2021-10-29T16:51:36-04:00 New Revision: 8659b241ae945632e2a1c3294073d0fdeacfdbde URL: https://github.com/llvm/llvm-project/commit/8659b241ae945632e2a1c3294073d0fdeacfdbde DIFF: https://github.com/llvm/llvm-project/commit/8659b241ae945632e2a1c3294073d0fdeacfdbde.di

[PATCH] D112642: [clang][NFC] Inclusive terms: Replace uses of whitelist in clang/lib/StaticAnalyzer

2021-10-29 Thread Zarko Todorovski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8659b241ae94: [clang][NFC] Inclusive terms: Replace uses of whitelist in… (authored by ZarkoCA). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112642/new/ h

[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute

2021-10-29 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D99#3096124 , @aaron.ballman wrote: > In D99#3095623 , @yonghong-song > wrote: > >>> Ah, yeah, I see what you mean - that does seem sort of unfortunate. Is it >>> possible t

[PATCH] D112768: [ARM] implement support for TLS register based stack protector

2021-10-29 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Codegen looks good, probably just need an additional conditional on `ARMSubtarget::isReadTPHard()`. With that and some more tests for cases we don't intend to support (thumb[1], soft tp) this LGTM. Great job @ardb ! Comment at: llvm/lib/Target

[PATCH] D112773: Allow __attribute__((swift_attr)) in attribute push pragmas

2021-10-29 Thread Becca Royal-Gordon via Phabricator via cfe-commits
beccadax added a comment. In D112773#3096185 , @aaron.ballman wrote: > `swift_attr` has no subjects, so this will attempt to spray the attribute > onto literally *everything*. That makes this incredibly risky to use with the > pragma approach (not to m

[PATCH] D112847: [AIX][Clang] Fix XL product name in AIX XL compatibility warning

2021-10-29 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA created this revision. ZarkoCA added reviewers: rzurob, cebowleratibm, sfertile. ZarkoCA requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Correct the XLC/C++ version in the warning message to use the information from XL's -qversion

[PATCH] D112591: [clang] [Objective C] Inclusive language: use objcmt-allowlist-dir-path= instead of objcmt-white-list-dir-path=

2021-10-29 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA updated this revision to Diff 383507. ZarkoCA added a comment. - Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112591/new/ https://reviews.llvm.org/D112591 Files: clang/docs/ClangCommandLineReference.rst clang/include/cl

[PATCH] D112285: [PowerPC] PPC backend optimization to lower int_ppc_tdw/int_ppc_tw intrinsics to TDI/TWI machine instructions

2021-10-29 Thread Victor Huang via Phabricator via cfe-commits
NeHuang updated this revision to Diff 383506. NeHuang added a comment. Addressed review comments from @nemanjai and @amyk Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112285/new/ https://reviews.llvm.org/D112285 Files: llvm/lib/Target/PowerPC/

[PATCH] D112850: [clang] 'unused-but-set-variable' warning should not apply to __block objective-c pointers

2021-10-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: ravikandhadai, ahatanak, mbenfield. Herald added a subscriber: ributzka. arphaman requested review of this revision. Herald added a project: clang. The `__block` Objective-C pointers can be set but not used due to a commonly used lifetime

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-10-29 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 383514. samitolvanen added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108479/new/ https://reviews.llvm.org/D108479 Files: clang/docs/LanguageExtensions.rst clang/incl

[PATCH] D112768: [ARM] implement support for TLS register based stack protector

2021-10-29 Thread Ard Biesheuvel via Phabricator via cfe-commits
ardb added inline comments. Comment at: llvm/lib/Target/ARM/ARMInstrInfo.cpp:102 + if (M.getStackProtectorGuard() == "tls") { +expandLoadStackGuardBase(MI, ARM::MRC, ARM::LDRi12); +return; nickdesaulniers wrote: > ardb wrote: > > nickdesaulniers wrote: >

[PATCH] D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`

2021-10-29 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier added a comment. Thanks for looking, Aaron. You're right that the main utility of the aggregation of format warnings is to extend C's type checking because there is no other good way, or good place, to do it. I have built hundreds of millions of shipping lines of C, C++ and Objective-

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-10-29 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 383518. samitolvanen marked 2 inline comments as done. samitolvanen added a comment. Missed a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108479/new/ https://reviews.llvm.org/D108479 Files: c

[PATCH] D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`

2021-10-29 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D112579#3097360 , @aaron.ballman wrote: > [...] Having the types in the signatures changes something I think might be > pretty fundamental to the way the format string checker works -- it tries to > figure out types *aft

[PATCH] D112289: Support: Use sys::path::is_style_{posix,windows}() in a few places

2021-10-29 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks tests on windows: http://45.33.8.238/win/47971/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112289/new/ https://reviews.ll

Re: [PATCH] D112289: Support: Use sys::path::is_style_{posix,windows}() in a few places

2021-10-29 Thread Duncan P. N. Exon Smith via cfe-commits
Looking now. > On 2021 Oct 29, at 16:07, Nico Weber via Phabricator > wrote: > > thakis added a comment. > > Looks like this breaks tests on windows: > http://45.33.8.238/win/47971/step_7.txt > > Please take a look and revert for now if it takes a while to fix. > > > Repository: > rG LLV

[clang] 9091df5 - Fix a use-after-scope from 99023627010bbfefb71e25a2b4d056de1cbd354e

2021-10-29 Thread Duncan P. N. Exon Smith via cfe-commits
Author: Duncan P. N. Exon Smith Date: 2021-10-29T16:25:13-07:00 New Revision: 9091df5fad52ab6a281d7f4d6a508696e6f9fbae URL: https://github.com/llvm/llvm-project/commit/9091df5fad52ab6a281d7f4d6a508696e6f9fbae DIFF: https://github.com/llvm/llvm-project/commit/9091df5fad52ab6a281d7f4d6a508696e6f9

[PATCH] D112289: Support: Use sys::path::is_style_{posix,windows}() in a few places

2021-10-29 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D112289#3097959 , @thakis wrote: > Looks like this breaks tests on windows: > http://45.33.8.238/win/47971/step_7.txt > > Please take a look and revert for now if it takes a while to fix. Should be fixed in 9091df5fad52ab6

[PATCH] D112732: [ASan] Removed AddressSanitizerPass function pass class and rolled it into the module pass for the new pass mangager only.

2021-10-29 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov updated this revision to Diff 383536. kstoimenov marked 2 inline comments as done. kstoimenov added a comment. Fixed test failures and crashes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112732/new/ https://reviews.llvm.org/D112732 F

[PATCH] D112732: [ASan] Removed AddressSanitizerPass function pass class and rolled it into the module pass for the new pass mangager only.

2021-10-29 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1289 + } + Modified |= ModuleSanitizer.instrumentModule(M); + if (Modified) At first I had module sanitizer run first, but some tests failed. Is it possible

[PATCH] D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`

2021-10-29 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier added a comment. Thanks Arthur for your feedback. void myprintf(const char *fmt, int n) __attribute__((format(printf, 1, 2))); // N.B.: int, not unsigned long int main() { myprintf("%lu", 3uL); // this should error myprintf("%d", 3uL); // this should not error } T

[clang] efa5cad - [CMake] Update Cmake cache file for Win to ARM Linux cross builds. NFC

2021-10-29 Thread Vladimir Vereschaka via cfe-commits
Author: Vladimir Vereschaka Date: 2021-10-29T18:55:49-07:00 New Revision: efa5cadcf7127558660a625766fd2f0fe417e98e URL: https://github.com/llvm/llvm-project/commit/efa5cadcf7127558660a625766fd2f0fe417e98e DIFF: https://github.com/llvm/llvm-project/commit/efa5cadcf7127558660a625766fd2f0fe417e98e

[clang-tools-extra] 972d413 - Use {DenseSet, SmallPtrSet}::contains (NFC)

2021-10-29 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2021-10-29T20:26:07-07:00 New Revision: 972d4133e9685558d0a1740d306af70c57e8e67a URL: https://github.com/llvm/llvm-project/commit/972d4133e9685558d0a1740d306af70c57e8e67a DIFF: https://github.com/llvm/llvm-project/commit/972d4133e9685558d0a1740d306af70c57e8e67a.diff L

[PATCH] D112864: [clang-tidy] Fix lint warnings in clang-tidy source code (NFC)

2021-10-29 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz created this revision. salman-javed-nz added reviewers: alexfh, aaron.ballman, carlosgalvezp. salman-javed-nz added a project: clang-tools-extra. Herald added subscribers: abrachet, lebedev.ri, zzheng, kbarton, xazax.hun, nemanjai. Herald added a reviewer: lebedev.ri. salman-javed-

[PATCH] D112864: [clang-tidy] Fix lint warnings in clang-tidy source code (NFC)

2021-10-29 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added a comment. No functional change is intended. The majority of clang-tidy check infractions were - readability-identifier-naming - llvm-qualified-auto - llvm-namespace-comment I have also fixed obvious typos wherever I noticed them. Repository: rG LLVM Github Monorepo C

<    1   2