[PATCH] D156351: clang driver throws error for -mabi=elfv2 or elfv2

2023-07-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/ppc-abi.c:18 // RUN: -mabi=altivec | FileCheck -check-prefix=CHECK-ELFv2 %s +// RUN: %clang -target powerpc64le-unknown-unknown-gnu %s -### -o %t.o 2>&1 \ +// RUN: -mabi=elfv1 | FileCheck

[PATCH] D156438: [Docs] Fix code-blocks missing colon

2023-07-27 Thread Roger Ferrer Ibanez 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 rG31747668: [Docs] Fix code-blocks missing a colon and a newline (authored by rogfer01). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 3174766 - [Docs] Fix code-blocks missing a colon and a newline

2023-07-27 Thread Roger Ferrer Ibanez via cfe-commits
Author: Roger Ferrer Ibanez Date: 2023-07-28T05:36:49Z New Revision: 31747668325227013e4cdd2c7aa185110485 URL: https://github.com/llvm/llvm-project/commit/31747668325227013e4cdd2c7aa185110485 DIFF:

[PATCH] D156503: [clang][Interp] Don't assume throw stmts have a subexpr

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

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

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 545016. danix800 added a comment. Add missing field value setting (`FPOptionsOverride`). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156201/new/ https://reviews.llvm.org/D156201 Files:

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

2023-07-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta 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/D146368/new/ https://reviews.llvm.org/D146368

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

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7403 + UO->setOperatorLoc(ToOperatorLoc); + UO->setCanOverflow(E->canOverflow()); + danix800 wrote: > shafik wrote: > > I don't see the following values from the old code used: > >

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Thanks for the info @jcranmer-intel. I see that the current intepreter doesn't check this for `__builtin_fmin`(GCC does) either, but it does error out for e.g. `__builtin_nan("") + 1` (GCC doesn't). @aaron.ballman I'd like to handle that in a separate patch where I

[PATCH] D154764: [ASTImporter] Fields are imported first and reordered for correct layout.

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:8018 +int m() { + return &((A *)0)->f1 - &((A *)0)->f2; +} danix800 wrote: > shafik wrote: > > So is it the case that this caused `f2` to be imported

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

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7403 + UO->setOperatorLoc(ToOperatorLoc); + UO->setCanOverflow(E->canOverflow()); + shafik wrote: > I don't see the following values from the old code used: `E->getValueKind()`, >

[PATCH] D156482: [clang][CGExprConstant] handle FunctionToPointerDecay

2023-07-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Makes sense but I want @efriedma to look at as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156482/new/ https://reviews.llvm.org/D156482 ___ cfe-commits mailing list

[PATCH] D154764: [ASTImporter] Fields are imported first and reordered for correct layout.

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:8018 +int m() { + return &((A *)0)->f1 - &((A *)0)->f2; +} shafik wrote: > So is it the case that this caused `f2` to be imported first and then `f1`? >

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

2023-07-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7403 + UO->setOperatorLoc(ToOperatorLoc); + UO->setCanOverflow(E->canOverflow()); + I don't see the following values from the old code used: `E->getValueKind()`, `E->getObjectKind()` and

[PATCH] D156093: [ASTImporter] Re-odering by lexical order for all imported decls within record

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. After thought a little bit more I'm doubting whether this lexical ordering is of any practical usage or any meanfullness at all, especially when imported into existing (non-empty) context, reordering by `From` context can not be correct after merging occured. I need

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-27 Thread Wang Pengcheng via Phabricator via cfe-commits
wangpc updated this revision to Diff 545006. wangpc added a comment. - Rebase. - Unsupport clang-18. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112921/new/ https://reviews.llvm.org/D112921 Files:

[libunwind] 3da76c2 - [libunwind] Fix build with -Wunused-function

2023-07-27 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2023-07-27T20:22:16-07:00 New Revision: 3da76c2116179fdb3fff8feb4551209e4218746e URL: https://github.com/llvm/llvm-project/commit/3da76c2116179fdb3fff8feb4551209e4218746e DIFF: https://github.com/llvm/llvm-project/commit/3da76c2116179fdb3fff8feb4551209e4218746e.diff

