[PATCH] D158027: [clang][ExtractAPI] Visit method templates with better scheme

2023-08-18 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang 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/D158027/new/ https://reviews.llvm.org/D158027 ___ cfe

[PATCH] D158259: [clang][RISCV] Support operators for RVV sizeless vector types

2023-08-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:14906 +// specified +if (S.Context.areCompatibleRVVTypes(QualType(OriginalTarget, 0), +QualType(Source, 0)) || Why do we need this, but

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D153156#4598988 , @rZhBoYao wrote: > In D153156#4598915 , @steelannelida > wrote: > >> Unfortunately the option -Wno-reserved-user-defined-literal fails after this: >> >> #defi

[PATCH] D158242: [Clang][Attribute] Introduce linkage attribute to specify the exact LLVM linkage type for functions or variables

2023-08-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D158242#4598692 , @strimo378 wrote: >> I'm wary of exposing internal LLVM implementation details through a >> user-facing attribute like this. > > @aaron.ballman That means you would be more open to an attribute like >

[PATCH] D156711: [clang][ExprConstant] Fix assertion failure in constant expression folding

2023-08-18 Thread antoine moynault via Phabricator via cfe-commits
antmo updated this revision to Diff 551525. antmo added a comment. rebase & ping ; ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156711/new/ https://reviews.llvm.org/D156711 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/constexpr-

[PATCH] D158239: [clang][ExtractAPI] Add support for namespaces

2023-08-18 Thread Erick Velez via Phabricator via cfe-commits
evelez7 updated this revision to Diff 551526. evelez7 added a comment. Revert extraneous formatting in API.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158239/new/ https://reviews.llvm.org/D158239 Files: clang/include/clang/ExtractAPI/API.h

[PATCH] D156461: [clang][ASTImporter] Merge implicit ctors with definition

2023-08-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. After import we get a new AST that looks like this: |-CXXConstructorDecl 0x556e6a172d58 col:16 implicit used constexpr A 'void (A &&)' inline default trivial noexcept-unevaluated 0x556e6a172d58 | `-ParmVarDecl 0x556e6a172e78 col:16 'A &&' `-CXXConstructorDecl 0x

[PATCH] D158226: [CUDA/NVPTX] Improve handling of memcpy for -Os compilations.

2023-08-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh 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/D158226/new/ https://reviews.llvm.org/D158226 ___

[PATCH] D158289: [flang][driver] Partial revert of https://reviews.llvm.org/D157837

2023-08-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. awarzynski added reviewers: DavidSpickett, kiranchandramohan. Herald added a reviewer: sscalpone. Herald added a project: All. awarzynski requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. This is a pa

[PATCH] D158289: [flang][driver] Partial revert of https://reviews.llvm.org/D157837

2023-08-18 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan accepted this revision. kiranchandramohan added a comment. This revision is now accepted and ready to land. LG. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158289/new/ https://reviews.llvm.org/D158289 __

[PATCH] D158289: [flang][driver] Partial revert of https://reviews.llvm.org/D157837

2023-08-18 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett accepted this revision. DavidSpickett added a comment. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158289/new/ https://reviews.llvm.org/D158289 ___ cfe-commits mailing list cfe-comm

[clang] 89053e4 - [flang][driver] Partial revert of D157837

2023-08-18 Thread Andrzej Warzynski via cfe-commits
Author: Andrzej Warzynski Date: 2023-08-18T15:51:18Z New Revision: 89053e49590302c0a704d1af46ee263a5c882df6 URL: https://github.com/llvm/llvm-project/commit/89053e49590302c0a704d1af46ee263a5c882df6 DIFF: https://github.com/llvm/llvm-project/commit/89053e49590302c0a704d1af46ee263a5c882df6.diff

[PATCH] D158289: [flang][driver] Partial revert of https://reviews.llvm.org/D157837

2023-08-18 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 rG89053e495903: [flang][driver] Partial revert of D157837 (authored by awarzynski). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In D153156#4599106 , @aaron.ballman wrote: > In D153156#4598988 , @rZhBoYao > wrote: > >> In D153156#4598915 , >> @steelannelida wrote: >> >>

[PATCH] D158206: [Driver] Add PIE support on Solaris

