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

2022-12-15 Thread Peter Wolf via Phabricator via cfe-commits
BigPeet added a comment. Thanks for the review. Do I have to do anything or how will this be handled from here? Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp:1268 + + v2.emplace_back(NonTrivialWithVector()); + // CHECK-MESSAGES:

[PATCH] D139741: [clang][CodeGen] Use base subobject type layout for potentially-overlapping fields

2022-12-15 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In D139741#4000201 , @rupprecht wrote: > I'm not sure what the libcxx failure was that caused you to revert this, but > we also saw a clang crasher as a result of this. `clang/lib/AST/Decl.cpp:4300 > in unsigned int

[PATCH] D139966: [clang-tidy] Use Python3 for add_new_check.py and rename_check.py

2022-12-15 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG66bf54abb54e: [clang-tidy] Use Python3 for add_new_check.py and rename_check.py (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] 66bf54a - [clang-tidy] Use Python3 for add_new_check.py and rename_check.py

2022-12-15 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2022-12-16T06:54:16Z New Revision: 66bf54abb54e6eafb08fcece87cf5d9d32fedcd3 URL: https://github.com/llvm/llvm-project/commit/66bf54abb54e6eafb08fcece87cf5d9d32fedcd3 DIFF: https://github.com/llvm/llvm-project/commit/66bf54abb54e6eafb08fcece87cf5d9d32fedcd3.diff

[PATCH] D139966: [clang-tidy] Use Python3 for add_new_check.py and rename_check.py

2022-12-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D139966#3999473 , @njames93 wrote: > I'm just a little uneasy with the description, this isn't "fixing" the linked > issue, its more a workaround. The issue itself is also a bit of a non-issue. Thanks for reviewing!

[PATCH] D140164: [clang/Lexer] Enhance `Lexer::getImmediateMacroNameForDiagnostics` to return a result from non-file buffers

2022-12-15 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG59df56413bdc: [clang/Lexer] Enhance `Lexer::getImmediateMacroNameForDiagnostics` to return a… (authored by akyrtzi). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 59df564 - [clang/Lexer] Enhance `Lexer::getImmediateMacroNameForDiagnostics` to return a result from non-file buffers

2022-12-15 Thread Argyrios Kyrtzidis via cfe-commits
Author: Argyrios Kyrtzidis Date: 2022-12-15T22:46:41-08:00 New Revision: 59df56413bdc25bef53bf1629b26bd2176089088 URL: https://github.com/llvm/llvm-project/commit/59df56413bdc25bef53bf1629b26bd2176089088 DIFF:

[PATCH] D139507: [Intrinsic] Rename flt.rounds intrinsic to get.rounding

2022-12-15 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 483434. qiucf marked 3 inline comments as done. qiucf removed a reviewer: libc++abi. qiucf removed a project: libc++abi. qiucf removed a subscriber: libcxx-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136554: Implement CWG2631

