[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-04-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. Looks good. Wait for an other accept. Comment at: clang/test/Analysis/array-struct-region.c:362-366 +int array_struct_bitfield_1() { + BITFIELD_CAST ff = {0}; + BITFIEL

[PATCH] D124356: [Driver][Solaris] -r: imply -nostdlib like GCC

2022-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/solaris-ld.c:115 +// RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-RELOCATABLE +// CHECK-RELOCATABLE: "-r" +// CHECK-RELOCATABLE-NOT: "-l It's worth testing that there are some `"-L` Repository:

[PATCH] D115187: [clangd] Expose CoawaitExpr's operand in the AST

2022-04-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Update on this: I'm working on getting the failing tests to pass. Some of them just need expected AST dumps updated to reflect the new node, but some others suggest the patch actually causes semantic regressions. Rep

[PATCH] D124359: [clangd] Add inlay hints for mutable reference parameters

2022-04-25 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj created this revision. upsj added a reviewer: nridge. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. upsj requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Add a &

[PATCH] D124344: [clangd] Output inlay hints with `clangd --check`

2022-04-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/tool/Check.cpp:201 +for (const auto &Hint : Hints) { + vlog(" {0} {1}", Hint.position, Hint.label); +} upsj wrote: > nridge wrote: > > Might be useful for print the hint kind as well

[PATCH] D115187: [clangd] Expose CoawaitExpr's operand in the AST

2022-04-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Here is a reduced testcase for the semantic regression: namespace std { template struct coroutine_handle { static coroutine_handle from_address(void *) noexcept; }; template struct coroutine_traits; } // end of namespace std template struct coro {

[PATCH] D124356: [Driver][Solaris] -r: imply -nostdlib like GCC

2022-04-25 Thread Brad Smith via Phabricator via cfe-commits
brad updated this revision to Diff 424835. brad added a comment. Update test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124356/new/ https://reviews.llvm.org/D124356 Files: clang/lib/Driver/ToolChains/Solaris.cpp clang/test/Driver/solaris-ld

[PATCH] D124344: [clangd] Output inlay hints with `clangd --check`

2022-04-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. can you please upload the patch with full context? see https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface Comment at: clang-tools-extra/clangd/tool/Check.cpp:196 + // Build Inlay Hints for the entire AST or the specified

[PATCH] D124344: [clangd] Output inlay hints with `clangd --check`

2022-04-25 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj updated this revision to Diff 424836. upsj marked 2 inline comments as done. upsj added a comment. - format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124344/new/ https://reviews.llvm.org/D124344 Files: clang-tools-extra/clangd/Protocol.

[PATCH] D124356: [Driver][Solaris] -r: imply -nostdlib like GCC

2022-04-25 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. LGTM. Comment at: clang/lib/Driver/ToolChains/Solaris.cpp:168 } - CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crtn.o"))); This a

[PATCH] D124244: [analyzer] add StoreToImmutable and ModelConstQualifiedReturn checkers

2022-04-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Looks great. I only have nits mostly for the docs. Comment at: clang/docs/analyzer/checkers.rst:2334-2336 +modified without causing undefined behavior. These functions +include getenv(), setlocale(), localeconv(), asctime(), and +strerror(). In such ca

[PATCH] D124356: [Driver][Solaris] -r: imply -nostdlib like GCC

2022-04-25 Thread Brad Smith via Phabricator via cfe-commits
brad added inline comments. Comment at: clang/lib/Driver/ToolChains/Solaris.cpp:168 } - CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crtn.o"))); MaskRay wrote: > This appears to fix another bug. > This appears to fix another bug. It app

[PATCH] D124365: review updates

2022-04-25 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. upsj requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. - Fix inverted check-lines condition - Output InlayHintKind v

[PATCH] D124344: [clangd] Output inlay hints with `clangd --check`

2022-04-25 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj updated this revision to Diff 424838. upsj added a comment. Review updates - Fix inverted check-lines condition - Output InlayHintKind via ostream operators Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124344/new/ https://reviews.llvm.org/D1

[PATCH] D123352: [analyzer] Add FixItHint to `nullability.NullReturnedFromNonnull` and `nullability.NullableReturnedFromNonnull`