2023-08-18 Thread Rainer Orth via Phabricator via cfe-commits
ro updated this revision to Diff 551539. ro marked 2 inline comments as done. ro edited the summary of this revision. ro added a comment. Herald added a subscriber: jrtc27. - Merged D158207 . - Incorporate review comments. Repository: rG LLVM Github Monorepo

[PATCH] D158137: Rename warn_drv_overriding_flag_option (-Woverriding-t-option) to warn_drv_overriding_flag_option (-Woverriding-option)

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 551542. MaskRay added a comment. add a release note about the renamed -W option Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158137/new/ https://reviews.llvm.org/D158137 Files: clang/docs/ReleaseNotes.rst

[PATCH] D158207: [Driver] Link with crtbeginS.o/crtendS.o on Solaris

2023-08-18 Thread Rainer Orth via Phabricator via cfe-commits
ro abandoned this revision. ro added a comment. Merged into D158206 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158207/new/ https://reviews.llvm.org/D158207 ___ cfe

[PATCH] D156571: [DebugInfo] Alternate MD5 fix, NFC

2023-08-18 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Thanks @DavidSpickett the patch is currently reverted. I have a revised patch coming soon and I will keep a close eye on the bots. I believe it's a string-lifetime issue and so whether it manifests is unpredictable, but we have enough different bots in the farm that it

[clang] 1c66d08 - Rename warn_drv_overriding_flag_option (-Woverriding-t-option) to warn_drv_overriding_flag_option (-Woverriding-option)

2023-08-18 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-08-18T09:15:37-07:00 New Revision: 1c66d08b0137cef7761b8220d3b7cb7833f57cdb URL: https://github.com/llvm/llvm-project/commit/1c66d08b0137cef7761b8220d3b7cb7833f57cdb DIFF: https://github.com/llvm/llvm-project/commit/1c66d08b0137cef7761b8220d3b7cb7833f57cdb.diff

[PATCH] D158137: Rename warn_drv_overriding_flag_option (-Woverriding-t-option) to warn_drv_overriding_flag_option (-Woverriding-option)

2023-08-18 Thread Fangrui Song 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 rG1c66d08b0137: Rename warn_drv_overriding_flag_option (-Woverriding-t-option) to… (authored by MaskRay). Changed prior to commit: https://reviews.l

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. > The diagnostic behavior is correct. MYTHING doesn't get expanded until phase > 4 (http://eel.is/c++draft/lex.phases#1.4), so this appears as "ONE"MYTHING as > a single preprocessor token: > https://eel.is/c++draft/lex.ext#nt:user-defined-string-literal and that token

[clang] 1fcc2bc - Reapply "[DebugInfo] Alternate (more efficient) MD5 fix"

2023-08-18 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2023-08-18T09:20:42-07:00 New Revision: 1fcc2bc31bb9352a13445ff4a5cccb0bebb8ea5b URL: https://github.com/llvm/llvm-project/commit/1fcc2bc31bb9352a13445ff4a5cccb0bebb8ea5b DIFF: https://github.com/llvm/llvm-project/commit/1fcc2bc31bb9352a13445ff4a5cccb0bebb8ea5b.diff

[PATCH] D158206: [Driver] Add PIE support on Solaris

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Solaris.cpp:136 +const char *crtbegin = nullptr; +if (Args.hasArg(options::OPT_shared) || IsPIE) + crtbegin = "crtb

[PATCH] D158293: [NFC][CLANG] Fix potential dereferencing of null return values

2023-08-18 Thread Soumi Manna via Phabricator via cfe-commits
Manna created this revision. Manna added reviewers: aaron.ballman, tahonermann. Herald added projects: All, clang, clang-format. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. Manna requested review of this revision. Repository: rG LLVM Github Monorepo https://revi

[PATCH] D157572: [clang] Add `[[clang::library_extension]]` attribute

2023-08-18 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. I think I like this attribute. However, I am concerned that this would make it seem more acceptable to add extensions to the library, when our policy has been that we don't (and for good reasons, we ran into big issues with e.g. `std::string_view` and we learned from t

[PATCH] D158137: Rename warn_drv_overriding_flag_option (-Woverriding-t-option) to warn_drv_overriding_flag_option (-Woverriding-option)

