[PATCH] D141280: [clang][wip] Build UsingType for elaborated type specifiers.

2023-01-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. though this is a hack implementation, the result seems promising to me, so I post it for initial thoughts. Comment at: clang/include/clang/Sema/Sema.h:3307 Decl *ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation

[PATCH] D140462: [clangd] Add schema for `.clangd` config

2023-01-10 Thread Edwin Kofler via Phabricator via cfe-commits
hyperupcall updated this revision to Diff 487706. hyperupcall added a comment. Improve schema correctness and disable `additionalProperties` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140462/new/ https://reviews.llvm.org/D140462 Files: clang-

[PATCH] D140462: [clangd] Add schema for `.clangd` config

2023-01-10 Thread Edwin Kofler via Phabricator via cfe-commits
hyperupcall abandoned this revision. hyperupcall added a comment. I think I abandon this revision for the reasons stated above - there is an improved path forward at https://reviews.llvm.org/D140745 with autogenerated files. Reposito

[PATCH] D141192: [Clang] Fix warnings on bad shifts.

2023-01-10 Thread Dmitriy Chestnykh via Phabricator via cfe-commits
chestnykh added a comment. Ping, can someone review my changes? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141192/new/ https://reviews.llvm.org/D141192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[PATCH] D141280: [clang][wip] Build UsingType for elaborated type specifiers.