2022-04-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a subscriber: NoQ. steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp:589 + RetTypeLoc.getType().getCanonicalType().getAsString(); + if (CanonicalTypeStr == "id" || CanonicalTypeStr == "instancetype") { +r

[PATCH] D124344: [clangd] Output inlay hints with `clangd --check`

2022-04-25 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj updated this revision to Diff 424839. upsj added a comment. push full patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124344/new/ https://reviews.llvm.org/D124344 Files: clang-tools-extra/clangd/Protocol.cpp clang-tools-extra/clangd/P

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-04-25 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added inline comments. Comment at: clang/test/Analysis/array-struct-region.c:362-366 +int array_struct_bitfield_1() { + BITFIELD_CAST ff = {0}; + BITFIELD_CAST *pff = &ff; + return *((int *)pff + 1); +} steakhal wrote: > ```lang=c > void array_struc

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-04-25 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 424844. vabridgers added a comment. update LIT per comments from @steakhal Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124349/new/ https://reviews.llvm.org/D124349 Files: clang/lib/StaticAnalyzer/Core/R

[PATCH] D124344: [clangd] Output inlay hints with `clangd --check`

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (LGTM too, thanks!) Comment at: clang-tools-extra/clangd/Protocol.cpp:1319 -llvm::json::Value toJSON(InlayHintKind K) { +const char *toString(InlayHintKind K) { switch (K) { nit: static (this doesn't need to be public) nit: retur

[PATCH] D124344: [clangd] Output inlay hints with `clangd --check`

2022-04-25 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj updated this revision to Diff 424846. upsj added a comment. - use string literal for toString result Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124344/new/ https://reviews.llvm.org/D124344 Files: clang-tools-extra/clangd/Protocol.cpp c

[PATCH] D121370: [clang-format] SortIncludes should support "@import" lines in Objective-C

2022-04-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. It appears that this regressed include sorting in the following case, where the contents of `test.h` show the expected include order and the `clang-format` behavior before this patch: % cat test.h #include #include "util/bar.h" #include "util/foo/foo.h" //

[PATCH] D124250: [Serialization] write expr dependence bits as a single integer

2022-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Nice savings Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:2291 + unsigned ExprDependenceBits = llvm::BitWidth; // Abbreviation for EXPR_DEC

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/SemaTemplate/concepts.cpp:391 + + CausesFriendConstraint CFC; + FriendFunc(CFC, 1); erichkeane wrote: > erichkeane wrote: > > A bunch of the tests below this all fail. > See these two tests, which fail by

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers

2022-04-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:2280-2290 +/// Return a symbol which is the best canidate to save it in the constraint +/// map. We should correct symbol because in case of truncation cast we can +/// only reason

[PATCH] D115187: [clangd] Expose CoawaitExpr's operand in the AST

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D115187#3471003 , @nridge wrote: > Without my patch, this compiles fine. With it, I clang gives the following > errors: > > coroutines.cpp:35:9: error: no viable conversion from 'awaitable' to > 'transform_awaitable' >

[PATCH] D124250: [Serialization] write expr dependence bits as a single integer

2022-04-25 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 rG0cd5cd19af0e: [Serialization] write expr dependence bits as a single integer (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES

[clang] 0cd5cd1 - [Serialization] write expr dependence bits as a single integer

2022-04-25 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-04-25T12:09:40+02:00 New Revision: 0cd5cd19af0eee1d35077de6824b2fe3022d2280 URL: https://github.com/llvm/llvm-project/commit/0cd5cd19af0eee1d35077de6824b2fe3022d2280 DIFF: https://github.com/llvm/llvm-project/commit/0cd5cd19af0eee1d35077de6824b2fe3022d2280.diff LO

[PATCH] D124186: [RISCV] Fix incorrect policy implement for unmasked vslidedown and vslideup.

2022-04-25 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 accepted this revision. rogfer01 added a comment. This revision is now accepted and ready to land. LGTM. Thanks @khchen ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124186/new/ https://reviews.llvm.org/D124186 _

[PATCH] D124373: [clang] add parameter pack/pack expansion matchers

2022-04-25 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj created this revision. upsj added a reviewer: klimek. Herald added a project: All. upsj requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There is no (obvious to me) way to match pack expansions and parameter packs, so I added two match

[PATCH] D124131: Thread safety analysis: Store capability kind in CapabilityExpr

2022-04-25 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 with the extra safety measure added. I'm happy to review again if you'd like, but don't require it. Comment at: clang/include/clang/Analysis/Analyses/Thre

[clang] 97a32d3 - [flang][driver] Add support for generating executables

2022-04-25 Thread Andrzej Warzynski via cfe-commits
Author: Andrzej Warzynski Date: 2022-04-25T12:00:23Z New Revision: 97a32d3e43fec35ea424e77c2940ee7e801a URL: https://github.com/llvm/llvm-project/commit/97a32d3e43fec35ea424e77c2940ee7e801a DIFF: https://github.com/llvm/llvm-project/commit/97a32d3e43fec35ea424e77c2940ee7e801a.diff

[PATCH] D122008: [flang][driver] Add support for generating executables

2022-04-25 Thread Andrzej Warzynski 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 rG97a32d3e43fe: [flang][driver] Add support for generating executables (authored by awarzynski). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D124348: [1/2][RISCV]Add Intrinsics for B extension in Clang

2022-04-25 Thread Chang Hu via Phabricator via cfe-commits
joker881 added a comment. In D124348#3470612 , @craig.topper wrote: > The "B extension" terminology no longer exists. Thank you for your comments. I will consider them carefully. And I want to know that do you have any documents about intrinsic of bitm

[clang] 00f0c80 - [Frontend] shrink in-memory PCH buffers to fit

2022-04-25 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-04-25T14:31:14+02:00 New Revision: 00f0c805ff7c0b5780d651d273899abe977fdca7 URL: https://github.com/llvm/llvm-project/commit/00f0c805ff7c0b5780d651d273899abe977fdca7 DIFF: https://github.com/llvm/llvm-project/commit/00f0c805ff7c0b5780d651d273899abe977fdca7.diff LO

[PATCH] D124242: [Frontend] shrink in-memory PCH buffers to fit

2022-04-25 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 rG00f0c805ff7c: [Frontend] shrink in-memory PCH buffers to fit (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-25 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda created this revision. Herald added subscribers: kerbowa, Anastasia, jvesely. Herald added a project: All. jchlanda requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use target's address space map to handle cases when both language a

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-25 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. @tra @Naghasan @t4c1 you might find it interesting, a follow up from the discussion here: https://reviews.llvm.org/D112718 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124382/new/ https://reviews.llvm.org/D124382 __

[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Change looks good, thank you! Can you add a test demonstrating it, and update the diff here? Take a look at the `InterpolateTest` cases in `clang/unittests/Tooling/CompilationDatabaseTest.cpp`. (If you can, please create diffs with context using `-U9` - this lets

[PATCH] D123352: [analyzer] Add FixItHint to `nullability.NullReturnedFromNonnull` and `nullability.NullableReturnedFromNonnull`

2022-04-25 Thread Moshe via Phabricator via cfe-commits
MosheBerman planned changes to this revision. MosheBerman added a comment. Thanks for all the thoughtful and fantastic feedback! Comment at: clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp:592-602 + // If we're inside of an NS_ASSUME, then the sourceRange will end bef

[PATCH] D124221: Add new builtin __builtin_reflect_struct.

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D124221#3470550 , @aaron.ballman wrote: > In D124221#3469251 , @rsmith wrote: > >> In D124221#3468706 , >> @aaron.ballman wrote: >> >>> Th

[PATCH] D122920: [Clang][CodeGen]Fix __builtin_dump_struct missing record type field name

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. @yihanaa : I'd suggest seeing the conversation that @rsmith @aaron.ballman and I are having about this builtin here: https://reviews.llvm.org/D124221 In general it looks like the three of us think that this builtin needs an overhaul in implementation/functionality in

[PATCH] D123182: [Concepts] Fix overload resolution bug with constrained candidates

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: nkreeger. erichkeane added a comment. @nkreeger : Can you please explain your revert, both in the revert commit message (next time), as well as the patch so that the author/rest of us have SOME hint as to why it was reverted? Frequent reverts make it painful as a

[PATCH] D124384: [clang] Fix a constant evaluator crash on a NULL-type expr.

2022-04-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D124384 Files: clang/lib/AST/ExprConstant.cpp clang/test/Sema

[PATCH] D123182: [Concepts] Fix overload resolution bug with constrained candidates

2022-04-25 Thread Nick Kreeger via Phabricator via cfe-commits
nkreeger added a comment. In D123182#3471661 , @erichkeane wrote: > @nkreeger : Can you please explain your revert, both in the revert commit > message (next time), as well as the patch so that the author/rest of us have > SOME hint as to why it was re

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D122663#3470687 , @hvdijk wrote: > In D122663#3457330 , @erichkeane > wrote: > >> LGTM! I would like @rjmccall to take a pass if he ends up having time in >> the next day or two (

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-04-25 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D122663#3471741 , @erichkeane wrote: > Ping me EOW if @rsmith doesn't respond in the meantime. It is also not clear > to me whether you were able to capture/fix the issue he had with the > clang-abi-compat.cpp test. Will do

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/SemaTemplate/concepts.cpp:391 + + CausesFriendConstraint CFC; + FriendFunc(CFC, 1); ChuanqiXu wrote: > erichkeane wrote: > > erichkeane wrote: > > > A bunch of the tests below this all fail. > > See these

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D122663#3471748 , @hvdijk wrote: > In D122663#3471741 , @erichkeane > wrote: > >> Ping me EOW if @rsmith doesn't respond in the meantime. It is also not >> clear to me whether you

[PATCH] D123182: [Concepts] Fix overload resolution bug with constrained candidates

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D123182#3471687 , @nkreeger wrote: > In D123182#3471661 , @erichkeane > wrote: > >> @nkreeger : Can you please explain your revert, both in the revert commit >> message (next time)

[PATCH] D123182: [Concepts] Fix overload resolution bug with constrained candidates

2022-04-25 Thread Nick Kreeger via Phabricator via cfe-commits
nkreeger added a comment. In D123182#3471789 , @erichkeane wrote: > In D123182#3471687 , @nkreeger > wrote: > >> In D123182#3471661 , @erichkeane >> wrote: >> >>> @nkre

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-04-25 Thread Nathan Sidwell via Phabricator via cfe-commits
urnathan added a comment. [was out last week] It seems the demangler already gets this right, probably because it just looks like a regular nested name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122663/new/ https://reviews.llvm.org/D122663 __

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-04-25 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D122663#3471763 , @erichkeane wrote: > I DID see that and am REASONABLY sure you do, but sometimes folks will ask > for test coverage because they suspect the resulting behavior will > demonstrate some sort of problem with th

[PATCH] D124128: Thread safety analysis: Store CapabilityExprs in ScopedLockableFactEntry (NFC)

2022-04-25 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/lib/Analysis/ThreadSafety.cpp:911-919 +UnderlyingMutexes.push_back(UnderlyingCapability{M, UCK_Acquired}); } void addExclusiveUnlock(const CapabilityExpr &M) { -UnderlyingMutexes.emplace_back(M.sexpr(), UCK_Rel

[PATCH] D124389: [clang][NFC] Inclusive language: remove use of Whitelist in clang/lib/Analysis/

2022-04-25 Thread Quinn Pham via Phabricator via cfe-commits
quinnp created this revision. Herald added a project: All. quinnp requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. [NFC] As part of using inclusive language within the llvm project, this patch rewords a comment to replace Whitelist with Allo

[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi updated this revision to Diff 424904. ishaangandhi added a comment. - Added a test case - Removed redundant "StringRef" constructor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124262/new/ https://reviews.llvm.org/D124262 Files: cl

[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi marked an inline comment as done. ishaangandhi added a comment. Test case added, re-diffed with `-U`, and removed redundant constructor. Thanks for the quick feedback, @sammccall! (I didn't wait for the tests to run locally, I am hoping to use your CI systems to do that. It see

[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi updated this revision to Diff 424906. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124262/new/ https://reviews.llvm.org/D124262 Files: clang/lib/Tooling/InterpolatingCompilationDatabase.cpp clang/unittests/Tooling/CompilationDatabaseTest.cpp Index: clang/unittests/Too

[PATCH] D122920: [Clang][CodeGen]Fix __builtin_dump_struct missing record type field name

2022-04-25 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. In D122920#3471654 , @erichkeane wrote: > @yihanaa : I'd suggest seeing the conversation that @rsmith @aaron.ballman > and I are having about this builtin here: https://reviews.llvm.org/D124221 > > In general it looks like the t

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. > llvm-cxxfilt has no option to be compatible with earlier incorrect mangling > though, so it would not help with this particular test. But it could help > with other tests, agreed. This actually wouldn't be necessary in this case: cxxfilt is already 'right', this i

[PATCH] D124104: [clang][dataflow] Fix `Environment::join`'s handling of flow condition merging

2022-04-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 424909. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124104/new/ https://reviews.llvm.org/D124104 Files: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp

[PATCH] D124104: [clang][dataflow] Fix `Environment::join`'s handling of flow condition merging

2022-04-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 7 inline comments as done. ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:356 + +return V1 == V2 || + Env1.flowConditionImplies(*V1) == Env2.flowConditionImplies(*V2);

[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D124262#3471841 , @ishaangandhi wrote: > Test case added, re-diffed with `-U`, and removed redundant constructor. > Thanks for the quick feedback, @sammccall! > > (I didn't wait for the tests to run locally, I am hoping

[PATCH] D124250: [Serialization] write expr dependence bits as a single integer

2022-04-25 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan added a comment. Hi, this broke a test on AIX https://lab.llvm.org/buildbot/#/builders/214/builds/903/steps/6/logs/FAIL__Clang__pch-with-module_m Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124250/new/ https://reviews.llvm.org/D124250

[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi added inline comments. Comment at: clang/unittests/Tooling/CompilationDatabaseTest.cpp:852 + add("other/random/path.cpp"); + // Proxies for ".H" files are ".C" files, and not ".cpp files" + EXPECT_EQ(getProxy("foo/bar/baz/exact.H"), "foo/bar/baz/exact.C"); ---

[PATCH] D107668: [OpenMP]Fix PR50336: Remove temporary files in the offload bundler tool

2022-04-25 Thread Victor Lomuller via Phabricator via cfe-commits
Naghasan added a comment. Thanks for your answer, make sense. If we are moving away I won't bother looking fixing my issue upstream as it is very niche (I don't think you can trigger this with the upstream clang driver). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D124384: [clang] Fix a constant evaluator crash on a NULL-type expr.

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. This is a reasonable immediate fix, but creating null-typed expressions that live *outside* the recoveryexpr seems scary, and likely to violate expected invariants elsewhere too... Rep

[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi updated this revision to Diff 424914. ishaangandhi added a comment. Made test case reflect that proxies for ".H" files are ".C" files, and not ".c files". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124262/new/ https://reviews.llvm.org/D124262 Files: clang/lib/Tooling

[PATCH] D124104: [clang][dataflow] Fix `Environment::join`'s handling of flow condition merging

2022-04-25 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:356 + +return V1 == V2 || + Env1.flowConditionImplies(*V1) == Env2.flowConditionImplies(*V2); ymandel

[PATCH] D124104: [clang][dataflow] Fix `Environment::join`'s handling of flow condition merging

2022-04-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 424916. ymandel marked an inline comment as done. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124104/new/ https://reviews.llvm.org/D124104 Files: clang/lib/Analysi

[PATCH] D124389: [clang][NFC] Inclusive language: remove use of Whitelist in clang/lib/Analysis/

2022-04-25 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, thanks for the cleanup! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124389/new/ https://reviews.llvm.org/D124389

[PATCH] D124104: [clang][dataflow] Fix `Environment::join`'s handling of flow condition merging

2022-04-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:356 + +return V1 == V2 || + Env1.flowConditionImplies(*V1) == Env2.flowConditionImplies(*V2);

[clang] 37b4782 - [clang][dataflow] Fix `Environment::join`'s handling of flow-condition merging.

2022-04-25 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-04-25T15:05:50Z New Revision: 37b4782e3e53cba265d26843f222134ed21e1974 URL: https://github.com/llvm/llvm-project/commit/37b4782e3e53cba265d26843f222134ed21e1974 DIFF: https://github.com/llvm/llvm-project/commit/37b4782e3e53cba265d26843f222134ed21e1974.diff

[PATCH] D124104: [clang][dataflow] Fix `Environment::join`'s handling of flow condition merging

2022-04-25 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. ymandel marked an inline comment as done. Closed by commit rG37b4782e3e53: [clang][dataflow] Fix `Environment::join`'s handling of flow-condition merging. (authored by

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-04-25 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D122663#3471866 , @erichkeane wrote: > This actually wouldn't be necessary in this case: cxxfilt is already 'right', > this is just for humans to be able to see "we changed this from mangling as > to ". That's a good point.

[PATCH] D122663: Mark identifier prefixes as substitutable

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D122663#3471960 , @hvdijk wrote: > In D122663#3471866 , @erichkeane > wrote: > >> This actually wouldn't be necessary in this case: cxxfilt is already >> 'right', this is just for

Re: [PATCH] D124250: [Serialization] write expr dependence bits as a single integer

2022-04-25 Thread Sam McCall via cfe-commits
Hi Jake, I suspect something about the test/runner is nonhermetic, I'm going to try to fix it in the test. This commit changes the serialized PCH format. It looks like this test is not properly hermetic, and is trying to load the PCH from a previous run of the test. It clears the module dir, but

[clang] 1c65c73 - Clear temporary file in test, buildbot appears to be reusing an old one.

2022-04-25 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-04-25T17:26:39+02:00 New Revision: 1c65c734c93f8c4d39947e596d7fe89289ce283d URL: https://github.com/llvm/llvm-project/commit/1c65c734c93f8c4d39947e596d7fe89289ce283d DIFF: https://github.com/llvm/llvm-project/commit/1c65c734c93f8c4d39947e596d7fe89289ce283d.diff LO

[PATCH] D124250: [Serialization] write expr dependence bits as a single integer

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. 1c65c734c93f8c4d39947e596d7fe89289ce283d will clear the PCH file. If this doesn't fix the problem I'll revert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D124395: [clang][dataflow] Optimize flow condition representation

2022-04-25 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev created this revision. sgatev added reviewers: ymandel, xazax.hun, gribozavr2. Herald added subscribers: tschuett, steakhal, rnkovacs. Herald added a project: All. sgatev requested review of this revision. Herald added a project: clang. Represent flow conditions as Token <=> Constraints bic

[PATCH] D121299: [NVPTX] Disable DWARF .file directory for PTX

2022-04-25 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. I'm going to merge the patch in a couple of days, unless anyone has a strong opinion against it. Alternative options: - revert this default back to false (not great for other targets) - add a check for `Triple == NVPTX` directly to llc (tools other than llc will have t

[PATCH] D124396: [HIP] Fix diag msg about sanitizer

2022-04-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: kerbowa, jvesely. Herald added a project: All. yaxunl requested review of this revision. Fix the misleading diag msg as the option is ignored for a particular offload arch only. https://reviews.llvm.org/D12439

[PATCH] D124221: Add new builtin __builtin_reflect_struct.

2022-04-25 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. Thank you for inviting me to a discussion on this topic. I have something very confusing as follows: - If the developer already knows all fields info in some struct, wyh doesn't he write a simple function to do the printing(like: print_struct_foo(const struct foo *); )

[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! I can land this for you if you don't have commit access - can you provide the name/email to use for the commit? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124262/new/

[PATCH] D124395: [clang][dataflow] Optimize flow condition representation

2022-04-25 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev updated this revision to Diff 424930. sgatev added a comment. Mark methods as const. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124395/new/ https://reviews.llvm.org/D124395 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnal

[PATCH] D121299: [NVPTX] Disable DWARF .file directory for PTX

2022-04-25 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I'm okay with doing it this way. My impression over the years (as a debug-info guy, not as a ptxas user) is that ptxas evolves slowly and this is not really "busy work." Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121

[PATCH] D124186: [RISCV] Fix incorrect policy implement for unmasked vslidedown and vslideup.

2022-04-25 Thread Zakk 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 rGffe03ff75c26: [RISCV] Fix incorrect policy implement for unmasked vslidedown and vslideup. (authored by khchen). Changed prior to commit: https://

[PATCH] D124063: [LegacyPM] Rename and deprecate populateModulePassManager

2022-04-25 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. I'd first fix up as many in-tree users as nikic pointed out (I'll work on bugpoint soonish since that requires a bit more work) Comment at: llvm/include/llvm-c/Transforms/PassManagerBuilder.h:72 +#ifdef __GNUC__ +__attribute__((deprecated("Migrate to

[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Ishaan Gandhi via Phabricator via cfe-commits
ishaangandhi added a comment. In D124262#3472079 , @sammccall wrote: > Thanks! > I can land this for you if you don't have commit access - can you provide the > name/email to use for the commit? Thank you! Ishaan Gandhi ishaangan...@gmail.com CHANGES

[PATCH] D124250: [Serialization] write expr dependence bits as a single integer

2022-04-25 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan added a comment. Thanks @sammccall, the test is passing now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124250/new/ https://reviews.llvm.org/D124250 ___ cfe-commits mailing list cfe-commits@

[PATCH] D124026: [Headers][MSVC] Define wchar_t in stddef.h like MSVC if not using the builtin type

2022-04-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma 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/D124026/new/ https://reviews.llvm.org/D124026 ___

[clang] 9727c77 - [NFC] Rename Instrinsic to Intrinsic

2022-04-25 Thread David Green via cfe-commits
Author: David Green Date: 2022-04-25T18:13:23+01:00 New Revision: 9727c77d58ac920a4158d08c15659470e52ddda4 URL: https://github.com/llvm/llvm-project/commit/9727c77d58ac920a4158d08c15659470e52ddda4 DIFF: https://github.com/llvm/llvm-project/commit/9727c77d58ac920a4158d08c15659470e52ddda4.diff L

[PATCH] D122920: [Clang][CodeGen]Fix __builtin_dump_struct missing record type field name

2022-04-25 Thread Andy Soffer via Phabricator via cfe-commits
asoffer added a comment. In D122920#3471865 , @yihanaa wrote: > In D122920#3471654 , @erichkeane > wrote: > >> @yihanaa : I'd suggest seeing the conversation that @rsmith @aaron.ballman >> and I are having about

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 424959. zixuw added a comment. - Use first match in `getRelativeIncludeName` - Try to get Preprocessor and reverse lookup headermaps in `getRelativeIncludeName` - Use `getRelativeIncludeName` to check for known files in `LocationFileChecker` - Misc fixes & adju

[clang] ef7439b - [Basic] SourceManager docs: macro expansion SLocs aren't a single token. NFC

2022-04-25 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-04-25T19:57:47+02:00 New Revision: ef7439bdf923e59095449c3bc8cfe72d8101eea5 URL: https://github.com/llvm/llvm-project/commit/ef7439bdf923e59095449c3bc8cfe72d8101eea5 DIFF: https://github.com/llvm/llvm-project/commit/ef7439bdf923e59095449c3bc8cfe72d8101eea5.diff LO

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 424963. erichkeane added a comment. This revision is now accepted and ready to land. Here is my current 'WIP' patch, with only `ChecksMemberVar::foo` failing. I noticed that the problem so far starts in `TransformMemberExpr`, which calls `TransformDecl`

[PATCH] D124396: [HIP] Fix diag msg about sanitizer

2022-04-25 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Wording nit. LGTM otherwise. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:113-114 def warn_drv_unsupported_option_for_offload_arch_req_feature : Warning< - "ign

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Here is the example I'm playing with: template constexpr bool constraint = true; #define BROKE_REQUIRES 1 #define WORKING_REQUIRES 2 #define WORKING_BODY 3 #define TEST BROKE_REQUIRES //#define TEST WORKING_REQUIRES //#define TEST WORKING_BODY

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Alright, a touch more: It looks like the looping through the `CurContext` at line 6084 finds the wrong thing in evaluating this `CXXMethodDecl`! The "broken" version has its CurContext as `bar` in the example above, the "working" versions have `foo` or `foo2`. The

[PATCH] D124396: [HIP] Fix diag msg about sanitizer

2022-04-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:113-114 def warn_drv_unsupported_option_for_offload_arch_req_feature : Warning< - "ignoring '%0' option as it is not currently supported for " -

[clang] 87468e8 - compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Sam McCall via cfe-commits
Author: Ishaan Gandhi Date: 2022-04-25T20:40:56+02:00 New Revision: 87468e85fcdcf1bd5055466e34d17436a79017a2 URL: https://github.com/llvm/llvm-project/commit/87468e85fcdcf1bd5055466e34d17436a79017a2 DIFF: https://github.com/llvm/llvm-project/commit/87468e85fcdcf1bd5055466e34d17436a79017a2.diff

  1   2   >