[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator

2021-10-27 Thread Manas Gupta via Phabricator via cfe-commits
manas added a comment. In D112621#3090450 , @steakhal wrote: > It seems like the test does not exercise the modified code segment. > Please investigate, and make sure that the code you submit is actually > exercised by the test you provide. I am really

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

2021-10-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:6526 + } + + ASTContext &Ctx = S.Context; yonghong-song wrote: > aaron.ballman wrote: > > Should you also validate that the type is a pointer type? > Looks like we cannot do this. For

[PATCH] D110927: [analyzer] Access stored value of a constant array through a pointer to another type

2021-10-27 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1630-1641 +/// Returns true if the stored value can be accessed through the pointer to +/// another type: +/// const int arr[42] = {}; +/// auto* pchar = (char*)arr; +/// auto* punsig

[PATCH] D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

2021-10-27 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:200-204 +} else { + //[ First ]--> + //[ Second ]---> + // MIN^ + // The First range is entirely inside the Second one. Might

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

2021-10-27 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Please, try to focus on marking inline comments //done// if you accomplished them. It takes some time to reevaluate them one-by-one on each update. Aside from that, I'd like to apply these and play with them but I'm frequently having conflicts applying your patches. Re

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

2021-10-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 382696. aaron.ballman added a comment. Updated to use `EnsureDest()` based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111669/new/ https://reviews.llvm.org/D111669 Files: clang/lib/CodeGen/CGExprAgg.cpp clang/test/Co

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

2021-10-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D111669#3088970 , @rjmccall wrote: > Hmm. Generally these cases are expected to handle the situation where > there's no result slot passed in, which currently isn't exclusive to an > ignored result (although you could

[PATCH] D112633: [AST] fail rather than crash when const evaluating invalid c++ foreach

2021-10-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. sammccall requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D112633 Files: clang/lib/AST/ExprConstant.cpp

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

2021-10-27 Thread David Pagan via Phabricator via cfe-commits
ddpagan updated this revision to Diff 382701. ddpagan added a comment. Thanks for the review, Alexey. Made the requested changes except for modifying "used_children". After looking over other clause classes, for example, OMPNumThreadsClause, we're being consistent in how we're declaring these.

[PATCH] D112600: [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed

2021-10-27 Thread Peter Smith via Phabricator via cfe-commits
peter.smith accepted this revision. peter.smith added a comment. This revision is now accepted and ready to land. LGTM as this as CP15 can be used on architecture v6k and above, which maps to IsThumb2. As an aside from this patch, the Arm state could be considered too permissive as it will perm

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

2021-10-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111986/new/ https://reviews.llvm.org/D111986 ___ cfe-commits mailing li

[PATCH] D112387: [clang] [MinGW] Rename the 'Arch' member to 'SysrootName'. NFC.

2021-10-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. How is this different from `clang::driver::Driver::SysRoot`? From `SysrootName + "/sys-root"` looks like the `sys-root` directory is the sysroot? Perhaps there is a better way describing `Sy

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

2021-10-27 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi accepted this revision. akyrtzi added a comment. This revision is now accepted and ready to land. Do you intend to rename `clang/test/ARCMT/whitelisted` directory as a follow-up? Otherwise LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

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

2021-10-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112577/new/ https://reviews.llvm.org/D112577 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D74130: [clang] fix consteval call in default arguments

2021-10-27 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 382702. Tyker added a comment. In D74130#3085313 , @aaron.ballman wrote: > FWIW, I am not seeing double errors on that code. Here's the output I get > with this patch applied locally: > > F:\source\llvm-project>cat "

[PATCH] D74130: [clang] fix consteval call in default arguments

2021-10-27 Thread Tyker via Phabricator via cfe-commits
Tyker added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2393 InitScope.pop(); aaron.ballman wrote: > Is there a reason we're not moving this one to below > `AddInititializerToDecl()` as we did elsewhere? yes, It was causing a few test f

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

2021-10-27 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. I'll do an update soon taking into account all the suggestions. > Please, try to focus on marking inline comments done if you accomplished them. In the next update. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1706-1743 + // Check

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

2021-10-27 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA updated this revision to Diff 382708. ZarkoCA added a comment. - Rename directory 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/

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

2021-10-27 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA added a comment. In D112591#3090710 , @akyrtzi wrote: > Do you intend to rename `clang/test/ARCMT/whitelisted` directory as a > follow-up? Otherwise LGTM. Missed this initially, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

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

[PATCH] D112608: [clangd] IncludeCleaner: Do not process locations in built-in files

2021-10-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:137 +// Check if Loc is not written in a physical file. +if (FID.isInvalid() || SM.isWritten

[PATCH] D112600: [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed

2021-10-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers requested changes to this revision. nickdesaulniers added a comment. This revision now requires changes to proceed. Thanks for the patch! Comment at: clang/test/CodeGen/arm-tphard.c:10 +} + Let's make this a test under llvm/test/CodeGen/, using

[PATCH] D112608: [clangd] IncludeCleaner: Do not process locations in built-in files

2021-10-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 382713. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Resolve review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112608/new/ https://reviews.llvm.org/D112608 Files: clang-

[PATCH] D112608: [clangd] IncludeCleaner: Do not process locations in built-in files

2021-10-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp:245 +int y = CLI; + kadircet wrote: > you can change this to `int y = CLI + __llvm__` to explicitly check for both > CLI and built-in macros. Ahh, that's

[PATCH] D112387: [clang] [MinGW] Rename the 'Arch' member to 'SysrootName'. NFC.

2021-10-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D112387#3090707 , @MaskRay wrote: > How is this different from `clang::driver::Driver::SysRoot`? > > From `SysrootName + "/sys-root"` looks like the `sys-root` directory is the > sysroot? Perhaps there is a better way describ

[clang-tools-extra] 22079c6 - [clangd] IncludeCleaner: Do not process locations in built-in files

2021-10-27 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2021-10-27T19:31:43+02:00 New Revision: 22079c61a82300a9ea89aeea58d5bf2780a296e0 URL: https://github.com/llvm/llvm-project/commit/22079c61a82300a9ea89aeea58d5bf2780a296e0 DIFF: https://github.com/llvm/llvm-project/commit/22079c61a82300a9ea89aeea58d5bf2780a296e0.diff

[PATCH] D112608: [clangd] IncludeCleaner: Do not process locations in built-in files

2021-10-27 Thread Kirill Bobyrev 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 rG22079c61a823: [clangd] IncludeCleaner: Do not process locations in built-in files (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHA

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

2021-10-27 Thread Ng Zhi An via Phabricator via cfe-commits
ngzhian updated this revision to Diff 382717. ngzhian added a comment. Make intrinsics monomorphic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112186/new/ https://reviews.llvm.org/D112186 Files: clang/include/clang/Basic/BuiltinsWebAssembly.de

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

2021-10-27 Thread Ng Zhi An via Phabricator via cfe-commits
ngzhian marked 2 inline comments as done. ngzhian added a comment. Good suggestion, done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112186/new/ https://reviews.llvm.org/D112186 ___ cfe-commits mailin

[PATCH] D112336: [Serialization] Fix a uniqueness check

2021-10-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This looks like a sensible change to me, but it is missing test coverage. Can you add a test that demonstrates what this fixes? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112336/new/ https://reviews.llvm.org/D1123

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

2021-10-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVSubtarget.h:141 + // either v or zve* suppaort v instructions + bool hasStdExtV() const { return HasStdExtV || HasStdExtZve32x; } + bool hasStdExtZve32x() const { return HasStdExtZve32x; } -

[PATCH] D112639: [openmp][amdgpu] Add comment warning that libm may be broken

2021-10-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield created this revision. JonChesterfield added reviewers: arsenm, jdoerfert, gregrodgers, pdhaliwal, ye-luo, tianshilei1992, b-sumner. Herald added subscribers: kerbowa, guansong, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl. JonChesterfield requested review of this re

[PATCH] D112387: [clang] [MinGW] Rename the 'Arch' member to 'SysrootName'. NFC.

2021-10-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Making the word `Subdir` part of the variable name LG. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112387/new/ https://reviews.llvm.org/D112387 ___ cfe-commits mailing list cfe

[PATCH] D112639: [openmp][amdgpu] Add comment warning that libm may be broken

2021-10-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a reviewer: ronlieb. JonChesterfield added a comment. Using phab as a bug tracker here, but am also happy to check in that comment as-is if someone hits the green button. The problem is that rocm device-libs doesn't have architecture specific attributes set because it uses

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

2021-10-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D112491#3088363 , @jcking1034 wrote: > @aaron.ballman for the purpose of these matchers, what @ymandel said is > correct - the goal is to allow `LambdaCapture`s themselves to be bindable. Should we be discussing deprec

[PATCH] D112608: [clangd] IncludeCleaner: Do not process locations in built-in files

2021-10-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry to be late to the party, just some efficiency concerns Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:133 +// Check if Loc is not written in a physical file. +if (FID.isInvalid() || SM.isWrittenInBuiltinFile(Loc) || +SM.

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

2021-10-27 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA created this revision. ZarkoCA added reviewers: zaks.anna, jkorous, george.karpenkov, ygribov, Szelethus, quinnp, aaron.ballman. ZarkoCA added a project: clang. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, donat.nagy, a.sidorin, baloghadamsoftware. ZarkoCA requested re

[PATCH] D112608: [clangd] IncludeCleaner: Do not process locations in built-in files

2021-10-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I'll try some things out and send a patch... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112608/new/ https://reviews.llvm.org/D112608 ___ cfe-commits mailing list cfe-commits

[PATCH] D112608: [clangd] IncludeCleaner: Do not process locations in built-in files

2021-10-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D112608#3090910 , @sammccall wrote: > Sorry to be late to the party, just some efficiency concerns No problem, thank you for the comments, I'll send a follow-up! Comment at: clang-tools-extra/clangd/Includ

[PATCH] D112608: [clangd] IncludeCleaner: Do not process locations in built-in files

2021-10-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D112608#3090971 , @sammccall wrote: > I'll try some things out and send a patch... Oh, okay, I won't do mine then to avoid crashing into each other. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[clang] 4723c9b - [NFC] `IRBuilderBase::CreateAdd()`: place constant onto RHS

2021-10-27 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2021-10-27T21:34:38+03:00 New Revision: 4723c9b3c6c46632a5d66e65d198899894b1e2c5 URL: https://github.com/llvm/llvm-project/commit/4723c9b3c6c46632a5d66e65d198899894b1e2c5 DIFF: https://github.com/llvm/llvm-project/commit/4723c9b3c6c46632a5d66e65d198899894b1e2c5.diff

[PATCH] D112413: [X86] Add -mskip-rax-setup support to align with GCC

2021-10-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers requested changes to this revision. nickdesaulniers added a comment. This revision now requires changes to proceed. Thanks for the patch; I'd like to see this encoded in the IR (perhaps as a function level attribute), the `-mno-` variant added, and perhaps help the user if they f

[PATCH] D112645: [OpenMP] Fix: opposite attributes could be set by -fno-inline

2021-10-27 Thread Igor Kirillov via Phabricator via cfe-commits
igor.kirillov created this revision. Herald added subscribers: guansong, yaxunl. igor.kirillov requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. After the changes introduced by D106799

[PATCH] D109496: [clang] deprecate frelaxed-template-template-args, make it on by default

2021-10-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks, let's land this and see how it goes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109496/new/ https://reviews.llvm.org/D109496 ___

[PATCH] D112504: [OpenMP] Wrap (v)printf in the new RT and use same handling for AMD

2021-10-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. This doesn't apply against main, diff relative to something that isn't in main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112504/new/ https://reviews.llvm.org/D112504

[PATCH] D112646: [clang-tidy] Add `readability-container-contains` check

2021-10-27 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang created this revision. Herald added subscribers: carlosgalvezp, xazax.hun, mgorny. avogelsgesang requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. This commit introduces a new check `readability-container-contains` w

[PATCH] D112647: [clang-apply-replacements] Correctly handle relative paths

2021-10-27 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang created this revision. Herald added a subscriber: carlosgalvezp. avogelsgesang requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. The fixes from the YAML file can refer to relative paths. Those relative paths are mean

[PATCH] D112647: [clang-apply-replacements] Correctly handle relative paths

2021-10-27 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang updated this revision to Diff 382741. avogelsgesang added a comment. Remove unrelated changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112647/new/ https://reviews.llvm.org/D112647 Files: clang-tools-extra/clang-apply-replaceme

[PATCH] D112633: [AST] fail rather than crash when const evaluating invalid c++ foreach

2021-10-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/SemaCXX/constexpr-function-recovery-crash.cpp:73 + +struct X { int a; } array[] = {{undef()}}; // expected-error {{use of undeclared identifier 'u

[PATCH] D112645: [OpenMP] Fix: opposite attributes could be set by -fno-inline

2021-10-27 Thread Igor Kirillov via Phabricator via cfe-commits
igor.kirillov added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5370 if (CGM.getCodeGenOpts().OptimizationLevel != 0) Fn->addFnAttr(llvm::Attribute::AlwaysInline); return Fn; I noticed that here we set this attribute on the same fun

[PATCH] D112648: [clang-tidy] Improve fix-its for `modernize-pass-by-value` check

2021-10-27 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. avogelsgesang requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. This commit improves the fix-its of `modernize-pass-by-value` in two ways: 1

[PATCH] D112504: [OpenMP] Wrap (v)printf in the new RT and use same handling for AMD

2021-10-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 382747. JonChesterfield added a comment. -rebase on main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112504/new/ https://reviews.llvm.org/D112504 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/lib/

[PATCH] D112647: [clang-apply-replacements] Correctly handle relative paths

2021-10-27 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added reviewers: ymandel, njames93. avogelsgesang added a comment. Adding reviewers based on `git log` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112647/new/ https://reviews.llvm.org/D112647 ___

[PATCH] D112652: [clangd] Avoid expensive checks of buffer names in IncludeCleaner

2021-10-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kbobyrev. Herald added subscribers: usaxena95, kadircet, arphaman. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This changes the ha

[clang] 101aaf6 - Revert "[NFC] `IRBuilderBase::CreateAdd()`: place constant onto RHS"

2021-10-27 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2021-10-27T22:21:37+03:00 New Revision: 101aaf62efef1ee55e0bc9fa78a83d8a4c6fcee6 URL: https://github.com/llvm/llvm-project/commit/101aaf62efef1ee55e0bc9fa78a83d8a4c6fcee6 DIFF: https://github.com/llvm/llvm-project/commit/101aaf62efef1ee55e0bc9fa78a83d8a4c6fcee6.diff

[PATCH] D107339: [analyzer] Retrieve a character from StringLiteral as an initializer for constant arrays.

2021-10-27 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. I'm gonna add docs to `getSValFromStringLiteral` and update the patch. And of course will fix your nits. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1757-1760 + // FIXME: Nevertheless, we can't do the same for cases, like: + //

[PATCH] D112648: [clang-tidy] Improve fix-its for `modernize-pass-by-value` check

2021-10-27 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added a reviewer: alexfh. avogelsgesang added a subscriber: alexfh. avogelsgesang added a comment. not sure whom to add as a reviewer. According to `git log` this check wasn't changed for a while... Adding @alexfh based on `CODE_OWNERS.TXT` Repository: rG LLVM Github Monorepo

[PATCH] D112647: [clang-apply-replacements] Correctly handle relative paths

2021-10-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. I'm not really familiar w/ this code. But, if njames93 doesn't respond, then I'll give it a go. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112647/new/ https://reviews.llvm.org/D112647 __

[clang] 01870d5 - [Clang] Add elementwise abs builtin.

2021-10-27 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2021-10-27T21:01:44+01:00 New Revision: 01870d51b848166eee59ed2e77be0199a561cf59 URL: https://github.com/llvm/llvm-project/commit/01870d51b848166eee59ed2e77be0199a561cf59 DIFF: https://github.com/llvm/llvm-project/commit/01870d51b848166eee59ed2e77be0199a561cf59.diff

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

2021-10-27 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG01870d51b848: [Clang] Add elementwise abs builtin. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111986/new/ https://reviews.llvm.org/D

[PATCH] D109496: [clang] deprecate frelaxed-template-template-args, make it on by default

2021-10-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 382762. mizvekov added a comment. rebase, one last CI run. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109496/new/ https://reviews.llvm.org/D109496 Files: clang/include/clang/Basic/DiagnosticDriverKinds.t

[PATCH] D112652: [clangd] Avoid expensive checks of buffer names in IncludeCleaner

2021-10-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Thank you for taking care of this! Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:261 +if (!FE) { + assert(isSpecialBuffer(FID, SM)); + continue; Implementation-wise, this seems like the right place to drop nonex

[PATCH] D112659: Add a limit to __make_integer_seq builtin.

2021-10-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: aaron.ballman, majnemer, EricWF. Herald added subscribers: dexonsmith, dang. erichkeane requested review of this revision. As brought up in PR48246, passing a large value to `__make_integer_seq` results in the compiler getting stuck in

[PATCH] D111863: [libunwind] Add an interface for dynamic .eh_frame registration

2021-10-27 Thread Lang Hames via Phabricator via cfe-commits
lhames added a comment. @joerg Any further thoughts on this? I'm happy for it to go in as-is -- we can always make the implementation of `__unw_add_dynamic_eh_frame_section` / `__unw_remove_dynamic_eh_frame_section` later, but the API looks good to me, and I think this is a strict improvement

[PATCH] D112661: [clangd] reuse preambles from other files when possible

2021-10-27 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, javed.absar. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Keep a s

[PATCH] D112661: [clangd] reuse preambles from other files when possible

2021-10-27 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. This is a revisit of D97417 which is a bit out of date and fell into oblivion. I've been using a forked version of clangd including this change for months on my day-to-day work and it does significantly improve my experience. Some numbe

[PATCH] D112659: Add a limit to __make_integer_seq builtin.

2021-10-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: ldionne. erichkeane added a comment. Some additional data on a release build (on my quite recent Xeon 8260M): 2^24: 27 sec, ~3.3GB 2^25: 49 sec, ~6.4GB It follows a pretty linear pattern from there. I'm open to choosing a different limit if we find one more reaso

[PATCH] D112652: [clangd] Avoid expensive checks of buffer names in IncludeCleaner

2021-10-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:261 +if (!FE) { + assert(isSpecialBuffer(FID, SM)); + continue; kbobyrev wrote: > kbobyrev wrote: > > Implementation-wise, this seems like the right place to dr

[clang] de7494a - [AST] fail rather than crash when const evaluating invalid c++ foreach

2021-10-27 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2021-10-27T22:45:32+02:00 New Revision: de7494a33a5c3152dd0ed24ea1c8b2760255f2f7 URL: https://github.com/llvm/llvm-project/commit/de7494a33a5c3152dd0ed24ea1c8b2760255f2f7 DIFF: https://github.com/llvm/llvm-project/commit/de7494a33a5c3152dd0ed24ea1c8b2760255f2f7.diff LO

[PATCH] D112633: [AST] fail rather than crash when const evaluating invalid c++ foreach

2021-10-27 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rGde7494a33a5c: [AST] fail rather than crash when const evaluating invalid c++ foreach (authored by sammccall). Changed prior to commit: https://reviews.llvm.or

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-10-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Herald added a subscriber: carlosgalvezp. Comment at: clang/include/clang/AST/Type.h:4968 QualType getDeducedType() const { -return !isCanonicalUnqualified() ? getCanonicalTypeInternal() : QualType(); +return DeducedAsType.isNull() ? QualT

[clang] 2d7fba5 - [clang] deprecate frelaxed-template-template-args, make it on by default

2021-10-27 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2021-10-27T22:48:27+02:00 New Revision: 2d7fba5f95f0614f6f2c4a4ed966b307d617898b URL: https://github.com/llvm/llvm-project/commit/2d7fba5f95f0614f6f2c4a4ed966b307d617898b DIFF: https://github.com/llvm/llvm-project/commit/2d7fba5f95f0614f6f2c4a4ed966b307d617898b.dif

[PATCH] D109496: [clang] deprecate frelaxed-template-template-args, make it on by default

2021-10-27 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2d7fba5f95f0: [clang] deprecate frelaxed-template-template-args, make it on by default (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D112652: [clangd] Avoid expensive checks of buffer names in IncludeCleaner

2021-10-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 382779. sammccall added a comment. Add more docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112652/new/ https://reviews.llvm.org/D112652 Files: clang-tools-extra/clangd/IncludeCleaner.cpp clang-tools-

[PATCH] D112663: [clang-repl] Allow Interpreter::getSymbolAddress to take a mangled name.

2021-10-27 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added reviewers: rsmith, sgraenitz, lhames, thakis. Herald added a subscriber: mgorny. v.g.vassilev requested review of this revision. Repository: rC Clang https://reviews.llvm.org/D112663 Files: clang/include/clang/Interpreter/Interpreter.h

[clang] 086e111 - [clang] NFC: include non friendly types and missing sugar in test expectations

2021-10-27 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2021-10-27T23:03:29+02:00 New Revision: 086e111216bc4fb8065aa7ef4bc226380d1c237e URL: https://github.com/llvm/llvm-project/commit/086e111216bc4fb8065aa7ef4bc226380d1c237e DIFF: https://github.com/llvm/llvm-project/commit/086e111216bc4fb8065aa7ef4bc226380d1c237e.dif

[PATCH] D110210: [clang] NFC: include non friendly types and missing sugar in test expectations

2021-10-27 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG086e111216bc: [clang] NFC: include non friendly types and missing sugar in test expectations (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D112659: Add a limit to __make_integer_seq builtin.

2021-10-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I wonder if more generally we should have a limit on either the size of a pack or the number of template arguments in a template specialization, rather than limiting only `__make_integer_seq`? I think a hand-rolled `make_integer_sequence` implementation should also be li

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

2021-10-27 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier updated this revision to Diff 382788. fcloutier added a reviewer: ahatanak. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112569/new/ https://reviews.llvm.org/D112569 Files: clang/lib/Sema/SemaChecking.cpp clang/test/Sema/format-string

[PATCH] D112387: [clang] [MinGW] Rename the 'Arch' member to 'SysrootName'. NFC.

2021-10-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 382798. mstorsjo added a comment. Renamed the variable to `SubdirName`. Will push tomorrow. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112387/new/ https://reviews.llvm.org/D112387 Files: clang/lib/Driver

[PATCH] D111952: [clang] [MinGW] Guess the right ix86 arch name spelling as sysroot

2021-10-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 382801. mstorsjo added a comment. Rebased after renaming `SysrootName` to `SubdirName`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111952/new/ https://reviews.llvm.org/D111952 Files: clang/lib/Driver/Dri

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-27 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield updated this revision to Diff 382802. mbenfield added a comment. rebase and rerun tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111833/new/ https://reviews.llvm.org/D111833 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

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

2021-10-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak 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/D112569/new/ https://reviews.llvm.org/D112569 ___

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

2021-10-27 Thread Mike via Phabricator via cfe-commits
Wirena created this revision. Wirena added a reviewer: HazardyKnusperkeks. Wirena requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D112664 Files: clang/docs/ClangFormatStyleO

[libunwind] 3e39bbf - [libunwind] Simplify the executor used in the tests

2021-10-27 Thread Louis Dionne via cfe-commits
Author: Louis Dionne Date: 2021-10-27T17:30:07-04:00 New Revision: 3e39bbf5f9614327bb09d6527db8b40fc472fedf URL: https://github.com/llvm/llvm-project/commit/3e39bbf5f9614327bb09d6527db8b40fc472fedf DIFF: https://github.com/llvm/llvm-project/commit/3e39bbf5f9614327bb09d6527db8b40fc472fedf.diff

[PATCH] D112600: [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed

2021-10-27 Thread Ard Biesheuvel via Phabricator via cfe-commits
ardb added inline comments. Comment at: clang/test/CodeGen/arm-tphard.c:10 +} + nickdesaulniers wrote: > Let's make this a test under llvm/test/CodeGen/, using IR: > ``` > ; RUN: llc --mtriple=armv7-linux-gnueabihf -o - %s | FileCheck %s > ; RUN: llc --mtriple=th

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-10-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112349/new/ https://reviews.llvm.org/D112349 __

[PATCH] D112663: [clang-repl] Allow Interpreter::getSymbolAddress to take a mangled name.

2021-10-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:70 llvm::Expected - getSymbolAddress(llvm::StringRef UnmangledName) const; + getSymbolAddress(llvm::StringRef Name, bool IsMangled = false) const; }; I find this flag na

[PATCH] D112413: [X86] Add -mskip-rax-setup support to align with GCC

2021-10-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:3193 +def mskip_rax_setup : Flag<["-"], "mskip-rax-setup">, Group, Flags<[NoXarchOption]>, + HelpText<"Skip setting up RAX register when passing variable arguments (x86 only)">; def mstackrealign

[PATCH] D112600: [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed

2021-10-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/test/CodeGen/arm-tphard.c:10 +} + ardb wrote: > nickdesaulniers wrote: > > Let's make this a test under llvm/test/CodeGen/, using IR: > > ``` > > ; RUN: llc --mtriple=armv7-linux-gnueabihf -o - %s | FileChe

[PATCH] D112534: [PoC][RISCV] Use an attribute to declare C intrinsics with different policy.

2021-10-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I think the concept seems good to me. I'd like @aaron.ballman to review the attribute code. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:18610 unsigned NF = 1; constexpr unsigned TAIL_UNDISTURBED = 0; + constexpr unsigned TAIL_AGNOSTIC = 0b0

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

2021-10-27 Thread Chuang-Yu Cheng via Phabricator via cfe-commits
cycheng updated this revision to Diff 382813. cycheng marked 2 inline comments as done. cycheng added a comment. - Remove OpenCL 2.0 description - Merge test files into single test file CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112110/new/ https://reviews.llvm.org/D112110 Files:

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

2021-10-27 Thread Chuang-Yu Cheng via Phabricator via cfe-commits
cycheng updated this revision to Diff 382816. cycheng added a comment. previous update was using wrong file, sorry!! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112110/new/ https://reviews.llvm.org/D112110 Files: clang/lib/Sema/SemaDecl.cpp clang/test/SemaOpenCL/invalid-types.cl

[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

2021-10-27 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier created this revision. fcloutier added reviewers: doug.gregor, dcoughlin, rsmith, NoQ, ahatanak. fcloutier added a project: clang. Herald added a reviewer: aaron.ballman. fcloutier requested review of this revision. Herald added a subscriber: cfe-commits. It has come to my attention that

[PATCH] D112600: [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed

2021-10-27 Thread Ard Biesheuvel via Phabricator via cfe-commits
ardb updated this revision to Diff 382826. ardb added a comment. Drop new Clang CodeGen test, and add the Thumb2 check to an existing backend test instead. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112600/new/ https://reviews.llvm.org/D112600 Files: llvm/lib/Target/ARM/ARMInstrT

[clang] d378a0f - [Sema] Recognize format argument indicated by format attribute inside blocks

2021-10-27 Thread Félix Cloutier via cfe-commits
Author: Félix Cloutier Date: 2021-10-27T15:48:35-07:00 New Revision: d378a0febc7e13aae7853b2e8733626f61140e55 URL: https://github.com/llvm/llvm-project/commit/d378a0febc7e13aae7853b2e8733626f61140e55 DIFF: https://github.com/llvm/llvm-project/commit/d378a0febc7e13aae7853b2e8733626f61140e55.diff

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

2021-10-27 Thread Félix Cloutier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd378a0febc7e: [Sema] Recognize format argument indicated by format attribute inside blocks (authored by fcloutier). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

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

2021-10-27 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Agreed. If after semantic analysis for a declaration we can check declaration's typeloc chain again, we might be able to give proper warnings. I am happy to implement this as a followup as you suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D112600: [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed

2021-10-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Cool, if you wouldn't mind additional extending this patch to cover the intrinsic that the front end also generates, this LGTM: diff --git a/llvm/test/CodeGen/ARM/thread_po

[PATCH] D112413: [X86] Add -mskip-rax-setup support to align with GCC

2021-10-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:96 +static cl::opt SkipRaxSetup( +"x86-skip-rax-setup", cl::init(false), MaskRay wrote: > nickdesaulniers wrote: > > If it's a command line option rather than encoded

<    1   2   3   >