2023-08-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D158137#4597491 , @dexonsmith wrote: > In D158137#4597009 , @MaskRay wrote: > >> In D158137#4596948 , @dexonsmith >> wrote: >> >>> Can you e

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-18 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 551560. AntonRydahl added a comment. Rebased on upstream LLVM to check if flang CI is still affected by this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153924/new/ https://reviews.llvm.org/D1539

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Thurston Dang via Phabricator via cfe-commits
thurston added a comment. This patch might have broke the buildbots, starting with when it was first built in https://lab.llvm.org/buildbot/#/builders/85/builds/18390 /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include/c++/v1/stdlib.h:114:25: runtime error: negation of

[PATCH] D153152: Adds tweak to add declarations for pure virtuals

2023-08-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DeclarePureVirtuals.cpp:58 + + const llvm::ArrayRef Tokens = + TokBuf.expandedTokens(MethodDeclRange); robot wrote: > sammccall wrote: > > copying the tokens directly seem

[PATCH] D158137: Rename warn_drv_overriding_flag_option (-Woverriding-t-option) to warn_drv_overriding_flag_option (-Woverriding-option)

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D158137#4599461 , @dblaikie wrote: > In D158137#4597491 , @dexonsmith > wrote: > >> In D158137#4597009 , @MaskRay >> wrote: >> >>> In D158137

[PATCH] D153152: Adds tweak to add declarations for pure virtuals

2023-08-18 Thread Robert Schneider via Phabricator via cfe-commits
robot marked an inline comment as done. robot added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DeclarePureVirtuals.cpp:58 + + const llvm::ArrayRef Tokens = + TokBuf.expandedTokens(MethodDeclRange); sammccall wrote: > robot wrote:

[PATCH] D158267: [clang][CodeGen] Avoid emitting unnecessary memcpy of records without content

2023-08-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. This looks sort of similar to CodeGen::isEmptyRecord... but I guess it's not quite the same thing. (Even if a struct isn't "empty" in the ABI sense, there still might not be anything to copy.) Instead of looking for zero-length bitfields, you probably want to just che

[PATCH] D158295: [NFC][clang][analyzer] Avoid potential dereferencing of null pointer value

2023-08-18 Thread Soumi Manna via Phabricator via cfe-commits
Manna created this revision. Manna added reviewers: aaron.ballman, tahonermann, steakhal. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald added a project:

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/ExpandVAIntrinsics.cpp:38 + +#include + Don't need Comment at: llvm/lib/CodeGen/ExpandVAIntrinsics.cpp:44-47 +static cl::opt +ApplyToAllOverride(DEBUG_TYPE "-all", cl::init(false),

[PATCH] D158137: Rename warn_drv_overriding_flag_option (-Woverriding-t-option) to warn_drv_overriding_flag_option (-Woverriding-option)

2023-08-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D158137#4599481 , @MaskRay wrote: > In D158137#4599461 , @dblaikie > wrote: > >> In D158137#4597491 , @dexonsmith >> wrote: >> >>> In D15813

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-08-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Same reproducer but for CUDA: https://godbolt.org/z/WhjTMffnx Comment at: clang/include/clang/Sema/Sema.h:4753 + /// Otherwise, use \p D to determiine the host/device target. bool CheckCallingConvAttr(const ParsedAttr &attr, CallingConv &CC, +

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/test/CodeGen/Generic/expand-variadic-intrinsics.ll:76 +} + + arsenm wrote: > Needs some indirect variadic call tests Also some metadata and signext/zeroext preservation tests Repository: rG LLVM Github Monorepo

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/test/CodeGen/Generic/expand-variadic-intrinsics.ll:76 +} + + arsenm wrote: > arsenm wrote: > > Needs some indirect variadic call tests > Also some metadata and signext/zeroext preservation tests Also a case where the

[PATCH] D158296: [Clang] Add assertion to check the value of NumSubExprs/ResultIndex does not overflow

2023-08-18 Thread Yurong via Phabricator via cfe-commits
yronglin created this revision. Herald added a subscriber: arphaman. Herald added a project: All. yronglin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: yronglin Repository: rG LLVM Github Monorepo https://reviews.llv