[PATCH] D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases

2023-07-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 544999. shafik added a comment. rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155387/new/ https://reviews.llvm.org/D155387 Files: clang/include/clang/Sema/Lookup.h clang/lib/Sema/SemaOverload.cpp clang/lib/Sema/SemaTemplate.cpp

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-07-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156363#4539877 , @dblaikie wrote: > FWIW this sounds good to me (though given how wide the patch is, might be > worth waiting a few days to a week in case anyone else has thoughts). > > I only looked at a sample of the test

[PATCH] D156093: [ASTImporter] Re-odering by lexical order for all imported decls within record

2023-07-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:1950 +ToD && ToDC == ToD->getLexicalDeclContext() && +ToDC->containsDecl(ToD)) { + ToDC->removeDecl(ToD); If `ToDC` does not contain the decl is that a problem, what

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

2023-07-27 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > We should reach out to some GCC folks to see if this is an oversight in their > documentation or not. I've sent a mail: https://gcc.gnu.org/pipermail/gcc/2023-July/242159.html Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D150403: [clang-format] Adjust braced list detection (try 2)

2023-07-27 Thread Galen Elias via Phabricator via cfe-commits
galenelias added a comment. In D150403#4539874 , @owenpan wrote: > This seems to cause a regression. See > https://github.com/llvm/llvm-project/issues/64134. @galenelias any idea? I will take a look. The logic I added is trying to distinguish `{ } {`

[PATCH] D155661: [clang][ASTImporter] Fix friend class template import within dependent context

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 544993. danix800 retitled this revision from "[ASTImporter] Fix friend class template import within dependent context" to "[clang][ASTImporter] Fix friend class template import within dependent context". danix800 added a comment. Update ReleaseNotes

[clang] 7f25a88 - [analyzer] Remove rdar links from static analyzer and libAnalysis sources. NFC.

2023-07-27 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2023-07-27T17:51:49-07:00 New Revision: 7f25a882616263108d99f7696407b725351324de URL: https://github.com/llvm/llvm-project/commit/7f25a882616263108d99f7696407b725351324de DIFF:

[clang] 38b648b - [clang][Analysis][NFC] Remove indented empty lines (fix format checking)

2023-07-27 Thread via cfe-commits
Author: dingfei Date: 2023-07-28T08:36:51+08:00 New Revision: 38b648b4a1ab9f3eef3d44a286034df34b4d0ecb URL: https://github.com/llvm/llvm-project/commit/38b648b4a1ab9f3eef3d44a286034df34b4d0ecb DIFF: https://github.com/llvm/llvm-project/commit/38b648b4a1ab9f3eef3d44a286034df34b4d0ecb.diff LOG:

[PATCH] D154764: [ASTImporter] Fields are imported first and reordered for correct layout.

2023-07-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:8018 +int m() { + return &((A *)0)->f1 - &((A *)0)->f2; +} So is it the case that this caused `f2` to be imported first and then `f1`? Which is the

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. LGTM, though please wait a day or two for any more comments from @gribozavr2 since he's looked at this more closely than I have. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155895/new/ https://reviews.llvm.org/D155895

[PATCH] D156466: [clang][CGExprConstant] handle implicit widening/narrowing Int-to-Int casts

2023-07-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156466/new/ https://reviews.llvm.org/D156466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D155775: [Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-07-27 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 544974. AlexVlx added a comment. Exploit the fact that ROCm/AMDGPU does LTCG at the moment and for the foreseeable future by moving the accelerator code selection pass to later. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/

[PATCH] D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases

2023-07-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik marked 4 inline comments as done. shafik added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:15191 OverloadCandidateSet::iterator Best; switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { case OR_Success: rsmith wrote: >

[PATCH] D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases

2023-07-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 544960. shafik marked an inline comment as done. shafik added a comment. - Updated so that we ignore ambiguous overload candidate if the name lookup was also ambiguous. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155387/new/

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-07-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. > I hope this patch may allow to gather some data on that. @cor3ntin, I have reports that applications having encoding prefixes in `static_assert` are failing to build. The committee did not adopt the subject paper as a "DR resolution". Is it possible to

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-27 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 544954. AlexVlx removed a reviewer: eli.friedman. AlexVlx added a comment. This adds more ecumenical handling of unsupported builtins, as per the review discussion (a suffixed equivalent stub is emitted instead); it's paired with an associated change in

[PATCH] D156492: [clang][deps] Make the C++ API more type-safe

2023-07-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: artemcm. 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. Scanner's C++ API accepts a set of

[clang] 6a8b66e - Fix test hip-options.hip

2023-07-27 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-07-27T17:36:38-04:00 New Revision: 6a8b66ec19675ff69a222181e77015a4b44b3dac URL: https://github.com/llvm/llvm-project/commit/6a8b66ec19675ff69a222181e77015a4b44b3dac DIFF:

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

2023-07-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D76096#4537078 , @efriedma wrote: > The idea is to maintain the parallel infrastructure for structs and arrays, > but not for other things. Are you referring specifically to InitListExprs on VarDecls of records

[PATCH] D155213: [Driver] Add `-f[no-]offload-uniform-block`

2023-07-27 Thread Yaxun Liu 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 rGac725310433a: [Driver] Add `-f[no-]offload-uniform-block` (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github

[clang] ac72531 - [Driver] Add `-f[no-]offload-uniform-block`

2023-07-27 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-07-27T16:36:02-04:00 New Revision: ac725310433aea6a7c808b11dab6f1a7d4ecf78e URL: https://github.com/llvm/llvm-project/commit/ac725310433aea6a7c808b11dab6f1a7d4ecf78e DIFF:

[PATCH] D156482: [clang][CGExprConstant] handle FunctionToPointerDecay

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

[PATCH] D156482: [clang][CGExprConstant] handle FunctionToPointerDecay

2023-07-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider the following code: void foo (void) {} void (*bar)(void) = foo; And the corresponding AST:

[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-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:664-666 +if ((Style.Language == FormatStyle::LK_Cpp || + Style.Language == FormatStyle::LK_ObjC) && +!Current.is(tok::comment) && PrevNonComment &&

[PATCH] D156330: [hexagon] restore library path arguments

2023-07-27 Thread Brian Cain 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 rG96832a6bf7e0: [hexagon] restore library path arguments (authored by androm3da). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 96832a6 - [hexagon] restore library path arguments

2023-07-27 Thread Brian Cain via cfe-commits
Author: Brian Cain Date: 2023-07-27T13:26:28-07:00 New Revision: 96832a6bf7e0e7f1e8d634d38c44a1b32d512923 URL: https://github.com/llvm/llvm-project/commit/96832a6bf7e0e7f1e8d634d38c44a1b32d512923 DIFF: https://github.com/llvm/llvm-project/commit/96832a6bf7e0e7f1e8d634d38c44a1b32d512923.diff

[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.

2023-07-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D156370#4537033 , @gedare wrote: > In D156370#4536793 , > @HazardyKnusperkeks wrote: > >> Does this result in a different annotation? Could you add a test for that? > > If

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I see one libc++ failure, I have not looked into the other failures. Comment at: libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp:29 +// TODO(mordante) fix this test after updating clang in Docker +// UNSUPPORTED: clang-17

[PATCH] D156360: [clang-format] Support function and overloaded operator SpacesInParensOption

2023-07-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:16786 verifyFormat("SomeType *__attribute__( ( attr ) ) *a = NULL;", Spaces); - verifyFormat("void __attribute__( ( naked ) ) foo( int bar )", Spaces); + verifyFormat("void

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

2023-07-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D156247#4538626 , @aaron.ballman wrote: > I would like explicit buy-in from the libc++ folks on the idea of adding > `-fno-coroutines` as they're going to be impacted by Clang supporting such an > option (and they may have

[PATCH] D156452: [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3d9a64f7d4d6: [clang-tidy] Sort options in --dump-config (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D156452?vs=544857=544903#toc Repository: rG LLVM Github Monorepo

[clang-tools-extra] 3d9a64f - [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-27T20:07:52Z New Revision: 3d9a64f7d4d6995dab8abb8910fe82e0047f6277 URL: https://github.com/llvm/llvm-project/commit/3d9a64f7d4d6995dab8abb8910fe82e0047f6277 DIFF: https://github.com/llvm/llvm-project/commit/3d9a64f7d4d6995dab8abb8910fe82e0047f6277.diff LOG:

[PATCH] D156452: [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks for the quick revert! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156452/new/ https://reviews.llvm.org/D156452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan accepted this revision. scchan added a comment. LGTM thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156426/new/ https://reviews.llvm.org/D156426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] 50eff37 - [clang-tidy][NFC] Fix issue in test related to non exist folder

2023-07-27 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-27T19:47:05Z New Revision: 50eff374855a68cd7ccf3c62945afc1575516d88 URL: https://github.com/llvm/llvm-project/commit/50eff374855a68cd7ccf3c62945afc1575516d88 DIFF: https://github.com/llvm/llvm-project/commit/50eff374855a68cd7ccf3c62945afc1575516d88.diff LOG:

[PATCH] D155661: [ASTImporter] Fix friend class template import within dependent context

2023-07-27 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. @balazske Could you please have a look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155661/new/ https://reviews.llvm.org/D155661 ___ cfe-commits mailing list

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

2023-07-27 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 544893. 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

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-27 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 544892. koops added a comment. 1. Converting prevMapped to PrevMappedDirective 2. Reducing the CHECK patterns in loop_bind_enclosed.cpp to the most essential ones to succeed matching for the IR generation on windows. CHANGES SINCE LAST ACTION

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-27 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:65-73 + constexpr float f1 = __builtin_fmin(1.0, 2.0f); + static_assert(f1 == 1.0f, ""); + + constexpr float min = __builtin_fmin(__builtin_nan(""), 1); + static_assert(min == 1,

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-27 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:65-73 + constexpr float f1 = __builtin_fmin(1.0, 2.0f); + static_assert(f1 == 1.0f, ""); + + constexpr float min = __builtin_fmin(__builtin_nan(""), 1); + static_assert(min == 1,

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 544890. cor3ntin edited the summary of this revision. cor3ntin added a comment. Fix typo, remove dead code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156237/new/ https://reviews.llvm.org/D156237 Files:

[PATCH] D155213: [Driver] Add `-f[no-]offload-uniform-block`

2023-07-27 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan accepted this revision. scchan added a comment. This revision is now accepted and ready to land. LGTM thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155213/new/ https://reviews.llvm.org/D155213 ___ cfe-commits mailing list

[PATCH] D153059: [-Wunsafe-buffer-usage] Group parameter fix-its

2023-07-27 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added a comment. Thanks for the suggestion of splitting this patch to smaller ones. I have one such smaller patch ready here: https://reviews.llvm.org/D156474. It does make it easier in describing and discussing about the changes. Comment at:

[PATCH] D156452: [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. @thakis actually this test was already broken, simply folder '2' does not exist.. Let me fix that. Thank you for information. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156452/new/ https://reviews.llvm.org/D156452

[clang-tools-extra] a8eb741 - Revert "[clang-tidy] Sort options in --dump-config"

2023-07-27 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-27T19:27:25Z New Revision: a8eb7415a418d878be8a7d6e48f8dff0c401dfc6 URL: https://github.com/llvm/llvm-project/commit/a8eb7415a418d878be8a7d6e48f8dff0c401dfc6 DIFF: https://github.com/llvm/llvm-project/commit/a8eb7415a418d878be8a7d6e48f8dff0c401dfc6.diff LOG:

[PATCH] D156474: [-Wunsafe-buffer-usage][NFC] Slightly refactor and optimize the code

2023-07-27 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h:25 + +class VariableGroupsManager { +public: Use the `VariableGroupsManager` class as an interface to clients. It hides the details about how groups are

[PATCH] D155661: [ASTImporter] Fix friend class template import within dependent context

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: martong. aaron.ballman added a comment. The changes seem correct to me, but it'd be great if one of the more regular AST importer maintainers could verify just in case I missed something. This should probably have a release note, though. Repository: rG LLVM

[PATCH] D155661: [ASTImporter] Fix friend class template import within dependent context

2023-07-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. This mostly makes sense to me, but I want another review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155661/new/ https://reviews.llvm.org/D155661 ___ cfe-commits mailing list

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:65-73 + constexpr float f1 = __builtin_fmin(1.0, 2.0f); + static_assert(f1 == 1.0f, ""); + + constexpr float min = __builtin_fmin(__builtin_nan(""), 1); + static_assert(min == 1,

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

2023-07-27 Thread Brendan Dahl via Phabricator via cfe-commits
brendandahl added a comment. I looked into the above issue with mixing declarations and definitions and I think I can fix that by leaving the AddGlobalAnnotations call in EmitGlobalFunctionDefinition and only calling AddGlobalAnnotations from GetOrCreateLLVMFunction when it's for a definition.

[PATCH] D156452: [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This might have broken tests: http://45.33.8.238/linux/113736/step_8.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156452/new/

[PATCH] D156474: [-Wunsafe-buffer-usage][NFC] Slightly refactor and optimize the code

2023-07-27 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 created this revision. Herald added a reviewer: NoQ. Herald added a project: All. ziqingluo-90 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Slightly refactor and optimize the code in preparation for implementing grouping

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rG26db5e651bb6: [clang][CFG] Support construction of a weak topological ordering of the CFG. (authored by

[clang] 26db5e6 - [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-27 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-07-27T18:40:59Z New Revision: 26db5e651bb65287b57a9ca84388d61d8b3305c9 URL: https://github.com/llvm/llvm-project/commit/26db5e651bb65287b57a9ca84388d61d8b3305c9 DIFF: https://github.com/llvm/llvm-project/commit/26db5e651bb65287b57a9ca84388d61d8b3305c9.diff

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. It is good to be consistent with GCC. Most amdgpu and HIP tests fail due to missing -nogpuinc or -nogpulib. I can help update them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D129706: [clang-tidy] Reimplement GlobList without relying on Regex.

2023-07-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. A litte overkill, there is llvm/include/llvm/Support/GlobPattern.h that could be used to simplify this code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129706/new/ https://reviews.llvm.org/D129706

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-07-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. I'd wager a lot of the tests that return non-zero aren't even intentional, so it's probably good to enforce this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156363/new/

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-07-27 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. FWIW this sounds good to me (though given how wide the patch is, might be worth waiting a few days to a week in case anyone else has thoughts). I only looked at a sample of the test

[PATCH] D150403: [clang-format] Adjust braced list detection (try 2)

2023-07-27 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Herald added a subscriber: wangpc. This seems to cause a regression. See https://github.com/llvm/llvm-project/issues/64134. @galenelias any idea? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150403/new/

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-27 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. Ping @rjmccall or @efriedma for a non AMD perspective, if possible. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155870/new/ https://reviews.llvm.org/D155870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D156351: clang driver throws error for -mabi=elfv2 or elfv2

2023-07-27 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. Ah, ok. This makes sense. When we don't know anything about the ABI, it makes sense to rely on `-mabi`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-07-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:749 + if (!Tok.is(tok::eof)) +ConsumeToken(); break; danix800 wrote: > rjmccall wrote: > > aaron.ballman wrote: > > > rjmccall wrote: > > > > aaron.ballman wrote: > > >

[PATCH] D156466: [clang][CGExprConstant] handle implicit widening/narrowing Int-to-Int casts

2023-07-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider the following statements: long x = 1; short y = 1; With the following AST: |-VarDecl

[PATCH] D156452: [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Piotr Zegar 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 rG2cdb84376752: [clang-tidy] Sort options in --dump-config (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] 2cdb843 - [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-27T17:50:59Z New Revision: 2cdb843767529b2be641b93e43d70837900345c1 URL: https://github.com/llvm/llvm-project/commit/2cdb843767529b2be641b93e43d70837900345c1 DIFF: https://github.com/llvm/llvm-project/commit/2cdb843767529b2be641b93e43d70837900345c1.diff LOG:

[PATCH] D155955: [Clang] Improve the handling of large arrays evaluation.

2023-07-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D155955#4539698 , @efriedma wrote: > That's scary: it means we can silently behave differently from other > compilers in a way that's hard to understand. Is there some way we can > provide a diagnostic? > > That said, it

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

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 544854. danix800 edited the summary of this revision. Herald added a subscriber: pengfei. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156461/new/ https://reviews.llvm.org/D156461 Files:

[PATCH] D156452: [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp accepted this revision. carlosgalvezp added a comment. This revision is now accepted and ready to land. LGTM, thanks for fixing! Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:90 +std::vector> SortedOptions; +

[PATCH] D155955: [Clang] Improve the handling of large arrays evaluation.

2023-07-27 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. That's scary: it means we can silently behave differently from other compilers in a way that's hard to understand. Is there some way we can provide a diagnostic? That said, it looks

[PATCH] D156452: [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 544852. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156452/new/ https://reviews.llvm.org/D156452 Files:

[PATCH] D156452: [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 3 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:90 +std::vector> SortedOptions; +SortedOptions.reserve(Options.size()); +for (auto : Options) { carlosgalvezp

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

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. Implicit ctors

[PATCH] D156452: [clang-tidy] Sort options in --dump-config

2023-07-27 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Looks great, small comments! Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:89 if (IO.outputting()) { +std::vector> SortedOptions; +SortedOptions.reserve(Options.size()); Maybe add a one-line comment

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

2023-07-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:749 + if (!Tok.is(tok::eof)) +ConsumeToken(); break; rjmccall wrote: > aaron.ballman wrote: > > rjmccall wrote: > > > aaron.ballman wrote: > > > > aaron.ballman wrote:

[PATCH] D155878: [clangd] Loose include-cleaner matching for verbatim headers

2023-07-27 Thread Sam McCall via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. sammccall marked 2 inline comments as done. Closed by commit rGd97a3419c0a3: [clangd] Loose include-cleaner matching for verbatim headers (authored by sammccall).

[clang-tools-extra] d97a341 - [clangd] Loose include-cleaner matching for verbatim headers

2023-07-27 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-27T19:20:53+02:00 New Revision: d97a3419c0a35cfa07cb67459846d76ea80c058c URL: https://github.com/llvm/llvm-project/commit/d97a3419c0a35cfa07cb67459846d76ea80c058c DIFF: https://github.com/llvm/llvm-project/commit/d97a3419c0a35cfa07cb67459846d76ea80c058c.diff

[PATCH] D155878: [clangd] Loose include-cleaner matching for verbatim headers

2023-07-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 4 inline comments as done. sammccall added inline comments. Comment at: clang-tools-extra/clangd/Headers.h:179 + // All paths are canonical (FileManager::getCanonicalPath()). + std::vector SearchPathCanonical; + kadircet wrote: >

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

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156274#4539522 , @schittir wrote: > Thank you for the review, @aaron.ballman and @efriedma > Do you recommend any changes here? The changes to SemaCodeComplete.cpp and ItaniumMangle.cpp are good, the changes in

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

2023-07-27 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir added a comment. Thank you for the review, @aaron.ballman and @efriedma Do you recommend any changes here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156274/new/ https://reviews.llvm.org/D156274

[PATCH] D156357: clang: Add elementwise bitreverse builtin

2023-07-27 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 544830. bob80905 added a comment. - apply clang-format on CGBuiltin.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156357/new/ https://reviews.llvm.org/D156357 Files: clang/docs/LanguageExtensions.rst

[PATCH] D150946: [clang][Interp] PointerToIntegral casts

2023-07-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D150946#4538469 , @aaron.ballman wrote: > In D150946#4536971 , @phosek wrote: > >> This test is failing on our Windows builders with the following error: >> >> Script: >> -- >> :

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/docs/HIPSupport.rst:71 +In the above command, the ``--hip-link`` flag instructs Clang to link the HIP runtime library. However, +the use of this flag is unnecessary if a HIP input file is

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Is this intended to not handle all the binary operators in this patch? And also, is this intended to only impact initializers? Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:587-588 + const Expr *RHS = E->getRHS(); + PrimType LHSElemT =

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:65-73 + constexpr float f1 = __builtin_fmin(1.0, 2.0f); + static_assert(f1 == 1.0f, ""); + + constexpr float min = __builtin_fmin(__builtin_nan(""), 1); + static_assert(min == 1, ""); +

  1   2   3   >