[clang] 7a4968b - [AMDGPU] Add dynamic stack bit info to kernel-resource-usage Rpass output

2023-07-25 Thread Corbin Robeck via cfe-commits
Author: Corbin Robeck Date: 2023-07-25T12:20:13-07:00 New Revision: 7a4968b5a378d1f06e638c99d0e983c35045fb34 URL: https://github.com/llvm/llvm-project/commit/7a4968b5a378d1f06e638c99d0e983c35045fb34 DIFF: https://github.com/llvm/llvm-project/commit/7a4968b5a378d1f06e638c99d0e983c35045fb34.diff

[PATCH] D156040: [AMDGPU] Add dynamic stack bit info to kernel-resource-usage Rpass output

2023-07-25 Thread Corbin Robeck 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 rG7a4968b5a378: [AMDGPU] Add dynamic stack bit info to kernel-resource-usage Rpass output (authored by crobeck). Repository: rG LLVM Github Monorepo

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/include/clang/Basic/FPOptions.def:29 OPTION(Float16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) +OPTION(MathErrno, bool,

[PATCH] D156172: [clang][CodeGen] Emit annotations for function declarations.

2023-07-25 Thread Brendan Dahl via Phabricator via cfe-commits
brendandahl added a comment. A little more context for the new reviewers. Over in this patch I added support for annotations to be emitted into WebAssembly. We'd like to use this to mark imported (declarations) and exported (definitions) of functions with spec

[PATCH] D154951: [clang][Interp] __builtin_bit_cast, Take 2

2023-07-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Boolean.h:113 + static Boolean bitcastFromMemory(const std::byte *Buff) { +bool Val = static_cast(*Buff); +return Boolean(Val); MitalAshok wrote: > Does this handle padding bits correctly? E

[PATCH] D156032: Implement CWG2137 (list-initialization from objects of the same type)

2023-07-25 Thread Mital Ashok via Phabricator via cfe-commits
MitalAshok updated this revision to Diff 544078. MitalAshok added a comment. Target clang 18 instead; add entry to release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156032/new/ https://reviews.llvm.org/D156032 Files: clang/docs/Release

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/FPOptions.def:29 OPTION(Float16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) +OPTION(MathErrno,

[PATCH] D154328: [AST] Add API to iterate already loaded specializations

2023-07-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > which might be problematic in some contexts. I'd appreciate some more details on what those contexts are. It's a bit unpleasant to expose these APIs as part of the public interface because we typically *do* want deserialization. I'm not opposed to the changes, b

[PATCH] D151625: [clang] Add `clang::equality_operator_compares_members_lexicographically`

2023-07-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D151625#4528817 , @AMP999 wrote: > This attribute is trying to work around an issue with operator== > instantiation, but according to > https://cpplang.slack.com/archives/C6K47F8TT/p1689107603335019?thread_ts=1689107603

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam marked 2 inline comments as done. zahiraam added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:857 setAllowApproxFuncOverride(!Value); +setMathErrnoOverride(Value); if (Value) aaron.ballman wrote: > zahiraam wrote: >

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2321-2328 + if ((FD->hasAttr() && !ErrnoOverriden && !OptNone) || ((ConstWithoutErrnoAndExceptions || ConstWithoutExceptions) && - (!ConstWithoutErrnoAndExceptions || (!getLangOpts().MathErr

[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added a comment. This is a lot of work, thank you @t-rasmud & @NoQ ! I have a minor suggestion: can we use some macros to make the debug stub even shorter? The prefix `"failed to produce fixit for declaration"` is used in many places so probably we do not have to repeat it everywh

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-25 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. jp4a50 requested review of this revision. Fixes a long-standing bug: https://github.com/llvm/llvm-proj

[PATCH] D156189: [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter fix-its share common code

2023-07-25 Thread Rashmi Mudduluru via Phabricator via cfe-commits
t-rasmud added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1824 + + if (!IdentText) +return {}; When will this condition be satisfied? I just want to understand if there are code examples where there is no identifier text or is it

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-07-25 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. @owenpan I've put up a patch for the bug you mentioned here: https://reviews.llvm.org/D156259 I'll rebase this change on top of that if you like the look of it. It should be fairly trivial to do. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[clang] 1b162fa - [Support] Change SetVector's default template parameter to SmallVector<*, 0>

2023-07-25 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-07-25T13:13:35-07:00 New Revision: 1b162fabe8fa07b6758fe2bce51f0dc19dd6e265 URL: https://github.com/llvm/llvm-project/commit/1b162fabe8fa07b6758fe2bce51f0dc19dd6e265 DIFF: https://github.com/llvm/llvm-project/commit/1b162fabe8fa07b6758fe2bce51f0dc19dd6e265.diff

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 544084. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/include/clang/Basic/FPOptions.def clang/include/clang/Basic/LangOptions.h clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGCal

[PATCH] D156172: [clang][CodeGen] Emit annotations for function declarations.

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The idea of emitting annotations on declarations seems fine. (LLVM itself doesn't consume annotations anyway; they're meant as an extension mechanism for third-party tools.) I'm a bit concerned the way this is implemented will end up dropping annotations we would pre

[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D156185#4530163 , @efriedma wrote: >> so if you were concerned with arrays of string literals, we need this patch. > > Ohhh that's not what I meant by StringLiterals. I meant cases where the > string literal is an

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 544085. RIscRIpt marked 6 inline comments as done. RIscRIpt added a comment. Addressed review comments, rebased onto main Noticable changes: 1. Diagnostics message 2. Support of expansion of these attributes in 2nd argument of `static_assert` 3. Moved helpe

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.h:87-93 +/// Return true if this token is a predefined macro +/// unexpandable by MSVC preprocessor. +inline bool isUnexpandableMsMacro(TokenKind K) { + return K == tok::kw___FUNCTION__ || K == tok:

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 544086. akhuang added a comment. Add some functions to MicrosoftMangle so we can pass in a custom function name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:3095 + StringRef CallOpName = CallOpFn->getName(); + std::string ImplName = ("__impl" + CallOpName).str(); + rnk wrote: > akhuang wrote: > > The old code tried to find the "" part of the f

[clang] 070358e - [-Wunsafe-buffer-usage] Fix a fallthrough case in UPCStandalonePointer getFixits

2023-07-25 Thread Rashmi Mudduluru via cfe-commits
Author: Rashmi Mudduluru Date: 2023-07-25T13:40:33-07:00 New Revision: 070358ec92350c13b0b6c60fbb03bf35a7a00251 URL: https://github.com/llvm/llvm-project/commit/070358ec92350c13b0b6c60fbb03bf35a7a00251 DIFF: https://github.com/llvm/llvm-project/commit/070358ec92350c13b0b6c60fbb03bf35a7a00251.di

[PATCH] D155526: [-Wunsafe-buffer-usage] Fix a fallthrough case in UPCStandalonePointer getFixits

2023-07-25 Thread Rashmi Mudduluru via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG070358ec9235: [-Wunsafe-buffer-usage] Fix a fallthrough case in UPCStandalonePointer getFixits (authored by t-rasmud). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior

[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. No, that's taking the address of a string literal lvalue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156185/new/ https://reviews.llvm.org/D156185 ___ cfe-commits mailing list

[PATCH] D156128: [Clang][AArch64] Fix up immediate range of f64f64 mopa/mops intrinsics

2023-07-25 Thread Bryan Chan via Phabricator via cfe-commits
bryanpkc accepted this revision. bryanpkc added a comment. This revision is now accepted and ready to land. Thanks for the catch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156128/new/ https://reviews.llvm.org/D156128 __

[PATCH] D156192: [-Wunsafe-buffer-usage] Stop generating incorrect fix-its for variable declarations with unsupported specifiers

2023-07-25 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! Yeah I agree that we can eventually support a lot of these incrementally, but it's great to establish a safe baseline first. > If there are other specifiers involved, they may be accidentally

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:3095 + StringRef CallOpName = CallOpFn->getName(); + std::string ImplName = ("__impl" + CallOpName).str(); + akhuang wrote: > rnk wrote: > > akhuang wrote: > > > The old code tried to find the

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 544088. RIscRIpt added a comment. Removed irrelevant changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1981 + // parsed yet). + assert(getLangOpts().MicrosoftExt); + I think I should remove this assertion so this function would be usable without MS ext, on the other hand it would be a noop

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:263 State.StartOfStringLiteral = 0; + State.NoLineBreak = false; State.StartOfLineLevel = 0; Was this uninitialized? Comment at: clang/lib/Fo

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 544090. akhuang added a comment. go back to previous __impl naming method Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files: clang/include/clang/CodeGen/CGFunct

[PATCH] D155524: [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an earlier stage

2023-07-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. LGTM, thanks!! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1095-1102 // Gadgets "claim" variables they're responsible for. Once this loop finishes, // the tracker will only track DREs that weren't claimed by any g

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/lib/CodeGen/CGClass.cpp:3094 + // reason the name doesn't look as expected then just tack __impl to the + // front. + StringRef CallOpName = CallOpFn->get

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. I think I'm happy with this. I noted two code changes that I think are no longer needed and offered some final suggestions on some names. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:118-120 +def ext_expand_predef_ms : ExtWarn< + "

[PATCH] D156172: [clang][CodeGen] Emit annotations for function declarations.

2023-07-25 Thread Brendan Dahl via Phabricator via cfe-commits
brendandahl added a comment. That example appears to still work the same with my patch: @xxx = global ptr @foo, align 8 @.str = private unnamed_addr constant [4 x i8] c"bar\00", section "llvm.metadata" @.str.1 = private unnamed_addr constant [8 x i8] c"main2.c\00", section "llvm.metadata"

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1981 + // parsed yet). + assert(getLangOpts().MicrosoftExt); + RIscRIpt wrote: > I think I should remove this assertion so this function would be usable > without MS ext, on the other h

[PATCH] D156261: [NFC] Cast unchecked return values to void.

2023-07-25 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir created this revision. schittir added reviewers: tahonermann, aaron.ballman. Herald added a project: All. schittir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D156

[clang] 15a484b - [clang][ConstExprEmitter] handle IntegerLiterals

2023-07-25 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-07-25T14:12:50-07:00 New Revision: 15a484bf6990c5c3b759f5bbf99055612c20b924 URL: https://github.com/llvm/llvm-project/commit/15a484bf6990c5c3b759f5bbf99055612c20b924 DIFF: https://github.com/llvm/llvm-project/commit/15a484bf6990c5c3b759f5bbf99055612c20b924.di

[PATCH] D156154: [clang][ConstExprEmitter] handle IntegerLiterals

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG15a484bf6990: [clang][ConstExprEmitter] handle IntegerLiterals (authored by nickdesaulniers). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156154/new/ http

[clang] ef103ad - [clang][CodeGenModule] remove declaration of GetAddrOfConstantString

2023-07-25 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-07-25T14:25:25-07:00 New Revision: ef103adf60c6fccd3cc6d76b362c1c37c41da30f URL: https://github.com/llvm/llvm-project/commit/ef103adf60c6fccd3cc6d76b362c1c37c41da30f DIFF: https://github.com/llvm/llvm-project/commit/ef103adf60c6fccd3cc6d76b362c1c37c41da30f.di

[PATCH] D156182: [clang][CodeGenModule] remove declaration of GetAddrOfConstantString

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGef103adf60c6: [clang][CodeGenModule] remove declaration of GetAddrOfConstantString (authored by nickdesaulniers). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 544101. akhuang added a comment. add TODO Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files: clang/include/clang/CodeGen/CGFunctionInfo.h clang/lib/CodeGen/CG

[PATCH] D156172: [clang][CodeGen] Emit annotations for function declarations.

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Slightly messed up my example because I forgot the function was unprototyped. The following should show what I mean: void foo(void); void *xxx = (void*)foo; __attribute__((annotate("bar"))) void foo(){} In terms of where the right place is, I don't recall the ex

[PATCH] D156188: [-Wunsafe-buffer-usage] Refactor and improve for parameter fix-its

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 544104. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156188/new/ https://reviews.llvm.org/D156188 Files: clang/lib/Analysis/UnsafeBufferUsage.cpp clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-parm-span.cpp clang/test/SemaCXX/warn-uns

[clang] b6847ed - For #64088: mark vtable as used if we might emit a reference to it.

2023-07-25 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-07-25T14:42:10-07:00 New Revision: b6847edfc235829b37dd6d734ef5bbfa0a58b6fc URL: https://github.com/llvm/llvm-project/commit/b6847edfc235829b37dd6d734ef5bbfa0a58b6fc DIFF: https://github.com/llvm/llvm-project/commit/b6847edfc235829b37dd6d734ef5bbfa0a58b6fc.diff

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132 +case CK_NullToPointer: { + if (llvm::Constant *C = Visit(subExpr, destType)) +if (C->isNullValue()) + return CGM.EmitNullConstant(destType); --

[PATCH] D154186: [clang][DeclPrinter] Fix AST print of delegating constructors

2023-07-25 Thread Timo Stripf via Phabricator via cfe-commits
strimo378 added a comment. I plan around half a dozen patches only for ast-print functionality. I would love to land it myself and will asked for commit privileges. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154186/new/ https://reviews.llvm.org

[PATCH] D154838: [analyzer] Add check for null pointer passed to %p of printf family

2023-07-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > Should I cover non-standard (i.e., non ISO C standard) functions from the > `printf_s` family? Should I cover non-standard functions like `dprintf`? The static analyzer, unlike the compiler proper, isn't required to treat all code fairly. It's ok to have different behavio

[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D156185#4533083 , @efriedma wrote: > No, that's taking the address of a string literal lvalue. ah! sorry, yeah `const char* foo = "foo";` vs `char foo[10] = "x";` That AST looks like: `-VarDecl 0x55eaf6075ba8

[PATCH] D155997: [Phase Ordering] Don't speculate in SimplifyCFG before PGO annotation

2023-07-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 544109. tejohnson added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155997/new/ https://reviews.llvm.org/D155997 Files: clang/test/CodeGen/pgo-sample-preparation.c llvm/lib/

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132 +case CK_NullToPointer: { + if (llvm::Constant *C = Visit(subExpr, destType)) +if (C->isNullValue()) + return CGM.EmitNullConstant(destType); nick

[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-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. I don't have any concern with this specific patch; LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156185/new/ https://reviews.llvm.org/D

[PATCH] D156189: [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter fix-its share common code

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 544111. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156189/new/ https://reviews.llvm.org/D156189 Files: clang/lib/Analysis/UnsafeBufferUsage.cpp clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-local-var-span.cpp clang/test/SemaCXX/war

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 544113. nickdesaulniers marked 2 inline comments as done. nickdesaulniers added a comment. - remove the check for isNullValue as per @efriedma Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156175/new/ h

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132 +case CK_NullToPointer: { + if (llvm::Constant *C = Visit(subExpr, destType)) +if (C->isNullValue()) + return CGM.EmitNullConstant(destType); --

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 544114. RIscRIpt marked 4 inline comments as done. RIscRIpt added a comment. Rename diagnostic messages constants Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914 Fil

[PATCH] D156189: [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter fix-its share common code

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1824 + + if (!IdentText) +return {}; t-rasmud wrote: > When will this condition be satisfied? I just want to understand if there are > code examples where there is no i

[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. what's the "exit criteria" for this patch (https://reviews.llvm.org/D76096)? in https://reviews.llvm.org/D76096#4523828 and https://reviews.llvm.org/D76096#4524003 you mention InitListExpr and StringLiteral. In https://reviews.llvm.org/D156185#4533274 I verified

[PATCH] D155769: [Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-07-25 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added a comment. Interesting. Comment at: clang/docs/StdParSupport.rst:349 + +thread t0{[&]() { + hipSetDevice(accelerator_0); Comment at: clang/docs/StdParSupport.rst:354 +}}; +thread t1{[&]() { +

[clang] d119980 - [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-07-25T15:27:08-07:00 New Revision: d1199808afa5b46dfb6738f123b869d0e2fa050a URL: https://github.com/llvm/llvm-project/commit/d1199808afa5b46dfb6738f123b869d0e2fa050a DIFF: https://github.com/llvm/llvm-project/commit/d1199808afa5b46dfb6738f123b869d0e2fa050a.di

[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Nick Desaulniers 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 rGd1199808afa5: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of… (authored by nickdesaulniers). Changed prior to commit: ht

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 544126. nickdesaulniers added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156175/new/ https://reviews.llvm.org/D156175 Files: clang/lib/CodeGen/CGExprConstant.cpp Index: clang

[PATCH] D154784: [clang] Fix crash caused by PseudoObjectExprBitfields::NumSubExprs overflow

2023-07-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/include/clang/AST/Stmt.h:596-597 -// These don't need to be particularly wide, because they're -// strictly limited by the forms of expressions we permit. -unsigned NumSubExprs : 8; -unsigned ResultIndex : 32 - 8

[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 544128. nickdesaulniers added a comment. - rebase for presubmit builders Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76096/new/ https://reviews.llvm.org/D76096 Files: clang/docs/ReleaseNotes.rst

[PATCH] D152793: [RISCV] Add MC layer support for Zicfiss.

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:75 // CHECK-NOT: __riscv_zvfbfwma {{.*$}} +// CHECK-NOT: __riscv_zicfisslp {{.*$}} This needs to be renamed to remove lp Comment at: clang/test/P

[PATCH] D156234: [clang][deps] provide support for cc1 command line scanning

2023-07-25 Thread Connor Sughrue via Phabricator via cfe-commits
cpsughrue updated this revision to Diff 544127. cpsughrue edited the summary of this revision. cpsughrue added a comment. Fixed formatting issues CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156234/new/ https://reviews.llvm.org/D156234 Files: clang/lib/Tooling/DependencyScanning/Dep

[PATCH] D154658: Optimize emission of `dynamic_cast` to final classes.

2023-07-25 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. This change results in some of our builds (distributed Thin-LTO in case that matters) to fail with missing symbols. At a first glance this seems to emit VTables in some files where it didn't do this before and then fails to resolve some members of that vtable. I'm in the

[clang] 61c7a91 - Commit to a primary definition for a class when we load its first

2023-07-25 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-07-25T15:59:21-07:00 New Revision: 61c7a9140becb19c5b1bc644e54452c6f782f5d5 URL: https://github.com/llvm/llvm-project/commit/61c7a9140becb19c5b1bc644e54452c6f782f5d5 DIFF: https://github.com/llvm/llvm-project/commit/61c7a9140becb19c5b1bc644e54452c6f782f5d5.diff

[PATCH] D154658: Optimize emission of `dynamic_cast` to final classes.

2023-07-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D154658#4533476 , @MatzeB wrote: > This change results in some of our builds (distributed Thin-LTO in case that > matters) to fail with missing symbols. At a first glance this seems to emit > VTables in some files where it did

[clang-tools-extra] 16d79d2 - [clangd] Use xxh3_64bits for background index file digests

2023-07-25 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-07-25T16:02:54-07:00 New Revision: 16d79d26b3b6b7ab4b024f478f05569e0a033c76 URL: https://github.com/llvm/llvm-project/commit/16d79d26b3b6b7ab4b024f478f05569e0a033c76 DIFF: https://github.com/llvm/llvm-project/commit/16d79d26b3b6b7ab4b024f478f05569e0a033c76.diff

[PATCH] D155992: [clangd] Use xxh3_64bits for background index file digests

2023-07-25 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG16d79d26b3b6: [clangd] Use xxh3_64bits for background index file digests (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155992/new/ ht

[PATCH] D154658: Optimize emission of `dynamic_cast` to final classes.

2023-07-25 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. In D154658#4533476 , @MatzeB wrote: > This change results in some of our builds (distributed Thin-LTO in case that > matters) to fail with missing symbols. At a first glance this seems to emit > VTables in some files where it did

[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Basically, I don't want order-of-magnitude compile-time regressions with large global variables. There are basically two components to that: - That the fast path for emitting globals in C continues be fast. - That we rarely end up using evaluateValue() on large global

[PATCH] D155544: [AIX][TLS][clang] Add -maix-small-local-exec-tls clang option.

2023-07-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. LGTM for landing after D156203 and D155600 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D156274: [NFC] Avoid potential dereferencing of nullptr.

2023-07-25 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir created this revision. schittir added reviewers: aaron.ballman, tahonermann, erichkeane. Herald added a project: All. schittir requested review of this revision. Herald added subscribers: cfe-commits, wangpc. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://re

[PATCH] D151373: [libclang] Expose arguments of clang::annotate{_type}

2023-07-25 Thread Fridtjof Mund via Phabricator via cfe-commits
fridtjof updated this revision to Diff 544142. fridtjof added a comment. I fixed the failing IBOutletCollection.m test - there was code to do special handling for the respective attribute type, which my patch accidentally skipped previously. I reordered the generic attribute handling to come aft

[PATCH] D156277: [Parser][ObjC] Stop parsing on eof

2023-07-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/64065 Repository: rG LLVM Github Monorepo https://reviews.llvm.or

[clang] cfcf76c - [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an earlier stage

2023-07-25 Thread Ziqing Luo via cfe-commits
Author: Ziqing Luo Date: 2023-07-25T16:58:27-07:00 New Revision: cfcf76c6ad72581917fc65b598e3b64ca28c5ce1 URL: https://github.com/llvm/llvm-project/commit/cfcf76c6ad72581917fc65b598e3b64ca28c5ce1 DIFF: https://github.com/llvm/llvm-project/commit/cfcf76c6ad72581917fc65b598e3b64ca28c5ce1.diff LO

[PATCH] D155524: [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an earlier stage

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ziqingluo-90 marked an inline comment as done. Closed by commit rGcfcf76c6ad72: [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an… (authore

[PATCH] D155524: [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an earlier stage

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1095-1102 // Gadgets "claim" variables they're responsible for. Once this loop finishes, // the tracker will only track DREs that weren't claimed by any gadgets, // i.e. not underst

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:948 // Additional dependency checks. - // TODO: The 'q' extension requires rv64. - // TODO: It is illegal to specify 'e' extensions with 'f' and 'd'. + // The 'q' extension requires rv64. + i

[PATCH] D156234: [clang][deps] provide support for cc1 command line scanning

2023-07-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. This looks pretty good! I'm not sure unit testing is the best choice here, since we're not checking for low-level properties or hard-to-observe behavior. In general LIT tests are easier to write/maintain/understand and don't require recompiling, so I'd suggest to

[PATCH] D156239: [X86] Support -march=arrowlake, arrowlake-s, lunarlake

2023-07-25 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 544159. FreddyYe marked an inline comment as done. FreddyYe added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156239/new/ https://reviews.llvm.org/D156239 Files: clang/lib/Basi

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:948 // Additional dependency checks. - // TODO: The 'q' extension requires rv64. - // TODO: It is illegal to specify 'e' extensions with 'f' and 'd'. + // The 'q' extension requires rv64. + i

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:948 - // TODO: The 'q' extension requires rv64. - // TODO: It is illegal to specify 'e' extensions with 'f' and 'd'. asb wrote: > imkiva wrote: > > wangpc wrote: > > > I think t

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:948 - // TODO: The 'q' extension requires rv64. - // TODO: It is illegal to specify 'e' extensions with 'f' and 'd'. craig.topper wrote: > asb wrote: > > imkiva wrote: > > > wan

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I have deleted the two TODOs in r02c11c5aed59624046125cf512c12f70d2fa358d Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156214/new/ https://reviews.llvm.org/D156214 ___ cfe-

[PATCH] D156201: [ASTImporter] Fix corrupted RecordLayout introduced by circular referenced fields

2023-07-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 544168. danix800 added a comment. Remove case #1 (fixed by https://reviews.llvm.org/D155574 from @balazske which is better). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156201/new/ https://reviews.llvm.org/

[PATCH] D156247: [Clang] Add a warning on uses of coroutine keywords

2023-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > however, if there are important unresolved issues, why did we set > __cpp_impl_coroutine ? The discussion is here: https://discourse.llvm.org/t/rfc-could-we-mark-coroutines-as-unreleased-now/69220. My short summary may be: (1) It is not necessary to claim a feature

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision. tahonermann added a comment. This revision is now accepted and ready to land. I'm happy with this. I noted one last rename suggestion to maintain consistency, but am accepting. Please give Corentin a final chance to raise any concerns. Thank you for being so r

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/reference-to-constructed-temporary.rst:18 + + const std::string& value("hello"); + PiotrZSL wrote: > xgupta wrote: > > The below comment is not matching, do you wan

[PATCH] D153114: [clangd] [C++20] [Modules] Support C++20 modules for clangd

2023-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @sammccall gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153114/new/ https://reviews.llvm.org/D153114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] c56514f - Reland "[LoongArch] Support -march=native and -mtune="

2023-07-25 Thread Weining Lu via cfe-commits
Author: Weining Lu Date: 2023-07-26T10:26:38+08:00 New Revision: c56514f21b2cf08eaa7ac3a57ba4ce403a9c8956 URL: https://github.com/llvm/llvm-project/commit/c56514f21b2cf08eaa7ac3a57ba4ce403a9c8956 DIFF: https://github.com/llvm/llvm-project/commit/c56514f21b2cf08eaa7ac3a57ba4ce403a9c8956.diff LO

[PATCH] D156223: [RISCV] Resolve a few bugs in RISCVVIntrinsicUtils.cpp

2023-07-25 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Does it possible to add a precommit test case to show that we accept unexpected combination of the type? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156223/new/ https://reviews.llvm.org/D156223 __

[PATCH] D142569: [OpenMP] Introduce kernel environment

2023-07-25 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 544183. tianshilei1992 added a comment. rebase and fix test issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142569/new/ https://reviews.llvm.org/D142569 Files: clang/lib/CodeGen/CGOpenMPRuntimeGP

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Note that this patch also supercedes: 1. https://reviews.llvm.org/D153616 2. https://reviews.llvm.org/D153653 3. https://reviews.llvm.org/D147591 since it handles those cases more generally. Comment at: clang/lib/AST/Interp/Context.cpp:131 if (T->i

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 544201. sandeepkosuri added a comment. Explicitly mentioned `-fopenmp-version=51` in LIT test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files: cla

[clang] 8cb6e47 - [clang][Interp] Handle PtrMemOps

2023-07-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-26T07:04:21+02:00 New Revision: 8cb6e476ccaa62b2621a5f68689a6070592f221d URL: https://github.com/llvm/llvm-project/commit/8cb6e476ccaa62b2621a5f68689a6070592f221d DIFF: https://github.com/llvm/llvm-project/commit/8cb6e476ccaa62b2621a5f68689a6070592f221d.diff LO

<    1   2   3   4   >