[PATCH] D158137: Rename warn_drv_overriding_flag_option (-Woverriding-t-option) to warn_drv_overriding_flag_option (-Woverriding-option)

2023-08-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D158137#4599546 , @dblaikie wrote: > In D158137#4599481 , @MaskRay wrote: > >> In D158137#4599461 , @dblaikie >> wrote: >> >>> In D15813

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

2023-08-18 Thread Yurong via Phabricator via cfe-commits
yronglin marked 3 inline comments as done. yronglin 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 NumSubEx

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. In D153156#4599324 , @jyknight wrote: > If proper spec-conformance means we can no longer support the ability to > allow such out-of-spec pre-c++11 code to work anymore, that's probably > OK...but, in that case, we also need to

[PATCH] D158298: [OpenMP] Always pass the optimization level to the linker wrapper

2023-08-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, ye-luo. Herald added subscribers: kerbowa, guansong, tpr, yaxunl, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, sstef

[PATCH] D158295: [NFC][clang][analyzer] Avoid potential dereferencing of null pointer value

2023-08-18 Thread Balázs Benics via Phabricator via cfe-commits
steakhal requested changes to this revision. steakhal added a comment. This revision now requires changes to proceed. Thanks for the PR. I went over the code and concluded that it can never be null. However, the code could be improved, while making this explicit. Comment at: c

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:1410 + For Windows targets, ``[[no_unique_address]]`` is ignored, but there is a + similar attribute spelled ``[[msvc::no_unique_address]]``. }]; --

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 551576. akhuang added a comment. combine attributes into the same attribute and add accessors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157762/new/ https://reviews.llvm.org/D157762 Files: clang/include/c

[PATCH] D158021: [clang][modules] Mark builtin header 'inttypes.h' for modules

2023-08-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Running the tests locally fails with lib/clang/18/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found 21 | #include_next | ^~~~ Is it something wrong with my local configuration? Also want to study the previous discu

[PATCH] D156571: [DebugInfo] Alternate MD5 fix, NFC