2022-12-15 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. I applied this version of the patch and the crash is now gone  However, now I get this inexplicable error -- I'm not entirely sure it's related, maybe I'm holding it wrong: In module '': foo.h$line:$num: error: 'foo::FooClass' has different definitions in

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-12-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:607 +if (*LT == PT_Float) { + if (!this->emitAddf(getRoundingMode(E), E)) +return false; As discussed previously, compound assign operator cannot be

[PATCH] D140058: [clang-format][NFC] Turn on some code-changing options one by one

2022-12-15 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D140058#4000332 , @rupprecht wrote: > In D140058#4000311 , @rupprecht > wrote: > >> This is causing a test failure: >>

[PATCH] D140058: [clang-format][NFC] Turn on some code-changing options one by one

2022-12-15 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In D140058#4000311 , @rupprecht wrote: > This is causing a test failure: > https://buildkite.com/llvm-project/upstream-bazel/builds/48607#0185190c-43f8-43ff-b8bd-fa8ce0b6e2f5 > (and likewise running `ninja check-clang-unit`

[clang] 5a06334 - [Format] Capture `FormatStyle` by value to avoid use-after-free.

2022-12-15 Thread Jordan Rupprecht via cfe-commits
Author: Jordan Rupprecht Date: 2022-12-15T20:38:32-08:00 New Revision: 5a06334c51aa75d7f044785a495cf2de5bf13a9c URL: https://github.com/llvm/llvm-project/commit/5a06334c51aa75d7f044785a495cf2de5bf13a9c DIFF:

[PATCH] D140058: [clang-format][NFC] Turn on some code-changing options one by one

2022-12-15 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. This is causing a test failure: https://buildkite.com/llvm-project/upstream-bazel/builds/48607#0185190c-43f8-43ff-b8bd-fa8ce0b6e2f5 (and likewise running `ninja check-clang-unit` locally, but I don't have a buildbot link to that) Comment at:

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2022-12-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. At least on the surface, it looks like there will be a lot of trouble to deal with default arguments: struct A { A(); ~A(); int x[3]; }; int ((const A & = A()))[3]; void bar(int); void foo() { for (auto e : f()) { bar(e); } } We get a

[PATCH] D122255: Meta directive runtime support

2022-12-15 Thread Abid via Phabricator via cfe-commits
abidmalikwaterloo updated this revision to Diff 483422. abidmalikwaterloo marked 8 inline comments as done and an inline comment as not done. abidmalikwaterloo added a comment. Clean the formatting comments. The patch is out of attention for a while. Still need to work on the context selector

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2022-12-15 Thread Caleb Zulawski via Phabricator via cfe-commits
calebzulawski updated this revision to Diff 483416. calebzulawski added a comment. Update user manual Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136315/new/ https://reviews.llvm.org/D136315 Files: clang/docs/UsersManual.rst

[PATCH] D140058: [clang-format][NFC] Turn on some code-changing options one by one

2022-12-15 Thread Owen Pan 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 rG240e29c5015d: [clang-format][NFC] Turn on some code-changing options one by one (authored by owenpan). Repository: rG LLVM Github Monorepo

[clang] 240e29c - [clang-format][NFC] Turn on some code-changing options one by one

2022-12-15 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-12-15T19:48:26-08:00 New Revision: 240e29c5015d246de7fb5e4421aa93042fada59b URL: https://github.com/llvm/llvm-project/commit/240e29c5015d246de7fb5e4421aa93042fada59b DIFF: https://github.com/llvm/llvm-project/commit/240e29c5015d246de7fb5e4421aa93042fada59b.diff

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-15 Thread Piyou Chen via Phabricator via cfe-commits
BeMg updated this revision to Diff 483414. BeMg added a comment. 1. Remove this-> 2. Remove Policy() in struct declarationx Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139995/new/ https://reviews.llvm.org/D139995 Files:

[PATCH] D140002: [C++20] [Modules] Merging of lambda types in deserialization

2022-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu planned changes to this revision. ChuanqiXu added a comment. In D140002#4000252 , @vsapsai wrote: > In D140002#4000233 , @ChuanqiXu > wrote: > >>> Test case MergeLambdas3.cppm is unstable. Sometimes it

[PATCH] D138253: [-Wunsafe-buffer-usage] NFC: Implement fix-strategies and variable-use-claiming.

2022-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Because we're approaching a stack of ~15 patches and it's starting to become unmanageable, I'm really interested in landing these older patches quickly. I think I addressed the feedback, and I'm definitely committed to addressing more feedback as it comes in, but it's

[PATCH] D137348: [-Wunsafe-buffer-usage] Introduce an abstraction for fixable code patterns.

2022-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Because we're approaching a stack of ~15 patches and it's starting to become unmanageable, I'm really interested in landing these older patches quickly. I think I addressed the feedback, and I'm definitely committed to addressing more feedback as it comes in, but it's

[PATCH] D138321: [-Wunsafe-buffer-usage] Ignore array subscript on literal zero

2022-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:219 +arraySubscriptExpr(hasBase(ignoringParenImpCasts(hasPointerType())), +

[PATCH] D140002: [C++20] [Modules] Merging of lambda types in deserialization

2022-12-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D140002#4000233 , @ChuanqiXu wrote: >> Test case MergeLambdas3.cppm is unstable. Sometimes it passes but usually it >> fails. > > Weird. What is the error message if it fails? error: 'error' diagnostics seen but not

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM! Let's land once I land the previous patches. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137379/new/ https://reviews.llvm.org/D137379

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2022-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:943 +def warn_pragma_unsafe_buffer_usage_misorder : +ExtWarn<"pragma unsafe_buffer_usage used in misorder">, + InGroup; IIUC `ExtWarn` means it's a warning of the form

[PATCH] D140002: [C++20] [Modules] Merging of lambda types in deserialization

2022-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D140002#4000113 , @vsapsai wrote: > This is my first and pretty shallow review pass. Need to read the standard > more thoroughly to be more useful. Others are welcome to chime in (and as > I'll be on vacation are

[PATCH] D139741: [clang][CodeGen] Use base subobject type layout for potentially-overlapping fields

2022-12-15 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. I'm not sure what the libcxx failure was that caused you to revert this, but we also saw a clang crasher as a result of this. `clang/lib/AST/Decl.cpp:4300 in unsigned int clang::FieldDecl::getBitWidthValue(const ASTContext &) const: isBitField() && "not a bitfield"`.

[PATCH] D136176: Implement support for option 'fexcess-precision'.

2022-12-15 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor accepted this revision. andrew.w.kaylor added a comment. This revision is now accepted and ready to land. With the latest test cases and explanations, I'm happy with this patch. @rjmccall is there anything else you wanted to see addressed? CHANGES SINCE LAST ACTION

[PATCH] D140002: [C++20] [Modules] Merging of lambda types in deserialization

2022-12-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Test case MergeLambdas3.cppm is unstable. Sometimes it passes but usually it fails. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2161-2198 + /// FIXME: The `DeclContext::noload_lookup()` wouldn't load local lexical + /// lookups since

[PATCH] D140002: [C++20] [Modules] Merging of lambda types in deserialization

2022-12-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. This is my first and pretty shallow review pass. Need to read the standard more thoroughly to be more useful. Others are welcome to chime in (and as I'll be on vacation are encouraged to chime in). What do you mean by > Due to we don't care about merging unnamed

[PATCH] D139496: [CMake] Add perf profiling for clang-bolt

2022-12-15 Thread Amir Ayupov via Phabricator via cfe-commits
Amir added a comment. @phosek – this diff adds support for AArch64 via Linux perf. I believe it makes sense to add this functionality first in an incremental fashion and refactor it later, moving parts into perf-training script. What do you think? (And thank you for reviewing this stuff!)

[PATCH] D139496: [CMake] Add perf profiling for clang-bolt

2022-12-15 Thread Amir Ayupov via Phabricator via cfe-commits
Amir updated this revision to Diff 483400. Amir added a comment. Generalize to -DCLANG_BOLT={Instrument,perf,LBR}, update documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139496/new/ https://reviews.llvm.org/D139496 Files:

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add safe buffer opt-out pragma

2022-12-15 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 created this revision. ziqingluo-90 added reviewers: jkorous, NoQ, malavikasamak, t-rasmud. Herald added a project: All. ziqingluo-90 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add a pair of clang pragmas: `#pragma clang

[PATCH] D139006: [UpdateTestChecks] Match define for labels

2022-12-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Why not just `--function-define` as a way to enable the `define` but not the `captures`, if that is really something necessary. It is unclear to me why `function-signature` is not sufficient here and what the big problem with using it is. Repository: rG LLVM

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 483389. jhuber6 added a comment. Addressing comments, I did the symbolic link method. It's a stupid hack that's only necessary because of nvlink's poor handling but I think this works around it well enough. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2022-12-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5541-5545 +if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o)) + TempPath = FinalOutput->getValue(); +else + TempPath = BaseInput; + ChuanqiXu wrote: > dblaikie

[PATCH] D140177: [clang][deps] Give the fake file a unique name in by-module-name scans

2022-12-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, benlangmuir. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When scanning

[PATCH] D140176: [clang][deps] NFC: Split out the module-based API from the TU-based API

2022-12-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, benlangmuir. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For users of the C++

[PATCH] D140175: [clang][deps] Remove support for the deprecated driver API

2022-12-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, benlangmuir. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This API is no longer

[clang] 6443539 - [clang][deps] Implement `dump()` for the VFS

2022-12-15 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2022-12-15T16:03:00-08:00 New Revision: 64435396c5a0ba33a1197915673c1071e6d64f25 URL: https://github.com/llvm/llvm-project/commit/64435396c5a0ba33a1197915673c1071e6d64f25 DIFF: https://github.com/llvm/llvm-project/commit/64435396c5a0ba33a1197915673c1071e6d64f25.diff

[PATCH] D139717: Revert "[Driver] Remove Joined -X"

2022-12-15 Thread Davide Italiano via Phabricator via cfe-commits
davide accepted this revision. davide 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/D139717/new/ https://reviews.llvm.org/D139717

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2022-12-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D139586#3984118 , @cor3ntin wrote: > I will try to do a more detailed review later, but at least I think we might > want more tests. Maybe codegen tests that do not rely on > [[clang::lifetimebound]], and

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D140158#3999810 , @JonChesterfield wrote: > I don't think we should assume they want implicit behaviour from other > programming models thrown in. Agreed. Also, removing things is often surprisingly hard. Let's keep things

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

2022-12-15 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: clang/test/CodeGenObjCXX/encode.mm:93-94 // FIXME: This difference is due to D76801. It was probably an unintentional change. Maybe we want to undo it? - // CHECKCXX98: @_ZN11rdar93574002ggE ={{.*}} constant [49 x i8] c"{vector

[PATCH] D140105: [clang-format] add missing config parse test for short lambda

2022-12-15 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140105/new/ https://reviews.llvm.org/D140105 ___ cfe-commits mailing list

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. If we do magic header including, we should check for the freestanding argument and not include them with that set. I would prefer we not include cuda headers into C++ source that isn't being compiled as cuda, and also not link in misc cuda library files.

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D140158#3999783 , @tra wrote: > In D140158#3999716 , @jhuber6 wrote: > >> I just realized the method of copying the `.o` to a `.cubin` doesn't work if >> the link step is done in the

[PATCH] D140164: [clang/Lexer] Enhance `Lexer::getImmediateMacroNameForDiagnostics` to return a result from non-file buffers

2022-12-15 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi updated this revision to Diff 483370. akyrtzi added a comment. Adjust code comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140164/new/ https://reviews.llvm.org/D140164 Files: clang/lib/Lex/Lexer.cpp

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D140158#3999716 , @jhuber6 wrote: > I just realized the method of copying the `.o` to a `.cubin` doesn't work if > the link step is done in the same compilation because it doesn't exist yet. > To fix this I could either make the

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D140158#3999716 , @jhuber6 wrote: > Also do you think I should include the CUDA headers in with this? We can > always get rid of them with `nogpuinc` or similar if they're not needed. The > AMDGPU compilation still links

[PATCH] D140164: [clang/Lexer] Enhance `Lexer::getImmediateMacroNameForDiagnostics` to return a result from non-file buffers

2022-12-15 Thread Steven Wu via Phabricator via cfe-commits
steven_wu accepted this revision. steven_wu added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/Lex/Lexer.cpp:1050 - // If the macro's spelling has no FileID, then it's actually a token paste - // or stringization (or similar) and

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added a comment. I just realized the method of copying the `.o` to a `.cubin` doesn't work if the link step is done in the same compilation because it doesn't exist yet. To fix this I could either make the tool chain emit `.cubin` if we're going

[PATCH] D125272: [clang] Add -fcheck-new support

2022-12-15 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:3 +// RUN: %clang_cc1 -fcheck-new -triple x86_64-linux-gnu -S -disable-O0-optnone \ +// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s + jrtc27 wrote: > MaskRay wrote: > >

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-12-15 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Not sure exactly what code that generates in its current form, but that's roughly the right idea, yes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137107/new/ https://reviews.llvm.org/D137107 ___ cfe-commits

[PATCH] D136176: Implement support for option 'fexcess-precision'.

2022-12-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/test/CodeGen/X86/fexcess-precision.c:89 +// CHECK-EXT-NEXT:[[EXT1:%.*]] = fpext half [[TMP1]] to float +// CHECK-EXT-NEXT:[[MUL:%.*]] = fmul float [[EXT]], [[EXT1]] +// CHECK-EXT-NEXT:[[TMP2:%.*]] = load half, ptr

[PATCH] D140104: [clang][dataflow] Remove unused argument in getNullability

2022-12-15 Thread Dani Ferreira Franco Moura via Phabricator via cfe-commits
merrymeerkat updated this revision to Diff 483355. merrymeerkat added a comment. Address review comment (add temporary overload) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140104/new/ https://reviews.llvm.org/D140104 Files:

[PATCH] D139988: [clang][DebugInfo] Simplify logic to determine DW_AT_default_value for template parameters

2022-12-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 updated this revision to Diff 483348. Michael137 added a comment. - Remove now redundant header Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139988/new/ https://reviews.llvm.org/D139988 Files: clang/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2704 +VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) + HasHostFunctionVariant = true; ABataev wrote: >

[PATCH] D139985: [clang][AST][NFC] Move isSubstitutedDefaultArgument out of TypePrinter into separate component

2022-12-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Looks good, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139985/new/ https://reviews.llvm.org/D139985

[PATCH] D139989: [clang][DebugInfo] Add DW_AT_default_value support for template template parameters

2022-12-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 updated this revision to Diff 483346. Michael137 added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139989/new/ https://reviews.llvm.org/D139989 Files: clang/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D140104: [clang][dataflow] Remove unused argument in getNullability

2022-12-15 Thread Dani Ferreira Franco Moura via Phabricator via cfe-commits
merrymeerkat updated this revision to Diff 483345. merrymeerkat added a comment. Resolving review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140104/new/ https://reviews.llvm.org/D140104 Files:

[PATCH] D139988: [clang][DebugInfo] Re-use clang::TemplateUtils to determine guide DW_AT_default_value for template parameters

2022-12-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 updated this revision to Diff 483344. Michael137 added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139988/new/ https://reviews.llvm.org/D139988 Files: clang/lib/CodeGen/CGDebugInfo.cpp

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

2022-12-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 updated this revision to Diff 483343. Michael137 added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139986/new/ https://reviews.llvm.org/D139986 Files: clang/lib/AST/TypePrinter.cpp

[PATCH] D139985: [clang][AST][NFC] Move isSubstitutedDefaultArgument out of TypePrinter into separate component

2022-12-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 updated this revision to Diff 483342. Michael137 added a comment. - Don't create separate component. Instead move API into Type.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139985/new/ https://reviews.llvm.org/D139985 Files:

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

2022-12-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/test/CodeGenObjCXX/encode.mm:93-94 // FIXME: This difference is due to D76801. It was probably an unintentional change. Maybe we want to undo it? - // CHECKCXX98: @_ZN11rdar93574002ggE ={{.*}} constant [49 x i8] c"{vector

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2704 +VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) + HasHostFunctionVariant = true; doru1004 wrote: >

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2697-2706 + for (OMPDeclareVariantAttr *A : + Callee->specific_attrs()) { +auto *DeclRefVariant = cast(A->getVariantFuncRef()); +auto *VariantFD =

[PATCH] D139988: [clang][DebugInfo] Re-use clang::TemplateUtils to determine guide DW_AT_default_value for template parameters

2022-12-15 Thread Michael Buch via Phabricator via cfe-commits
Michael137 added a comment. In D139988#3999115 , @dblaikie wrote: > Looks good to me, thanks! > > Patch description might need a tweak, this bit: > >> Type template parameters where the type is itself a template instantiation >> (e.g., `template>`) > >

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2703 +OMPDeclareTargetDeclAttr::getDeviceType( +VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) ABataev

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

2022-12-15 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp:1268 + + v2.emplace_back(NonTrivialWithVector()); + // CHECK-MESSAGES:

[PATCH] D139966: [clang-tidy] Use Python3 for add_new_check.py and rename_check.py

2022-12-15 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. I'm just a little uneasy with the description, this isn't "fixing" the linked issue, its more a workaround. The issue itself is also a bit of a non-issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2022-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ok screw it, my static example is still broken. There's technically still a leak in it because there's no time for the other code to kick in between `p = (int *)malloc(sizeof(int));` and `p = 0;` to read the value from `p`. But in practice there could be a lot of things

[PATCH] D140018: [clang-tidy] Support std::string_view in readability-redundant-string-cstr

2022-12-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr.cpp:56 +}; +typedef basic_string_view> string_view; } Can you add typedefs and tests for wstring_view and others Repository: rG LLVM

[PATCH] D140035: [X86] Prevent -mibt-seal to work together with -flto=thin

2022-12-15 Thread Joao Moreira via Phabricator via cfe-commits
joaomoreira added a comment. In D140035#3998954 , @samitolvanen wrote: > In D140035#3996066 , @joaomoreira > wrote: > >> Regarding not being able to reproduce this in kernel -- never mind... I was >> misled by

[PATCH] D139266: Headers: tweak inclusion condition for stdatomic.h

2022-12-15 Thread Saleem Abdulrasool 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 rGe0c3142af075: Headers: tweak inclusion condition for stdatomic.h (authored by compnerd). Changed prior to commit:

[clang] e0c3142 - Headers: tweak inclusion condition for stdatomic.h

2022-12-15 Thread Saleem Abdulrasool via cfe-commits
Author: Saleem Abdulrasool Date: 2022-12-15T21:50:28Z New Revision: e0c3142af075e2ef89395dbed5939071345eb622 URL: https://github.com/llvm/llvm-project/commit/e0c3142af075e2ef89395dbed5939071345eb622 DIFF: https://github.com/llvm/llvm-project/commit/e0c3142af075e2ef89395dbed5939071345eb622.diff

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2697-2706 + for (OMPDeclareVariantAttr *A : + Callee->specific_attrs()) { +auto *DeclRefVariant = cast(A->getVariantFuncRef()); +auto *VariantFD =

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 483325. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140155/new/ https://reviews.llvm.org/D140155 Files: clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/declare_target_messages.cpp Index:

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

2022-12-15 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl accepted this revision. aprantl added inline comments. Comment at: clang/test/CodeGenObjCXX/encode.mm:93-94 // FIXME: This difference is due to D76801. It was probably an unintentional change. Maybe we want to undo it? - // CHECKCXX98: @_ZN11rdar93574002ggE ={{.*}}

[PATCH] D140164: [clang/Lexer] Enhance `Lexer::getImmediateMacroNameForDiagnostics` to return a result from non-file buffers

2022-12-15 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi created this revision. Herald added a project: All. akyrtzi requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use `SourceManager::isWrittenInScratchSpace()` to specifically check for token paste or stringization, instead of

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

2022-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/malloc-static-storage.cpp:33-38 +void malloc_escape() { + static int *p; + p = (int *)malloc(sizeof(int)); + escape(p); // no-leak + p = 0; // no-leak +} NoQ wrote: > NoQ wrote: > > The main problem

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-12-15 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. This uploaded patch is a draft (LIT tests fails but are not updated since I am not sure about these changes) that I am part way confident about. There are still a lot of things that I need to look at, but would you mind looking at it to see if this is moving in the

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-12-15 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 483320. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137107/new/ https://reviews.llvm.org/D137107 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td clang/lib/AST/ExprConstant.cpp clang/lib/CodeGen/CGDeclCXX.cpp

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

2022-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/malloc-static-storage.cpp:33-38 +void malloc_escape() { + static int *p; + p = (int *)malloc(sizeof(int)); + escape(p); // no-leak + p = 0; // no-leak +} NoQ wrote: > The main problem with static

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. LGTM overall. So, essentially the patch refactors what we've already been doing for OpenMP and made it usable manually, which will be useful for things like GPU-side libc tests. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:631-632 + + const char

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

2022-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/malloc-static-storage.cpp:33-38 +void malloc_escape() { + static int *p; + p = (int *)malloc(sizeof(int)); + escape(p); // no-leak + p = 0; // no-leak +} The main problem with static locals is that

[PATCH] D140084: [llvm][test] Split DW_AT_default_value check out of clang/test/

2022-12-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D140084#3997851 , @Michael137 wrote: > In D140084#3997123 , @dblaikie > wrote: > >> Sorry, should've caught this in review. The clang change needs test coverage >> in clang, but

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 483312. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/ https://reviews.llvm.org/D139723 Files: clang/lib/Headers/CMakeLists.txt clang/lib/Headers/__clang_hip_runtime_wrapper.h clang/lib/Headers/__clang_hip_stdlib.h

[PATCH] D129531: [clang][C++20] P0960R3 and P1975R0: Allow initializing aggregates from a parenthesized list of values

2022-12-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked 3 inline comments as done. ayzhao added inline comments. Comment at: clang/include/clang/AST/ExprCXX.h:4760 + : Expr(CXXParenListInitExprClass, T, + T->isLValueReferenceType() ? VK_LValue + : T->isRValueReferenceType() ? VK_XValue

[PATCH] D140159: [clang][nfc] Fixes for D129531

2022-12-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. ayzhao added a reviewer: shafik. Herald added a project: All. ayzhao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Additional fixes for review comments made in https://reviews.llvm.org/D129531 after the

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, JonChesterfield. Herald added subscribers: mattd, gchakrabarti, carlosgalvezp, asavonic. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald

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

2022-12-15 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: clang/test/CodeGenObjCXX/encode.mm:93-94 // FIXME: This difference is due to D76801. It was probably an unintentional change. Maybe we want to undo it? - // CHECKCXX98: @_ZN11rdar93574002ggE ={{.*}} constant [49 x i8] c"{vector

[PATCH] D140155: [OpenMP] Allow host call to nohost function with host variant

2022-12-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 created this revision. doru1004 added reviewers: carlo.bertolli, ronl, gregrodgers, jdoerfert, jhuber6, ABataev. doru1004 added a project: OpenMP. Herald added subscribers: guansong, yaxunl. Herald added a project: All. doru1004 requested review of this revision. Herald added

[PATCH] D139985: [clang][AST][NFC] Move isSubstitutedDefaultArgument out of TypePrinter into separate component

2022-12-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/include/clang/AST/TemplateUtils.h:19 +namespace clang { +namespace TemplateUtils { +/// Make a best-effort determination of whether the type T can be produced by aprantl wrote: > Michael137 wrote: > > dblaikie

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

2022-12-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Looks good to me Comment at: clang/test/CodeGenObjCXX/encode.mm:93-94 // FIXME: This difference is due to D76801. It was probably an unintentional change. Maybe we

[PATCH] D139989: [clang][DebugInfo] Add DW_AT_default_value support for template template parameters

2022-12-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. Looks good to me - we'd usually split the LLVM part from the Clang part, but I don't think we have fine grained unit tests for DIBuilder (could you check - if we do, then the LLVM part should go separately, with unit test coverage, then

[PATCH] D140085: [NFC] Rename Instruction::insertAt() to Instruction::insertInto(), to be consistent with BasicBlock::insertInto()

2022-12-15 Thread Vasileios Porpodas 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 rG32b38d248fd3: [NFC] Rename Instruction::insertAt() to Instruction::insertInto(), to be… (authored by vporpo). Repository: rG LLVM Github Monorepo

[clang] 32b38d2 - [NFC] Rename Instruction::insertAt() to Instruction::insertInto(), to be consistent with BasicBlock::insertInto()

2022-12-15 Thread Vasileios Porpodas via cfe-commits
Author: Vasileios Porpodas Date: 2022-12-15T12:27:45-08:00 New Revision: 32b38d248fd3c75abc5c86ab6677b6cb08a703cc URL: https://github.com/llvm/llvm-project/commit/32b38d248fd3c75abc5c86ab6677b6cb08a703cc DIFF:

  1   2   >