2023-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I'll bite, why do you say it's hacky? Looks OK to me, by clang standards :-) Comment at: clang/include/clang/Sema/DeclSpec.h:516 + } + Decl *getRepAsOriginDecl() const { +assert(isDeclRep((TST)TypeSpecType) && "DeclSpec does not store a decl");

[PATCH] D141342: [perf-training] Check extension in findFilesWithExtension

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

[PATCH] D140956: [clang-format] Add an option for breaking after C++11 attributes

2023-01-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. It looks like this regressed the following example: % cat test.cc # formatted with older clang-format a &cc() { return 1; } % clang-format --version clang-format version 16.0.0 (https://gith

[PATCH] D139774: [libclang] Add API to set temporary directory location

2023-01-10 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D139774#4036496 , @aaron.ballman wrote: > Given that we already have other setters to set global state, I'm less > concerned about adding another one. I hadn't realized we already introduced > the dangers here. But we should d

[PATCH] D141349: Remove the ThreadLocal template from LLVM.

2023-01-10 Thread Nikita Popov via Phabricator via cfe-commits
nikic accepted this revision. nikic added a comment. This revision is now accepted and ready to land. Herald added a subscriber: StephenFan. LGTM > As a precaution, use LLVM_THREAD_LOCAL which provides even greater > backwards compatibility, allowing this to function even pre-C++11 > versions of

[PATCH] D141362: [AST] include decls owned by FriendDecl in -ast-dump

2023-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a project: All. 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/D141362 Files: cl

[PATCH] D141362: [AST] include decls owned by FriendDecl in -ast-dump

2023-01-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein 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/D141362/new/ https://reviews.llvm.org/D141362

[PATCH] D139921: [include-cleaner] Ranking of providers based on hints

2023-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 26 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/AnalysisInternal.h:84 +/// Represents properties of a symbol provider. +enum class Hint : uint8_t { sammccall wrote: > along with `Symb

[PATCH] D139921: [include-cleaner] Ranking of providers based on hints

2023-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 487721. kadircet marked 5 inline comments as done. kadircet added a comment. - Address all comments but the ones on tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139921/new/ https://reviews.llvm.org/D13

[clang] 879bfe6 - Revert "[clang-format] Add an option for breaking after C++11 attributes"

2023-01-10 Thread Krasimir Georgiev via cfe-commits
Author: Krasimir Georgiev Date: 2023-01-10T09:23:44Z New Revision: 879bfe6a979295f834b76df66b19a203b93eed0f URL: https://github.com/llvm/llvm-project/commit/879bfe6a979295f834b76df66b19a203b93eed0f DIFF: https://github.com/llvm/llvm-project/commit/879bfe6a979295f834b76df66b19a203b93eed0f.diff

[clang] 96b52c1 - [Clang][RISCV] Expose vlenb to user

2023-01-10 Thread via cfe-commits
Author: eopXD Date: 2023-01-10T02:23:44-08:00 New Revision: 96b52c1eec7b7952059a4cc4acd2f5e62e1ba1ca URL: https://github.com/llvm/llvm-project/commit/96b52c1eec7b7952059a4cc4acd2f5e62e1ba1ca DIFF: https://github.com/llvm/llvm-project/commit/96b52c1eec7b7952059a4cc4acd2f5e62e1ba1ca.diff LOG: [C

[PATCH] D141032: [Clang][RISCV] Expose vlenb to user

2023-01-10 Thread Yueh-Ting (eop) Chen 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 rG96b52c1eec7b: [Clang][RISCV] Expose vlenb to user (authored by eopXD). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D141350: Fix runtime problem for base class member data used in target region.

2023-01-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8490 +if (MD) + if (const CXXRecordDecl *RD = dyn_cast(MD->getParent())) +HasBaseClass = RD->getNumBases() > 0; `const auto *RD = dyn_cast(MD->getParent())`. Also, c

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-01-10 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 487747. pmatos added a comment. Fix test broken after recent change to opt call. Rebase again on main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/i

[PATCH] D141050: [standalone-build] outsource, simplify and unify repetitive CMake code

2023-01-10 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk updated this revision to Diff 487750. kwk marked 2 inline comments as done. kwk added a comment. - Don't quote output variables - Use 2 space indention in CMake files - Make out_var optional for get_llvm_utility_binary_path - Rename get_llvm_utility_binary_path -> require_llvm_utility_binary_p

[PATCH] D141050: [standalone-build] outsource, simplify and unify repetitive CMake code

2023-01-10 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk added a comment. Thank you @phosek for your review! I really appreciate it. I've addressed all of your comments. Could you give it another review? Comment at: clang/CMakeLists.txt:35 + include(StandaloneBuildHelpers) + get_llvm_utility_binary_path("llvm-tblgen" "LLVM_TAB

[PATCH] D140956: [clang-format] Add an option for breaking after C++11 attributes

2023-01-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Before M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=0 Name=identifier L=25 PPK=2 FakeLParens= FakeRParens=0 II=0x1aa92d99900 Text='a' M=0 C=0 T=TemplateOpener S=0 F=0 B=0 BK=0 P=30 Name=less L=26 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='<

[PATCH] D141375: [SYCL][OpenMP] Fix compilation errors for unsupported __bf16 intrinsics

2023-01-10 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews created this revision. eandrews added reviewers: mikerice, jyu2, bader, jdoerfert, aaron.ballman. Herald added subscribers: Naghasan, Anastasia, ebevhan, guansong, yaxunl. Herald added a project: All. eandrews requested review of this revision. Herald added a subscriber: sstefan1. This pa

[clang] 98ae361 - [AST] include decls owned by FriendDecl in -ast-dump

2023-01-10 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-01-10T13:59:58+01:00 New Revision: 98ae3616cd1536643a78beeddff119c028f71df6 URL: https://github.com/llvm/llvm-project/commit/98ae3616cd1536643a78beeddff119c028f71df6 DIFF: https://github.com/llvm/llvm-project/commit/98ae3616cd1536643a78beeddff119c028f71df6.diff LO

[PATCH] D141362: [AST] include decls owned by FriendDecl in -ast-dump

2023-01-10 Thread Sam McCall 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 rG98ae3616cd15: [AST] include decls owned by FriendDecl in -ast-dump (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-10 Thread Vincent LE GARREC via Phabricator via cfe-commits
bansan added a comment. About my template example: I wanted to say that the actual `bugprone-implicit-widening-of-multiplication-result` rule looks to not analyze template calculation problem. So I think it's better to use the desugared type (`size_t`). It's not acceptable (IMHO) that the hard

[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > About my template example: I wanted to say that the actual > bugprone-implicit-widening-of-multiplication-result rule looks to not analyze > template calculation problem. So I think it's better to use the desugared > type (size_t). Hmm, I don't think this two ar

[PATCH] D141380: [clang-repl] XFAIL riscv targets in simple-exception test case

2023-01-10 Thread Alex Bradbury via Phabricator via cfe-commits
asb created this revision. asb added reviewers: sunho, lhames. Herald added subscribers: wingo, sunshaoce, pmatos, VincentWu, vkmr, evandro, luismarques, sameer.abuasal, s.egerton, Jim, benna, psnobl, PkmX, rogfer01, shiva0217, kito-cheng, simoncook, kristof.beyls, arichardson. Herald added a pro

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 487769. ymandel added a comment. use `std::optional` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140703/new/ https://reviews.llvm.org/D140703 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnaly

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:89 + ? DataflowAnalysisContext::Options{} + : llvm::Optional()}) {} xazax.hun wrote: > If we already change this code, I thi

[PATCH] D141324: [clang] extend external_source_symbol attribute with the USR clause

2023-01-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I'm disturbed that the string-literal diagnostic you changed never shows up in the tests. I suspect this attribute needs significantly better test coverage. Comment at: clang/docs/LanguageExtensions.rst:4815 + +An optional USR string literal can be

Re: [clang-tools-extra] ef9aa34 - Revert "Remove the ThreadLocal template from LLVM."

2023-01-10 Thread Roman Lebedev via cfe-commits
Reminder to please always mention the reason for the revert/recommit in the commit message. On Tue, Jan 10, 2023 at 7:22 AM Owen Anderson via cfe-commits wrote: > > > Author: Owen Anderson > Date: 2023-01-09T21:21:38-07:00 > New Revision: ef9aa34f0274cdbfa82c47f8ab99f02679fd0d13 > > URL: > https

[clang] 264976d - [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-10 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-10T14:17:25Z New Revision: 264976d98e785fa061ce6ac06db4a9bda2590506 URL: https://github.com/llvm/llvm-project/commit/264976d98e785fa061ce6ac06db4a9bda2590506 DIFF: https://github.com/llvm/llvm-project/commit/264976d98e785fa061ce6ac06db4a9bda2590506.diff

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-10 Thread Yitzhak Mandelbaum 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 rG264976d98e78: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext… (authored by ymandel). Repository: rG LLVM Github Monorepo

[PATCH] D137381: [clang][compiler-rt] Exception escape out of an non-unwinding function is an undefined behaviour

2023-01-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D137381#4038716 , @MaskRay wrote: > I am unfamiliar with Clang codegen so I am just commenting about what a user > may feel about this feature. > > `compiler-rt/test/ubsan/TestCases/Misc/exception-escape.cpp` cannot > demo

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487778. ccotter added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140307/new/ https://reviews.llvm.org/D140307 Files: clang-tools-extra/docs/ReleaseNotes.rst Index: clang-tools-extra/do

[clang] 089a544 - [clang][dataflow][NFC] Refine names and comments for field filtering.

2023-01-10 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-10T14:28:45Z New Revision: 089a54469f63c2f3c4b9d79fb9694f21bef0d071 URL: https://github.com/llvm/llvm-project/commit/089a54469f63c2f3c4b9d79fb9694f21bef0d071 DIFF: https://github.com/llvm/llvm-project/commit/089a54469f63c2f3c4b9d79fb9694f21bef0d071.diff

[PATCH] D141319: [clang][dataflow][NFC] Refine names and comments for field filtering.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG089a54469f63: [clang][dataflow][NFC] Refine names and comments for field filtering. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1413

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-10 Thread Felipe de Azevedo Piovezan via Phabricator via cfe-commits
fdeazeve created this revision. Herald added a subscriber: kristof.beyls. Herald added a project: All. fdeazeve requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With codegen prior to this patch, truly indirect arguments -- i.e. those that ar

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487781. ccotter added a comment. rebase? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140307/new/ https://reviews.llvm.org/D140307 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp clang-

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. Rebased! Sorry for the multiple diffs on this phab - I'm still getting the hang of `arc diff`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140307/new/ https://reviews.llvm.org/D140307 ___

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-10 Thread Felipe de Azevedo Piovezan via Phabricator via cfe-commits
fdeazeve updated this revision to Diff 487782. fdeazeve added a comment. Simplified condition spelling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141381/new/ https://reviews.llvm.org/D141381 Files: clang/lib/CodeGen/CGDebugInfo.cpp clang/li

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-10 Thread Felipe de Azevedo Piovezan via Phabricator via cfe-commits
fdeazeve updated this revision to Diff 487784. fdeazeve added a comment. Improved comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141381/new/ https://reviews.llvm.org/D141381 Files: clang/lib/CodeGen/CGDebugInfo.cpp clang/lib/CodeGen/CG

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-10 Thread Felipe de Azevedo Piovezan via Phabricator via cfe-commits
fdeazeve added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.h:494 + CGBuilderTy &Builder, + const bool UsePointerValue = false); FWIW I used a `const` bool here to match the style already present

[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487789. ccotter added a comment. - Fix ParserTest.Errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140794/new/ https://reviews.llvm.org/D140794 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AS

[clang] 95be33f - Update dump_ast_matchers.py to Python 3

2023-01-10 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-01-10T09:53:06-05:00 New Revision: 95be33fb99a605f7261b5eb78ab25954e2e5ce26 URL: https://github.com/llvm/llvm-project/commit/95be33fb99a605f7261b5eb78ab25954e2e5ce26 DIFF: https://github.com/llvm/llvm-project/commit/95be33fb99a605f7261b5eb78ab25954e2e5ce26.diff

[clang] f30257e - Correct documentation for the hasBody() AST matcher; NFC

2023-01-10 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-01-10T09:53:19-05:00 New Revision: f30257ea9f34b36597067554a45a266dc914b5a7 URL: https://github.com/llvm/llvm-project/commit/f30257ea9f34b36597067554a45a266dc914b5a7 DIFF: https://github.com/llvm/llvm-project/commit/f30257ea9f34b36597067554a45a266dc914b5a7.diff

[PATCH] D141384: [clang][dataflow] Fix 2 bugs in `MemberExpr` interpretation.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, sgatev. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. There were two (small) bugs causi

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487794. ccotter added a comment. - [clang-tidy] Support begin/end free functions in modernize-loop-convert - Add release note - Update docs - Fix tests - Remove unused variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2023-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: sammccall. aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5503 + FunctionDecl, + Cor

[PATCH] D140925: [CMake] Use Clang to infer the target triple

2023-01-10 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. @tamas' suggestion would be a good change to make IMO, but I think it's outside the scope of this patch, and the patch as-is improves the status quo, so LGTM. Is there any way to share the normalization logic between the two locations, or

[PATCH] D135405: fix handling of braced-init temporaries for modernize-use-emplace

2023-01-10 Thread Peter Wolf via Phabricator via cfe-commits
BigPeet added a comment. Ping. (Sorry, it's my first time contributing to LLVM and I simply don't know what happens next. Do I need to do anything? Or is it just waiting to get merged at some point?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D140663: CUDA/HIP: Use kernel name to map to symbol

2023-01-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/incomplete-func-ptr-type.cu:2 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -x hip %s -o - \ +// RUN: | FileCheck %s + need to check `_Z19__device_stub__kern7TempValIjE` generates

[PATCH] D140315: [AMDGCN] Update search path for device libraries

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

[PATCH] D141144: [clang-tidy][doc] Improve clang-tidy documentation

2023-01-10 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. @njames93 Do you agree with the overall idea of documenting config file options like this? I need this in place for the other patch that cleans the duplication for `HeaderFileExtensions`, `ImplementationFileExtensions`, `IncludeStyle`, etc. Repository: rG LLVM

[clang] 44a080e - Fix the documentation for the hasBody AST matcher

2023-01-10 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-01-10T10:39:30-05:00 New Revision: 44a080eee52abdf3c88aff7df399ec23f445484d URL: https://github.com/llvm/llvm-project/commit/44a080eee52abdf3c88aff7df399ec23f445484d DIFF: https://github.com/llvm/llvm-project/commit/44a080eee52abdf3c88aff7df399ec23f445484d.diff

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:219 +- Improved :doc:`modernize-loop-convert ` to + refactor container based for loops that initialize iterators with free function calls Please keep alphabetical order

[clang] 03b83cd - Remove a stale FIXME comment; NFC

2023-01-10 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-01-10T10:44:40-05:00 New Revision: 03b83cd703d403cdfd6f0082423f99aae08d3606 URL: https://github.com/llvm/llvm-project/commit/03b83cd703d403cdfd6f0082423f99aae08d3606 DIFF: https://github.com/llvm/llvm-project/commit/03b83cd703d403cdfd6f0082423f99aae08d3606.diff

[PATCH] D135384: [AIX] Fix mcount name and call arguments

2023-01-10 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm closed this revision. cebowleratibm added a comment. I had a typo in the commit so this didn't auto close. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135384/new/ https://reviews.llvm.org/D135384 ___

[clang] 3ce03c4 - [clang][dataflow] Fix 2 bugs in `MemberExpr` interpretation.

2023-01-10 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-10T15:48:00Z New Revision: 3ce03c42dbb46531968c527d80c0243c2db7bc0e URL: https://github.com/llvm/llvm-project/commit/3ce03c42dbb46531968c527d80c0243c2db7bc0e DIFF: https://github.com/llvm/llvm-project/commit/3ce03c42dbb46531968c527d80c0243c2db7bc0e.diff

[PATCH] D141384: [clang][dataflow] Fix 2 bugs in `MemberExpr` interpretation.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ce03c42dbb4: [clang][dataflow] Fix 2 bugs in `MemberExpr` interpretation. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141384/new/

[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5503 + FunctionDecl, + CoroutineBodyStmt), interna

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-01-10 Thread Tomasz Kuchta via Phabricator via cfe-commits
tkuchta created this revision. tkuchta added reviewers: vitalybuka, glider. tkuchta added a project: Sanitizers. Herald added a subscriber: Enna1. Herald added a project: All. tkuchta requested review of this revision. This patch adds support for the following libc functions in DFSAN: strnlen, st

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487807. ccotter added a comment. - alpha Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140760/new/ https://reviews.llvm.org/D140760 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp clang-

[PATCH] D140860: [Diagnostics][NFC] Fix -Wlogical-op-parentheses warning inconsistency for const and constexpr values

2023-01-10 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. > FWIW a lot of build systems support setting CXXFLAGS/CFLAGS before invoking > the build system/build generator (cmake, for instance) and respects those - > so might be relatively easy to add a new warning flag to the build (& CXX/CC > to set the compiler to point to

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Alphabetize order of clang-tidy release notes, and fix `:doc:` link. Reposi

[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter marked an inline comment as done. ccotter added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:219 +- Improved :doc:`modernize-loop-convert ` to + refactor container based for loops that initialize iterators with free function calls

[PATCH] D139774: [libclang] Add API to set temporary directory location

2023-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D139774#4039018 , @vedgy wrote: > In D139774#4036496 , @aaron.ballman > wrote: > >> Given that we already have other setters to set global state, I'm less >> concerned about add

[clang-tools-extra] e432952 - [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-10 Thread Carlos Galvez via cfe-commits
Author: Chris Cotter Date: 2023-01-10T16:08:25Z New Revision: e43295209bb86e93008363c66c1277c7d8bb148c URL: https://github.com/llvm/llvm-project/commit/e43295209bb86e93008363c66c1277c7d8bb148c DIFF: https://github.com/llvm/llvm-project/commit/e43295209bb86e93008363c66c1277c7d8bb148c.diff LOG:

[PATCH] D140307: [clang-tidy] Match derived types in in modernize-loop-convert

2023-01-10 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe43295209bb8: [clang-tidy] Match derived types in in modernize-loop-convert (authored by ccotter, committed by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko accepted this revision. Eugene.Zelenko added a comment. This revision is now accepted and ready to land. Thank you for fix! Such issues may be result of rebase artifacts and slip into code base. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. I can't land these myself, so if you are able to, would you mind doing so? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141391/new/ https://reviews.llvm.org/D141391 ___

[PATCH] D141283: [clang] Improve diagnostic for "initializer-string for char array is too long"

2023-01-10 Thread Evan Smal via Phabricator via cfe-commits
evansmal marked an inline comment as done. evansmal added a comment. In D141283#4038703 , @tbaeder wrote: > When grepping `clang/test/` for "for char array is too long", I get a bunch > of other hits for this diagnostic, are the those tests not failing

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thanks for reviewing, @erichkeane! And a gentle ping to @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 ___ cfe-com

[PATCH] D139608: [Clang][NFC] Add default `getBFloat16Mangling` impl

2023-01-10 Thread Ties Stuij via Phabricator via cfe-commits
stuij added a comment. I went back and forth on this for a bit. There's a review outstanding to change the mangling name for X86: https://reviews.llvm.org/D136919 to align with the C++23 std::bfloat16_t issue from above. I settled on preferring to be conservative, and not risk at some point acc

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 487813. ccotter added a comment. - merge from upstream Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141391/new/ https://reviews.llvm.org/D141391 Files: clang-tools-extra/docs/ReleaseNotes.rst Index: clang

[PATCH] D141391: [NFC] [clang-tools-extra] Alphabetize clang-tidy release notes

2023-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a subscriber: carlosgalvezp. Eugene.Zelenko added a comment. In D141391#4040002 , @ccotter wrote: > I can't land these myself, so if you are able to, would you mind doing so? > Thanks! @carlosgalvezp: Could you please help? Reposi

[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2023-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5503 + FunctionDecl, + CoroutineBodyStmt), i

[PATCH] D141283: [clang] Improve diagnostic for "initializer-string for char array is too long"

2023-01-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D141283#4038703 , @tbaeder wrote: > When grepping `clang/test/` for "for char array is too long", I get a bunch > of other hits for this diagnostic, are the those tests not failing for you > (e.g. `clang/test/Sema/array-init.c

[PATCH] D141283: [clang] Improve diagnostic for "initializer-string for char array is too long"

2023-01-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. In D141283#4038703 , @tbaeder wrote: > When grepping `clang/test/` for "for char array is too long", I get a bunch > of other hits for this diagnostic, are the those tests not failing for you > (e.g. `clang/test/Sema/array-in

[PATCH] D139774: [libclang] Add API to set temporary directory location

2023-01-10 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D139774#4039975 , @aaron.ballman wrote: > Oh that is a good point! Apologies for not noticing that earlier -- that > makes me wonder if a better approach here is to add a `std::string` to the > `CIndexer` class to represent th

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-10 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. This causes codegen to be different depending on whether debug-info is generated. Please don't do that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141381/new/ https://reviews.llvm.org/D141381

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-10 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I should expand on my previous comment. Extending the lifetime of these variables by saving the pointers into local variables, that's fine; just make sure it's not conditional on -g. The only difference between -g and not -g should be metadata and dbg.* instructions

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-10 Thread Felipe de Azevedo Piovezan via Phabricator via cfe-commits
fdeazeve added a comment. In D141381#4040071 , @probinson wrote: > just make sure it's not conditional on -g. This makes sense, I'll update the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141381/ne

[PATCH] D141050: [standalone-build] outsource, simplify and unify repetitive CMake code

2023-01-10 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk updated this revision to Diff 487826. kwk added a comment. - Make require_llvm_utility_binary_path usable from a build-tree setup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141050/new/ https://reviews.llvm.org/D141050 Files: clang/CMakeLi

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:3863 + SourceLocation EndLoc = VD->getEndLoc(); + if (const auto *VTSD = dyn_cast(VD)) { erichkeane wrote: > Hmm... it is strange to me that the variables 'endloc' is the end of the

[PATCH] D141144: [clang-tidy][doc] Improve clang-tidy documentation

2023-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:34 +static StringRef TrimFirstChar(StringRef x) { return x.substr(1); } + This seems a bit of a needless change, if you want to remove the newline, just in date th

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:60 +// Checks if T1 is convertible to T2. +static bool isMultiLevelConvertiblePointer(QualType P1, QualType P2, + unsigned CurrentLevel

[PATCH] D139986: [clang][TypePrinter] Teach isSubstitutedDefaultArgument about integral types

2023-01-10 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. @dblaikie We added the libc++ tests to the Clang pre-commit CI after discussing with @erichkeane since he told me breaking libc++ was a recurring pain point, and having a way to detect that would be greatly appreciated by the Clang folks. The goal was really only to he

[PATCH] D135405: fix handling of braced-init temporaries for modernize-use-emplace

2023-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D135405#4039820 , @BigPeet wrote: > Ping. > > (Sorry, it's my first time contributing to LLVM and I simply don't know what > happens next. Do I need to do anything? Or is it just waiting to get merged > at some point?) My a

[PATCH] D139986: [clang][TypePrinter] Teach isSubstitutedDefaultArgument about integral types

2023-01-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D139986#4040185 , @ldionne wrote: > @dblaikie > > We added the libc++ tests to the Clang pre-commit CI after discussing with > @erichkeane since he told me breaking libc++ was a recurring pain point, and > having a way to

[PATCH] D140809: [clang][Interp] Implement logical and/or operators

2023-01-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:387 + // Logical AND. + // Visit LHS. Only visit RHS is LHS was TRUE. + LabelTy LabelFalse = this->getLabel(); Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D141403: [AArch64] Add command line support for v9.4-A's Instrumentation Extension

2023-01-10 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas created this revision. Herald added a subscriber: kristof.beyls. Herald added a project: All. pratlucas requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This introduces command line support (`+ite`) for the v9.4-A

[PATCH] D140639: clang: Fix handling of __builtin_elementwise_copysign

2023-01-10 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Herald added a subscriber: StephenFan. ping, I think this should get in before the branch date to fix the current broken behavior before this is in a release CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140639/new/ https://reviews.llvm.org/D140639

[PATCH] D141404: [AArch64][Clang] Adjust default features for v8.9-A/v9.4-A in clang driver

2023-01-10 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas created this revision. Herald added a subscriber: kristof.beyls. Herald added a project: All. pratlucas requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Update the clang driver to include the following features as default f

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:60 +// Checks if T1 is convertible to T2. +static bool isMultiLevelConvertiblePointer(QualType P1, QualType P2, + unsigned CurrentLevel

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:95 + + if (P1->isArrayType() && P2->isArrayType()) { +// At every level that array type is involved in, at least If none of the functions I recommended work

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Ah, so the intent is that this causes these indirect args to be handled the same way as other arguments at -O0 - placed in an alloca, eg: struct t1 { t1(const t1&); }; void f1(int, int); void f2(t1 v, int x) { f1(3, 4); } 0x0033: DW_TAG_form

[PATCH] D141133: [clang-tidy] Implement CppCoreGuideline F.54

2023-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 requested changes to this revision. njames93 added a comment. This revision now requires changes to proceed. Can you run this through clang format to make sure the pre merge is happy and address those nits Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/Av

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-10 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:3863 + SourceLocation EndLoc = VD->getEndLoc(); + if (const auto *VTSD = dyn_cast(VD)) { aaron.ballman wrote: > erichkeane wrote: > > Hmm... it is strange to me that the variables 'en

[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

2023-01-10 Thread Felipe de Azevedo Piovezan via Phabricator via cfe-commits
fdeazeve added a comment. In D141381#4040314 , @dblaikie wrote: > Ah, so the intent is that this causes these indirect args to be handled the > same way as other arguments at -O0 - placed in an alloca, eg: Yup, that's correct! > Though I guess it doesn

  1   2   3   >