[PATCH] D140915: [clangd] Fix getQueryScopes for using-directive with inline namespace

2023-01-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:674 +else if (const auto *ND = dyn_cast(Context)) { + if (ND->isInlineNamespace()) +Scopes.AccessibleScopes.push_back(printQualifiedName(*ND) + "::"); tom-ander

[clang] 570bf97 - [clang][analyzer] Remove report of null stream from StreamChecker.

2023-01-09 Thread Balázs Kéri via cfe-commits
Author: Balázs Kéri Date: 2023-01-09T09:49:08+01:00 New Revision: 570bf972f5adf05438c7e08d693bf4b96bfd510a URL: https://github.com/llvm/llvm-project/commit/570bf972f5adf05438c7e08d693bf4b96bfd510a DIFF: https://github.com/llvm/llvm-project/commit/570bf972f5adf05438c7e08d693bf4b96bfd510a.diff L

[PATCH] D137790: [clang][analyzer] Remove report of null stream from StreamChecker.

2023-01-09 Thread Balázs Kéri 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 rG570bf972f5ad: [clang][analyzer] Remove report of null stream from StreamChecker. (authored by balazske). Changed prior to commit: https://reviews.

[PATCH] D141198: [Clang][RISCV][NFC] Reorganize test case for rvv intrinsics

2023-01-09 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 487317. eopXD edited the summary of this revision. eopXD added a comment. Update test cases. Don't add target feature `zfh` and `zvfh` for intrinsics that does not have a floating-point type variant. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D139458: [clangd] Full support for #import insertions

2023-01-09 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139458/new/ https://reviews.llvm.org/D139458 __

[PATCH] D141218: [clangd] Include the correct header for typeid()

2023-01-09 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 for catching this! Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:1531 +TEST(IncludeFixerTest, Typeid) { + Annotations Test(R"cpp(

[PATCH] D141240: [SVE][Builtins] Add metadata to intrinsic calls for builtins that don't define the result of inactive lanes.

2023-01-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Using metadata seems sensible, but did you also identify any downsides? I could imagine that we'd need to manually propagate metadata to any nodes after we do a combine (which can't be blindly copied?), e.g. add + mul -> mla, this new intrinsic would also need the met

[PATCH] D139935: [NFC] [Doc] Fix example for AnnotateTypeDocs

2023-01-09 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Sorry for the delay. Just to confirm, yes this should of course be `annotate_type`. Thanks for catching my mistake. @aaron.ballman Thanks for reviewing! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139935/new/ https://r

[PATCH] D141230: [clang-format-diff.py] give clang-format-diff a job pool (10x speed)

2023-01-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. You've lost the first part of the patch in this latest diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141230/new/

[PATCH] D141098: [clang-format][NFC] Set DeriveLineEnding to false in config files

2023-01-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. I kind of agree, it would be nice not to have to use dos2unix and it be set by default. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D140843: [clang-format] fix template closer followed by >

2023-01-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D140843#4029641 , @owenpan wrote: > In D140843#4028142 , > @MyDeveloperDay wrote: > >> I'd like one of @owenpan, @HazardyKnusperkeks or @rymiel to comment before >> commit, ju

[PATCH] D139926: [clangd] Add semantic tokens for angle brackets

2023-01-09 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. In D139926#4033152 , @nridge wrote: > In D139926#4032473 , @ckandeler > wrote: > >> In D139926#4030782 , @nridge wrote: >> >>> It's true that t

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

2023-01-09 Thread Vincent LE GARREC via Phabricator via cfe-commits
bansan added a comment. Herald added a subscriber: StephenFan. I just made a test: #include #include int64_t f(int x) { return 1024 * 1024 * 1024 * x; } void g(int x) { std::vector b; b.reserve(1024 * 1024 * 1024 * x); } int main() { f(1024); g(1024);

[PATCH] D141134: [NFC] Only expose getXXXSize functions in TypeSize

2023-01-09 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 487339. gchatelet added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Fix missing clang change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141134/new/ https://reviews.l

[PATCH] D141134: [NFC] Only expose getXXXSize functions in TypeSize

2023-01-09 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. I've created https://reviews.llvm.org/D141267 to get a feel of what it looks like to only keep the Size version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141134/new/ https://reviews.llvm.org/D141134 ___

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

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thank you for taking a look at this patch! @bansan > For the first test, I still think that the auto fix should be return > static_cast(1024) * 1024 * 1024 * x; to have the good result. I'd say I'm not the author of this checker. I think this behavior change needs

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-09 Thread Arthur Laurent via Phabricator via cfe-commits
Arthapz added a comment. > BTW, for header units, it is still under discussion that how should build > system and compiler interact about header units. It is still unclear whether > or not the header units should be transparent to build systems (and other > tools). On XMake we built our suppor

[PATCH] D141271: [include-cleaner] Filter template instantiations from AST roots.

2023-01-09 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo created this revision. Herald added a subscriber: kadircet. Herald added a project: All. VitaNuo requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D141271 Fi

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

2023-01-09 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 487363. carlosgalvezp marked an inline comment as done. carlosgalvezp added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141144/new/ https://reviews.llvm.org/D141144 Files: c

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

2023-01-09 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh added a comment. Ping? it's a small NFC and if it's not desired I don't mind abandoning it; I'd just like to remove this diff from the queue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139608/new/ https://reviews.llvm.org/D139608 ___

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

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > For the second test, the type is the internal type of std::vector. There are two approaches to fixing this issue. One is fixing with the **FULLY** qualified type name, in the above case that is, `std::vector>::size_type`. Another one is fixing with the desugared t

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

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > There are two approaches to fixing this issue. One is fixing with the FULLY > qualified type name, in the above case that is, std::vector std::allocator>::size_type. Another one is fixing with the desugared > type name, that is, unsigned long. I personally don't h

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

2023-01-09 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 487370. carlosgalvezp added a comment. Trim first character instead, to keep the code visually pleasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141144/new/ https://reviews.llvm.org/D141144 Files:

[PATCH] D141158: [OpenMP] Introduce '-f[no-]openmp-target-jit' flag to control JIT for offloading

2023-01-09 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. The newly added test fails when `tools/clang/include/clang/Config/config.h` is configured with `#define CLANG_DEFAULT_OPENMP_RUNTIME "libgomp"`. Please fix. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141158/n

[PATCH] D140968: [clang-tidy] Add check for passing the result of `std::string::c_str` to `strlen`

2023-01-09 Thread Alex Coster via Phabricator via cfe-commits
acoster added a comment. In D140968#4029072 , @njames93 wrote: > I don't see the appear of this check as its a situation that I doubt ever > appears in code bases. If there are open source code bases where this is a > known problem can you please provid

[PATCH] D141271: [include-cleaner] Filter template instantiations from AST roots.

2023-01-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:377 continue; -// FIXME: Filter out certain Obj-C and template-related decls. +if (const NamedDecl *ND = dyn_cast(D)) + if (isImplicitTemplateInstantiati

[PATCH] D140551: [include-cleaner] Don't count references to operators as uses

2023-01-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 487382. hokein marked an inline comment as done. hokein added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140551/new/ https://reviews.llvm.org/D140551 Files: clang-tools-extra/include-clea

[PATCH] D140551: [include-cleaner] Don't count references to operators as uses

2023-01-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:69 + bool TraverseCXXOperatorCallExpr(CXXOperatorCallExpr *S) { +// Operators are always ADL extension points, by design references to them sammccall wrote: > Rathe

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

2023-01-09 Thread Vincent LE GARREC via Phabricator via cfe-commits
bansan added a comment. The current rule is quite simple. I tried this example: template T h(int x) { return 1024 * 1024 * 1024 * x; } int main() { h(1024); } The rule does not complain. So I think that the "resolved" type (`size_t`) should be use instead of the templated o

[PATCH] D134677: [Clang][AArch64][SME] Add ZA zeroing intrinsics

2023-01-09 Thread Bryan Chan via Phabricator via cfe-commits
bryanpkc updated this revision to Diff 487384. bryanpkc retitled this revision from "[Clang][AArch64] Add SME zero intrinsic" to "[Clang][AArch64][SME] Add ZA zeroing intrinsics". bryanpkc edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D140551: [include-cleaner] Don't count references to operators as uses

2023-01-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/include-cleaner/lib/WalkAST.cpp:75 +// doesn't count as uses (generally the type should provide them). +// Ignore them by trav

[PATCH] D141271: [include-cleaner] Filter template instantiations from AST roots.

2023-01-09 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 487385. VitaNuo added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141271/new/ https://reviews.llvm.org/D141271 Files: clang-tools-extra/include-cleaner/lib/Record.cpp

[PATCH] D141271: [include-cleaner] Filter template instantiations from AST roots.

2023-01-09 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:377 continue; -// FIXME: Filter out certain Obj-C and template-related decls. +if (const NamedDecl *ND = dyn_cast(D)) + if (isImplicitTemplateInstantiat

[PATCH] D141271: [include-cleaner] Filter template instantiations from AST roots.

2023-01-09 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 looks good! Please remember to add a `FIX: ` to the commit message. Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:387 + private: + bool isImplicitTem

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

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > The rule does not complain. Sorry, I'm confused. Could you please explain what you expect this example should achieve and what is "the rule"? Thanks! > So I think that the "resolved" type (size_t) should be use instead of the > templated one (std::vector>::size_

[clang-tools-extra] de81dc8 - [include-cleaner] Filter template instantiations from AST roots.

2023-01-09 Thread Viktoriia Bakalova via cfe-commits
Author: Viktoriia Bakalova Date: 2023-01-09T12:54:20Z New Revision: de81dc8fdf2764fb14a3c70e5e845cfd7f3b366c URL: https://github.com/llvm/llvm-project/commit/de81dc8fdf2764fb14a3c70e5e845cfd7f3b366c DIFF: https://github.com/llvm/llvm-project/commit/de81dc8fdf2764fb14a3c70e5e845cfd7f3b366c.diff

[PATCH] D141271: [include-cleaner] Filter template instantiations from AST roots.

2023-01-09 Thread Viktoriia Bakalova 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 rGde81dc8fdf27: [include-cleaner] Filter template instantiations from AST roots. (authored by VitaNuo). Repository: rG LLVM Github Monorepo CHANGES

[clang-tools-extra] 499bf67 - [include-cleaner] Don't count references to operators as uses

2023-01-09 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2023-01-09T13:59:15+01:00 New Revision: 499bf67208d982948e2580b56a09944a285fee76 URL: https://github.com/llvm/llvm-project/commit/499bf67208d982948e2580b56a09944a285fee76 DIFF: https://github.com/llvm/llvm-project/commit/499bf67208d982948e2580b56a09944a285fee76.diff LO

[PATCH] D140551: [include-cleaner] Don't count references to operators as uses

2023-01-09 Thread Haojian Wu 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 rG499bf67208d9: [include-cleaner] Don't count references to operators as uses (authored by hokein). Changed prior to commit: https://reviews.llvm.or

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

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > Sorry, I'm confused. Could you please explain what you expect this example > should achieve and what is "the rule"? Thanks! Ah, I think I understand it. You mean the `bugprone-implicit-widening-of-multiplication-result` check doesn't warn anything about this exa

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

2023-01-09 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. > There is a method QualType::getSingleStepDesugaredType() which may get size_t Just did a quick test, and it doesn't work like this. So I can only get the fully desugared type for now. Sorry :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D141230: [clang-format-diff.py] give clang-format-diff a job pool (10x speed)

2023-01-09 Thread Sean Maher via Phabricator via cfe-commits
seanptmaher updated this revision to Diff 487407. seanptmaher added a comment. Possibly fix the patchset? Sorry I've never used phabricator berfore. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141230/new/ https://reviews.llvm.org/D141230 Files:

[PATCH] D140867: [C++20] [Modules] Don't generate global ctors/dtors for variables which are available externally

2023-01-09 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan added a comment. Hi, this test is failing on AIX, could you take a look please? https://lab.llvm.org/buildbot/#/builders/214/builds/5242/steps/6/logs/FAIL__Clang__pr59765-modules-global-ctor-dtor_cppm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

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

2023-01-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added projects: clang, clang-tools-extra. This is a hacky prototype to support building UsingType for elaborated type specifiers: namespace ns { class

[PATCH] D139446: [clangd] Add flag to control #import include insertions

2023-01-09 Thread David Goldman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG814c0bb31660: [clangd] Add flag to control #import include insertions (authored by dgoldman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139446/new/ http

[PATCH] D139458: [clangd] Full support for #import insertions

2023-01-09 Thread David Goldman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. dgoldman marked an inline comment as done. Closed by commit rG042dd99484d6: [clangd] Full support for #import insertions (authored by dgoldman). Changed prior to commi

[clang-tools-extra] 814c0bb - [clangd] Add flag to control #import include insertions

2023-01-09 Thread David Goldman via cfe-commits
Author: David Goldman Date: 2023-01-09T09:48:29-05:00 New Revision: 814c0bb31660b2441c9a9a6eeaafc2e33c416842 URL: https://github.com/llvm/llvm-project/commit/814c0bb31660b2441c9a9a6eeaafc2e33c416842 DIFF: https://github.com/llvm/llvm-project/commit/814c0bb31660b2441c9a9a6eeaafc2e33c416842.diff

[clang-tools-extra] 042dd99 - [clangd] Full support for #import insertions

2023-01-09 Thread David Goldman via cfe-commits
Author: David Goldman Date: 2023-01-09T09:48:30-05:00 New Revision: 042dd99484d6f393cc8a365def250e9d74c24d37 URL: https://github.com/llvm/llvm-project/commit/042dd99484d6f393cc8a365def250e9d74c24d37 DIFF: https://github.com/llvm/llvm-project/commit/042dd99484d6f393cc8a365def250e9d74c24d37.diff

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

2023-01-09 Thread Evan Smal via Phabricator via cfe-commits
evansmal created this revision. evansmal added a reviewer: clang. evansmal added a project: clang. Herald added a project: All. evansmal requested review of this revision. Herald added a subscriber: cfe-commits. This patch improves the diagnostic message "initializer-string for char array is too

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-09 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. Gentle ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-01-09 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 487427. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/DeclSpec.cpp clang/lib/Sema/SemaTempl

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

2023-01-09 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Thank you for this diagnostic fix, please make sure you update `clang/test/CXX/dcl.decl/dcl.init/dcl.init.string/p2.cpp`. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5956 def err_initializer_string_for_char_array_too_long : Error< - "

[PATCH] D141287: [clang-format] Inherit RightAlign option across scopes

2023-01-09 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel created this revision. rymiel added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay. rymiel added a project: clang-format. Herald added a project: All. rymiel requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. D119599

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

2023-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. 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 document the expectation that the call be made before creating the index. In terms o

[PATCH] D141287: [clang-format] Inherit RightAlign option across scopes

2023-01-09 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel abandoned this revision. rymiel added a comment. I apologize, I managed to really mess up with git somehow Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141287/new/ https://reviews.llvm.org/D141287 __

[PATCH] D140693: [Driver][RISCV] Adjust the priority between -mcpu, -mtune and -march

2023-01-09 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng planned changes to this revision. kito-cheng added a comment. - @craig.topper has suggested we could pass all extension with `-` or `+` to neutralize the effect of the `-target-cpu`, that's less intrusive way. - Add release note to mention the behavior change. Repository: rG LLVM G

[PATCH] D141288: [clang-format] Inherit RightAlign options across scopes

2023-01-09 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel created this revision. rymiel added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay. rymiel added a project: clang-format. Herald added a project: All. rymiel requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. D119599

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

2023-01-09 Thread Evan Smal via Phabricator via cfe-commits
evansmal added a comment. In D141283#4036449 , @shafik wrote: > Thank you for this diagnostic fix, please make sure you update > `clang/test/CXX/dcl.decl/dcl.init/dcl.init.string/p2.cpp`. I noticed that there are also some tests in: //clang/test/SemaCX

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I spoke with @to268 during office hours about the current status of the NB comments for this feature in the C committee. For the moment, he's going to pause work on this patch until the C committee weighs in on whether `auto` is a type specifier or not. The commit

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

2023-01-09 Thread Evan Smal via Phabricator via cfe-commits
evansmal updated this revision to Diff 487443. evansmal added a comment. Improve specificity of the diagnostic message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141283/new/ https://reviews.llvm.org/D141283 Files: clang/include/clang/Basic/D

[clang] a5098e5 - [OpenMP] Fix some tests failing with 'libgomp' as the default library

2023-01-09 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-01-09T10:03:19-06:00 New Revision: a5098e5f27badc3ba16533418accd2e17641e4e4 URL: https://github.com/llvm/llvm-project/commit/a5098e5f27badc3ba16533418accd2e17641e4e4 DIFF: https://github.com/llvm/llvm-project/commit/a5098e5f27badc3ba16533418accd2e17641e4e4.diff

[PATCH] D141158: [OpenMP] Introduce '-f[no-]openmp-target-jit' flag to control JIT for offloading

2023-01-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141158#4035875 , @gribozavr2 wrote: > The newly added test fails when `tools/clang/include/clang/Config/config.h` > is configured with `#define CLANG_DEFAULT_OPENMP_RUNTIME "libgomp"`. Please > fix. Thanks! Should be fixed

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Mostly just nits from me at this point. Comment at: clang/lib/AST/DeclCXX.cpp:3232 +VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() { + assert((isa(this) || isa(this)) && + "expected a VarDecl or a BindingDecl");

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/DeclCXX.cpp:3232 +VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() { + assert((isa(this) || isa(this)) && + "expected a VarDecl or a BindingDecl"); aaron.ballman wrote: > That's future tech,

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/DeclCXX.cpp:3232 +VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() { + assert((isa(this) || isa(this)) && + "expected a VarDecl or a BindingDecl"); cor3ntin wrote: > aaron.ballman wrote:

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 487452. cor3ntin added a comment. Address Aaron's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137244/new/ https://reviews.llvm.org/D137244 Files: clang/include/clang/AST/Decl.h clang/include/cl

[PATCH] D136817: [RISCV] Add H extension

2023-01-09 Thread Philip Reames via Phabricator via cfe-commits
reames accepted this revision. reames 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/D136817/new/ https://reviews.llvm.org/D136817 ___

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/DeclCXX.cpp:3232 +VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() { + assert((isa(this) || isa(this)) && + "expected a VarDecl or a BindingDecl"); aaron.ballman wrote: > cor3ntin wrote: > >

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 487453. cor3ntin added a comment. Rewrite assert in DeclCXX.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137244/new/ https://reviews.llvm.org/D137244 Files: clang/include/clang/AST/Decl.h clang/inclu

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel added inline comments. Comment at: clang/test/SemaCXX/cxx20-decomposition.cpp:160 +return a; +}() ; }(0); +(void)[&](auto c) { return b + [&a](auto) { aaron.ballman wrote: > Same edit elsewhere. Did clang-format get confused? It can't be cl

[PATCH] D141177: [Clang] Don't tell people to place _Alignas on a struct in diagnostics

2023-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the fix, please be sure to add a release note for the fix as well. Also, I'd like to see some additional C++ test coverage for: `alignas(int) struct S {};` to demonstrate we still suggest moving the keyword in that case. Comment a

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:125 +diag::err_param_default_argument_references_local) + << D->getDeclName() << DefaultArg->getSourceRange(); } aaron.ballman wrote: > `ValueDecl`

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:125 +diag::err_param_default_argument_references_local) + << D->getDeclName() << DefaultArg->getSourceRange(); } aaron.ballman wrote: > aaron.ballman wro

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 487464. cor3ntin added a comment. Symplify printing a NamedDecl in moved code per Aaron's comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137244/new/ https://reviews.llvm.org/D137244 Files: clang/incl

[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl:6 // RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis %s -cl-std=CL3.0 -ffake-address-space-map -O0 -emit-llvm -o - -triple "spir64-unknown-unknown" | FileCheck %s --c

[PATCH] D139534: [analyzer] Don't escape local static memregions on bind

2023-01-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D139534#4034719 , @xazax.hun wrote: >> Here is the gist of one *new* TP: > > Where would `sprops` get escaped? Did I miss that or was that reduced out of > the example? You are right, it 'never' escapes, yet in the past we m

[PATCH] D141297: [OpenCL] Allow undefining header-only features

2023-01-09 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, FMarno. Herald added subscribers: Naghasan, ldrumm, yaxunl. Herald added a project: All. svenvh requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `opencl-c-base.h` always define

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Sorry, I don't have the time this week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140086/new/ https://reviews.llvm.org/D140086 ___ cfe-commits mailing list cfe-commits@lists

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

2023-01-09 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy marked an inline comment as not done. vedgy added a comment. In D139774#4036496 , @aaron.ballman wrote: > In terms of the C API, I think it'd make more sense to name in terms of > "override" rather than "set", but I don't feel as strongly about it

[PATCH] D141298: Move from llvm::makeArrayRef to ArrayRef deduction guides - last part

2023-01-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Herald added subscribers: Michael137, JDevlieghere. Once that patch lands, I'll mark `makeArrayRef` as deprecated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141298/new/ https://reviews.llvm.org/D141298 __

[PATCH] D72103: [Sema] Avoid using an invalid InsertPos

2023-01-09 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Herald added a project: All. It looks like the original bug no longer reproduces: https://github.com/llvm/llvm-project/issues/42566 Is this PR still needed? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72103/new/ https://reviews.llvm.org/D72103 __

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-09 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. > Header units have even more need to be involved in the build graph than named > units. ODR violations and cache invalidation problems await anyone just > winging it on header units (at least that's the understanding I've gotten > from SG15 meetings). I think that

[PATCH] D141198: [Clang][RISCV][NFC] Reorganize test case for rvv intrinsics

2023-01-09 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Please split vmulh* from vmul.c. Remove the vmul tests from the handcrafted vmul.c and vmul-eew64.c. Rename those to vmulh.c and vmulh-eew64.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141198/new/ https://reviews.

[PATCH] D141298: Move from llvm::makeArrayRef to ArrayRef deduction guides - last part

2023-01-09 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. Seems mechanical, and if it build everywhere LGTM :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141298/new/ https://reviews.llvm.org/D141298 ___ cfe-commits mailing list c

[PATCH] D140699: [OptTable] Make ValuesCode initialisation of Options constexpr

2023-01-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Herald added a subscriber: StephenFan. @nikic: gentle ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140699/new/ https://reviews.llvm.org/D140699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D140800: [OptTable] Precompute OptTable prefixes union table through tablegen

2023-01-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @nikic : gentle ping :-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140800/new/ https://reviews.llvm.org/D140800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM assuming precommit CI doesn't discover any problems from the latest changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/test/ClangScanDeps/P1689.cppm:9 +// +// Check the seperated dependency format. +// RUN: clang-scan-deps -format=p1689 --p1689-targeted-file-name=%t/M.cppm --p1689-targeted-output=%t/M.o \ ben.boeckel wrote: >

[PATCH] D131306: [llvm][misexpect] Track provenance of branch weights

2023-01-09 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. @tejohnson @xur I kind of dropped the ball on these patches, but what are your thoughts on this approach over the old(more invasive) change to the profdata format I had prototyped before? the patch will obviously need to be rebased, but other than that, do we see a do

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D137534#4025898 , @ben.boeckel wrote: > - the format supports doing this for a set of object files (but given the way > it tangles the dep graph, is unlikely to be a perf win for > incremental/developer builds; CI may p

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I think the only major problem is not checking for error case when accessing `TransReq`, the rest are NITs. Thanks for the change! Will be happy to LGTM it as soon as the access to `TransReq` is fixed. Comment at: clang/lib/Parse/ParseExprCXX.cp

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:775 +static llvm::StringMap OSs; +std::unique_lock LockGuard(Lock); + How will this work when a different process tries to write the same file? C

[PATCH] D141307: [WIP] Add -f[no-]loop-versioning option

2023-01-09 Thread Mats Petersson via Phabricator via cfe-commits
Leporacanthicus created this revision. Herald added a reviewer: awarzynski. Herald added projects: Flang, All. Leporacanthicus requested review of this revision. Herald added subscribers: cfe-commits, jdoerfert, MaskRay. Herald added a project: clang. Posted to satisfy depenences of another patch.

[PATCH] D139534: [analyzer] Don't escape local static memregions on bind

2023-01-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. In D139534#4036783 , @steakhal wrote: > In D139534#4034719 , @xazax.hun > wrote: > >>> Here is the gis

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-09 Thread Ben Boeckel via Phabricator via cfe-commits
ben.boeckel added a comment. In D137534#4037064 , @jansvoboda11 wrote: > Another thing to be aware of is that the scanner is tuned for scanning > multiple TUs. Single `clang-scan-deps` invocation maintains a shared > in-memory cache of the filesystem b

[PATCH] D141051: [CUDA][HIP] Add support for `--offload-arch=native` to CUDA and refactor

2023-01-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/Driver/amdgpu-hip-system-arch.c:24 + +// case when amdgpu_arch does not return anything with successful execution +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/a

[PATCH] D141206: [clang] [MinGW] Avoid adding /include and /lib when cross compiling

2023-01-09 Thread Alvin Wong via Phabricator via cfe-commits
alvinhochun added a comment. The idea sounds reasonable. I don't know mingw-w64 toolchains well enough, but I'll try: How does it interact with the following conditions (lines 469-475)? They look like they may be looking for a mingw-w64 sysroot, which may be ignored by the new check. else i

[PATCH] D141051: [CUDA][HIP] Add support for `--offload-arch=native` to CUDA and refactor

2023-01-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/Driver/amdgpu-hip-system-arch.c:24 + +// case when amdgpu_arch does not return anything with successful execution +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-01-09 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. It surprised me that there are no type inference messages? The type of this auto is double. I only found warnings of misuse of auto and codegen tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://revi

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:1834-1846 + void setLambdaTypeInfo(TypeSourceInfo *TS) { +auto *DD = DefinitionData; +assert(DD && DD->IsLambda && "setting lambda property of non-lambda class"); +auto &DL = static_c

  1   2   >