2023-08-18 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:423 + if (!CSInfo) { +SmallString<64> Checksum; +std::optional CSKind = In the final commit, `Checksum` is outside the `if` so that its lifetime persists to the end of the fu

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-18 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 551583. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158231/new/ https://reviews.llvm.org/D158231 Files: clang/test/CodeGen/fsplit-machine-functions.c clang/test/Driver/fsplit-machine-functions-with-cuda-nv

[clang] 7275734 - [CUDA/NVPTX] Improve handling of memcpy for -Os compilations.

2023-08-18 Thread Artem Belevich via cfe-commits
Author: Artem Belevich Date: 2023-08-18T11:27:36-07:00 New Revision: 72757343fa866b7bfcbaa67edad895297c8cb2c5 URL: https://github.com/llvm/llvm-project/commit/72757343fa866b7bfcbaa67edad895297c8cb2c5 DIFF: https://github.com/llvm/llvm-project/commit/72757343fa866b7bfcbaa67edad895297c8cb2c5.diff

[PATCH] D158226: [CUDA/NVPTX] Improve handling of memcpy for -Os compilations.

2023-08-18 Thread Artem Belevich 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 rG72757343fa86: [CUDA/NVPTX] Improve handling of memcpy for -Os compilations. (authored by tra). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-18 Thread Han Shen via Phabricator via cfe-commits
shenhan marked an inline comment as done. shenhan added inline comments. Comment at: clang/test/CodeGen/fsplit-machine-functions.c:41 + +// RUN: %clang -c -target arm-unknown-linux-gnueabi -fsplit-machine-functions %s \ +// RUN: 2>&1 | FileCheck -check-prefix=MFS5 %s ---

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: clang, arphaman, aaron.ballman, andrew.w.kaylor, hans, skan, zahiraam, dexonsmith. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This restores t

[PATCH] D158302: [clang] Add simple utils to ensure static assert on bit count of DeclContext

2023-08-18 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a reviewer: aaron.ballman. danix800 added a project: clang. Herald added a subscriber: kristof.beyls. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. Manually counting bits for DeclConte

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/lib/AST/Decl.cpp:4523-4524 bool FieldDecl::isPotentiallyOverlapping() const { - return hasAttr() && getType()->getAsCXXRecordDecl(); + return (hasAttr() || + hasAttr()) && +

[clang] 8f8df78 - Added missing test constraints.

2023-08-18 Thread Artem Belevich via cfe-commits
Author: Artem Belevich Date: 2023-08-18T11:39:11-07:00 New Revision: 8f8df788aefaf9c947f0b8768ebca45176c7e9ee URL: https://github.com/llvm/llvm-project/commit/8f8df788aefaf9c947f0b8768ebca45176c7e9ee DIFF: https://github.com/llvm/llvm-project/commit/8f8df788aefaf9c947f0b8768ebca45176c7e9ee.diff

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D153156#4599595 , @rZhBoYao wrote: > What if a programmer is really trying to call operator""b here (albeit > ill-formed) Because that code is ill-formed, Clang diagnosed it with an error by default. Isn't that preferable t

[PATCH] D158252: Fix regression of D157680

2023-08-18 Thread Matt D. via Phabricator via cfe-commits
Matt added inline comments. Comment at: llvm/test/CodeGen/X86/x86-prefer-no-gather-no-scatter.ll:3 +; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2,+fast-gather %s -o - | FileCheck %s --check-prefixes=GATHER +; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2,+

[PATCH] D157076: [clang][ExtractAPI] Add support for C++ class templates and concepts

2023-08-18 Thread Erick Velez via Phabricator via cfe-commits
evelez7 updated this revision to Diff 551591. evelez7 added a comment. Fix formatting for introduced declarations in DeclarationFragments.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157076/new/ https://reviews.llvm.org/D157076 Files: clang/i

[PATCH] D158238: Implement __builtin_fmaximum/fminimum*

2023-08-18 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. Herald added a subscriber: bixia. Herald added a project: All. tra updated this revision to Diff 551336. tra added a comment. tra updated this revision to Diff 551338. tra published this revision for review. tra added a reviewer: fhahn. Herald added subscribers: cfe-commi

[PATCH] D158238: Implement __builtin_fmaximum/fminimum*

2023-08-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. @fhahn who else should take a look at the patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158238/new/ https://reviews.llvm.org/D158238 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D158206: [Driver] Add PIE support on Solaris

2023-08-18 Thread Rainer Orth via Phabricator via cfe-commits
ro marked an inline comment as done. ro added inline comments. Comment at: clang/lib/Driver/ToolChains/Solaris.cpp:136 +const char *crtbegin = nullptr; +if (Args.hasArg(options::OPT_shared) || IsPIE) + crtbegin = "crtbeginS.o"; MaskRay wrote: > Q: In

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-18 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam updated this revision to Diff 551597. saiislam marked 4 inline comments as done. saiislam added a comment. Changed ImplitArgs implementation using struct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139730/new/ https://reviews.llvm.org/D

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-18 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. In D139730#4597504 , @jhuber6 wrote: > Some nits. I'm assuming we're getting the code object in the backend now? > We'll need to make sure that `-Wl,--amdhsa-code-object-version` is passed to > the clang invocation inside of th

[PATCH] D156565: Diagnose use of VLAs in C++ by default

2023-08-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 551596. aaron.ballman added a comment. Enable the diagnostic by default in C++ language modes, and under -Wall in GNU++ language modes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156565/new/ https://reviews.llvm.org/D156565 Files: clang

[clang] 62945bb - [Driver] Add PIE support on Solaris

2023-08-18 Thread Rainer Orth via cfe-commits
Author: Rainer Orth Date: 2023-08-18T21:09:37+02:00 New Revision: 62945bb811169ffac7cf22c64b6dd3a3ad8d38f0 URL: https://github.com/llvm/llvm-project/commit/62945bb811169ffac7cf22c64b6dd3a3ad8d38f0 DIFF: https://github.com/llvm/llvm-project/commit/62945bb811169ffac7cf22c64b6dd3a3ad8d38f0.diff L

[PATCH] D158206: [Driver] Add PIE support on Solaris

2023-08-18 Thread Rainer Orth via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ro marked an inline comment as done. Closed by commit rG62945bb81116: [Driver] Add PIE support on Solaris (authored by ro). Changed prior to commit: https://reviews.

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

2023-08-18 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] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Brian Cain via Phabricator via cfe-commits
bcain added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to specify

[clang] 630ba7d - Removed whitespace that made "grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs" fail

2023-08-18 Thread via cfe-commits
Author: Anton Rydahl Date: 2023-08-18T12:12:36-07:00 New Revision: 630ba7d705fa1d55096dbbf88c6886d64033a780 URL: https://github.com/llvm/llvm-project/commit/630ba7d705fa1d55096dbbf88c6886d64033a780 DIFF: https://github.com/llvm/llvm-project/commit/630ba7d705fa1d55096dbbf88c6886d64033a780.diff

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-18 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 551600. AntonRydahl added a comment. CI tests failed on the built-bot, but that was not related to this patch. I patched the file that made the built-bot fail and rebased this differential after the patch. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D158296: [NFC][Clang] Add assertion to check the value of NumSubExprs/ResultIndex does not overflow

2023-08-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Hopefully my clarification on https://reviews.llvm.org/D154784#inline-1531176 makes it clear that assertions aren't necessarily the right tool here - as this path is reachable with actual code & I don't think we should allow that code to reach UB in the compiler in a n

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I just put up a patch for RISC-V failure related to this https://reviews.llvm.org/D158304 change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156821/new/ https://reviews.llvm.org/D156821 ___

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. I’ll see what I can do regarding reviving the string concat behavior. It feels like that a more refined treatment than before can be achieved. Maybe adds an imaginary preceding whitespace only when we can find a macro with the same name. Repository: rG LLVM Github M

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:1409 + + On Windows targets, ``[[no_unique_address]]`` is ignored; use + ``[[msvc::no_unique_address]]`` instead. On MSVC targets, `[[no_unique_address]]` is ignored - it's not ig

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to specif

[PATCH] D157331: [clang] Implement C23

2023-08-18 Thread Zijun Zhao via Phabricator via cfe-commits
ZijunZhao updated this revision to Diff 551607. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157331/new/ https://reviews.llvm.org/D157331 Files: clang/docs/ReleaseNotes.rst clang/lib/Headers/CMakeLists.txt clang/lib/Headers/stdckdint.h clan

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/AST/Decl.cpp:4523-4524 bool FieldDecl::isPotentiallyOverlapping() const { - return hasAttr() && getType()->getAsCXXRecordDecl(); + return (hasAttr() || + hasAttr()) && + getType()->getAsCXXRecordDecl(); ---

[PATCH] D157331: [clang] Implement C23

2023-08-18 Thread Zijun Zhao via Phabricator via cfe-commits
ZijunZhao added a comment. Reformat clang/lib/Lex/PPDirectives.cpp. I use git-clang-format due to previous pre-check failure but lots of modifications in clang/lib/Lex/ directory. Should I keep running git-clang-format if the pre-check fails again? Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Brian Cain via Phabricator via cfe-commits
bcain added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to specify

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/fsplit-machine-functions.c:1 +// REQUIRES: system-linux +// REQUIRES: x86-registered-target Any reason `system-linux` is needed? Comment at: clang/test/CodeGen/fsplit-machine-functio

[PATCH] D158307: [flang][driver] Disable Clang options in Flang

2023-08-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added a project: All. awarzynski requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Restore the desired setting that was reverted in https://reviews.llvm.o

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to specif

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 551616. JonChesterfield added a comment. - Rename ExpandVAIntrinsics to DesugarVariadics Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158246/new/ https://reviews.llvm.org/D158246 Files: clang/lib/Co

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: sbc100. MaskRay added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#c

[clang] fc06cce - Revert "Respect integer overflow handling in abs builtin"

2023-08-18 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2023-08-18T19:59:34Z New Revision: fc06cce30d2b7d49778b9a27420ca239e0c49856 URL: https://github.com/llvm/llvm-project/commit/fc06cce30d2b7d49778b9a27420ca239e0c49856 DIFF: https://github.com/llvm/llvm-project/commit/fc06cce30d2b7d49778b9a27420ca239e0c49856.diff LOG:

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:17057 + Constant *Offset, *OffsetOld; + Value *DP, *DP1; + Spell out to DispatchPtr? Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1206-1208 + getTargetCodeGenInfo()

[PATCH] D157157: [clang] Add clang support for Machine Function Splitting on AArch64

2023-08-18 Thread Mingming Liu via Phabricator via cfe-commits
mingmingl accepted this revision. mingmingl added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Driver/fsplit-machine-functions.c:4 // RUN: %clang -### -target x86_64 -fprofile-use=default.profdata -fsplit-machine-functions -fno-split-

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/test/CodeGenCUDA/amdgpu-code-object-version-linking.cu:40-43 +__device__ void bar(int *out) +{ + *out = __builtin_amdgcn_workgroup_size_x(); +} test all the builtins? Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D157157: [clang] Add clang support for Machine Function Splitting on AArch64

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5852 options::OPT_fno_split_machine_functions)) { -// This codegen pass is only available on x86-elf targets. -if (Triple.isX86() && Triple.isOSBinFormatELF())

[PATCH] D158309: [flang][driver] Mark -Wl as visible in Flang

2023-08-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. awarzynski added a reviewer: kiranchandramohan. Herald added a reviewer: sscalpone. Herald added projects: Flang, All. awarzynski requested review of this revision. Herald added subscribers: cfe-commits, jdoerfert. Herald added a project: clang. Repository: rG L

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: libc/config/gpu/entrypoints.txt:84-85 # stdio.h entrypoints +libc.src.stdio.snprintf +libc.src.stdio.vsnprintf libc.src.stdio.puts Split of the libc stuff into a separate patch, the lowering pass should

[PATCH] D158293: [NFC][CLANG] Fix potential dereferencing of null return values

2023-08-18 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2009-2010 (Line.MightBeFunctionDecl || Line.InPPDirective) && - Current.NestingLevel == 0 && + Current.NestingLevel == 0 && Current.Previous &&

[clang] 472a510 - Re-land "[-Wunsafe-buffer-usage][NFC] Slightly refactor and optimize the code"

2023-08-18 Thread via cfe-commits
Author: ziqingluo-90 Date: 2023-08-18T13:22:01-07:00 New Revision: 472a510bbc0325eb8e5920845e7c8d1a6a28a387 URL: https://github.com/llvm/llvm-project/commit/472a510bbc0325eb8e5920845e7c8d1a6a28a387 DIFF: https://github.com/llvm/llvm-project/commit/472a510bbc0325eb8e5920845e7c8d1a6a28a387.diff

[clang] 07181e2 - [clang-format][NFC] Simplify getFirstNonComment() in the annotator

2023-08-18 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-08-18T13:23:47-07:00 New Revision: 07181e289e3c6296ed5e982dca0764b91acbb8e6 URL: https://github.com/llvm/llvm-project/commit/07181e289e3c6296ed5e982dca0764b91acbb8e6 DIFF: https://github.com/llvm/llvm-project/commit/07181e289e3c6296ed5e982dca0764b91acbb8e6.diff LOG:

[PATCH] D158104: [clang-format][NFC] Simplify getFirstNonComment() in the annotator

2023-08-18 Thread Owen Pan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG07181e289e3c: [clang-format][NFC] Simplify getFirstNonComment() in the annotator (authored by owenpan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158104/

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:22 +// 5/ Delete the remaining parts of the original functions +// +//===--===// Can you expand on the ABI requirem

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield removed subscribers: kristof.beyls, wangpc, jdoerfert. JonChesterfield added inline comments. Comment at: llvm/lib/CodeGen/ExpandVAIntrinsics.cpp:215-217 +auto alloced = Builder.Insert( +new AllocaInst(VarargsTy, DL.getAllocaAddrSpace(), nullptr, +

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:208-209 + +StructType *VarargsTy = StructType::create( +Ctx, LocalVarTypes, (Twine(NF->getName()) + ".vararg").str()); + Should we go for a packed struct forced to align 4

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:297 +NF->copyAttributesFrom(&F); +NF->setComdat(F.getComdat()); +F.getParent()->getFunctionList().insert(F.getIterator(), NF); Test the comdat? Weird that copyAttributesFr

<    1   2   3   >