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

2023-07-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 2 inline comments as done. cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:60 + "'external_source_symbol' attribute|" + "as argument of '%1' attribute}0">; + aaron.ballman wrote: > T

[PATCH] D153769: [clangd] Implement the 'Organize Imports' source action. Fix include-cleaner findings in batch.

2023-07-27 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo added a comment. Thanks for the comments! Comment at: clang-tools-extra/clangd/refactor/tweaks/OrganizeImports.cpp:62 + const auto &SM = Inputs.AST->getSourceManager(); + std::set Spellings; + for (const auto &Missing : Findings.MissingIncludes) kadi

[PATCH] D152495: [Clang][SemaCXX] Add unused warning for variables declared in condition expressions

2023-07-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. LGTM, thanks. Make sure you rebase the changes to the release notes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152495/new/ https://reviews.llvm.org/D152495 ___

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

2023-07-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a subscriber: ldionne. ilya-biryukov added a comment. In D156247#4538647 , @cor3ntin wrote: > Given that adoption by Apple Clang is one of the motivation to make this > change upstream, do we have a reasonable expectation they would p

[PATCH] D149084: [clang-tidy] Added bugprone-multi-level-implicit-pointer-conversion 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, Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149084/new/ https://reviews.llvm.org/D149084 __

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

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:60 + "'external_source_symbol' attribute|" + "as argument of '%1' attribute}0">; + cor3ntin wrote: > aaron.ballman wrote: > > This duplicates par

[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 544759. cor3ntin added a comment. Update commit message and remove spurious changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156237/new/ https://reviews.llvm.org/D156237 Files: clang/docs/ReleaseNotes.

[PATCH] D156312: [analyzer] Upstream BitwiseShiftChecker

2023-07-27 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. In D156312#4537200 , @NoQ wrote: >> (4) UBOR exhibits buggy behavior in code that involves cast expressions > > Hmm, what makes your check more resilient to our overall type-incorrectness? The code of UBOR (UndefResultChecker.

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

2023-07-27 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:422 + // There's nothing to suggest in here as we parsed a full expression. + // Instead fail and propogate the error since caller might have something + // the suggest, e.g. signature help

[clang] ac6e9e6 - [clang-repl] Remove redundant tests

2023-07-27 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-07-27T16:22:56+02:00 New Revision: ac6e9e69bac76be2f05a20cea6ea8d69a0b43d1b URL: https://github.com/llvm/llvm-project/commit/ac6e9e69bac76be2f05a20cea6ea8d69a0b43d1b DIFF: https://github.com/llvm/llvm-project/commit/ac6e9e69bac76be2f05a20cea6ea8d69a0b43d1b.diff

[PATCH] D156425: [clang-repl] Remove redundant tests

2023-07-27 Thread Jonas Hahnfeld 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 rGac6e9e69bac7: [clang-repl] Remove redundant tests (authored by Hahnfeld). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

2023-07-27 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin marked 2 inline comments as done. DiggerLin added a comment. > As an alternative (but I think adds unnecessary complexity, due to needing an > extra variable), you could have both tools read the environment variable into > a string variable, then, if the -X option is present, overwrite

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

2023-07-27 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik 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 a

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

2023-07-27 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 created this revision. Herald added a reviewer: aaron.ballman. Herald added subscribers: PiotrZSL, carlosgalvezp. Herald added a reviewer: njames93. Herald added a project: All. rogfer01 requested review of this revision. Herald added projects: clang, LLVM, clang-tools-extra. Herald added

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

2023-07-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. Thank you. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156438/new/ https://reviews.llvm.org/D156438

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

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, good catch! It'd be nice if we could somehow configure Sphinx to complain about this issue so we'd catch it proactively with the sphinx build bots. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-27 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2391 if (TargetDecl->hasAttr()) { if (getLangOpts().OpenCLVersion <= 120) { The block here needs to be aware of this new flag. CHANGES SINCE LAST ACTION https://reviews.llvm.

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

2023-07-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 544783. ilya-biryukov added a comment. Herald added a project: clang-format. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. - Expose -fno-coroutine and add tests Current implementation exposes: - `-fno-coroutines` to disab

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

2023-07-27 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan 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 already present in your program. + ---

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

2023-07-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D156247#4538962 , @philnik wrote: > I don't think we want to support having another flag for a dialect, since > that will result in more problems down the road. We already have a problem > with the number of configurati

[PATCH] D156441: [clangd]Fix addUsing tweak doesn't traverse same-level anon namespaces

2023-07-27 Thread zhou via Phabricator via cfe-commits
chouzz created this revision. chouzz added reviewers: kadircet, sammccall. Herald added a subscriber: arphaman. Herald added a project: All. chouzz requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This patc

[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

2023-07-27 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin added a comment. > I do see the appeal of a single enum parameter in the meantime. I would > suggest it should be called SymtabWritingMode and have values NoSymtab, > NormalSymtab, BigArchive64Bit, BigArchive32Bit, and BigArchiveBoth. You could > optionally drop one of the BigArchive*

[PATCH] D102633: [clang-scan-deps] Improvements to thread usage

2023-07-27 Thread Sylvain Audi via Phabricator via cfe-commits
saudi abandoned this revision. saudi added a comment. Herald added a project: All. In D102633#2786288 , @aganea wrote: > @dexonsmith Yes, using the Clang Tooling C++ API seems like a good option, > however some logic could/would be needed from > `clang/

[clang] 0e4c5cc - [clang][DeclPrinter] Fix AST print of curly constructor initializers

2023-07-27 Thread Timo Stripf via cfe-commits
Author: Timo Stripf Date: 2023-07-27T15:43:39Z New Revision: 0e4c5cc56c1407c9b82311f38b21bca9d64f818a URL: https://github.com/llvm/llvm-project/commit/0e4c5cc56c1407c9b82311f38b21bca9d64f818a DIFF: https://github.com/llvm/llvm-project/commit/0e4c5cc56c1407c9b82311f38b21bca9d64f818a.diff LOG: [

[PATCH] D156307: [clang][DeclPrinter] Fix AST print of curly constructor initializers

2023-07-27 Thread Timo Stripf 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 rG0e4c5cc56c14: [clang][DeclPrinter] Fix AST print of curly constructor initializers (authored by strimo378). Repository: rG LLVM Github Monorepo C

[clang-tools-extra] 315946c - [clang-tidy] Added bugprone-multi-level-implicit-pointer-conversion check

2023-07-27 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-27T15:49:43Z New Revision: 315946c57da2bfff0c26e4fec42e21dac7bfbddc URL: https://github.com/llvm/llvm-project/commit/315946c57da2bfff0c26e4fec42e21dac7bfbddc DIFF: https://github.com/llvm/llvm-project/commit/315946c57da2bfff0c26e4fec42e21dac7bfbddc.diff LOG: [

[PATCH] D149084: [clang-tidy] Added bugprone-multi-level-implicit-pointer-conversion check

2023-07-27 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG315946c57da2: [clang-tidy] Added bugprone-multi-level-implicit-pointer-conversion check (authored by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D149084?vs=516480&id=544795#toc Reposit

[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

2023-07-27 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin updated this revision to Diff 544804. DiggerLin added a comment. addressed comment and let llvm-ranlib supports -Xany option Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142660/new/ https://reviews.llvm.org/D142660 Files: clang/test/

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

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/lib/CodeGen/CGCall.cpp:2391 if (TargetDecl->hasAttr()) { if (getLangOpts().OpenCLVersion <= 120) { scchan wrote: > The block here needs to be aware of this new

[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 Jon Phillips via Phabricator via cfe-commits
jp4a50 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 && HazardyKnus

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 544812. yaxunl marked an inline comment as done. yaxunl added a reviewer: Anastasia. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155213/new/ https://reviews.llvm.org/D155213 Files: clang/include/clang/

[PATCH] D156322: Outputs parameter comments using clang-doc and markdown generator

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I'm not a typical reviewer for clang-doc, so take this with a grain of salt, but LGTM! Do you need someone to land the changes on your behalf? If so, what name and email address

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

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2321-2328 + if ((FD->hasAttr() && !ErrnoOverriden && !OptNone) || ((ConstWithoutErrnoAndExceptions || ConstWithoutExceptions) && - (!ConstWithoutErrnoAndExceptions || (!getLangOpts().Ma

[clang-tools-extra] 16b5e18 - [include-cleaner] Loose matching for verbatim headers

2023-07-27 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-27T18:19:24+02:00 New Revision: 16b5e1897b7efaa4250b04dface0c807a02ae31a URL: https://github.com/llvm/llvm-project/commit/16b5e1897b7efaa4250b04dface0c807a02ae31a DIFF: https://github.com/llvm/llvm-project/commit/16b5e1897b7efaa4250b04dface0c807a02ae31a.diff LO

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

2023-07-27 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG16b5e1897b7e: [include-cleaner] Loose matching for verbatim headers (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155819/new/ https

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

2023-07-27 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir added a comment. In D156261#4535220 , @aaron.ballman wrote: > I think the cast to void is unneeded in these cases. We typically add a cast > to void when the function exists to compute a result but also has side > effects. e.g., you typically

[PATCH] D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations

2023-07-27 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Basic/FileManager.cpp:663 +} else { + llvm::sys::path::remove_dots(AbsPathBuf, /*remove_dot_dot=*/true); + CanonicalName = AbsPathBuf.str().copy(CanonicalNameStorage); MrTrillian wrote: > benl

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

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156247#4538664 , @ilya-biryukov wrote: > Thanks, disabling the language feature definitely makes more sense. > `-fno-coroutines` is trickier to implement, but this cannot be too hard. > > While we are waiting for libc++

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

2023-07-27 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added subscribers: mgrang, xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Sort printed o

[PATCH] D156453: [clang][Interp] Create only globals when initializing a global variable

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. For this code: struct O { int &&j; }; O

[PATCH] D156322: Outputs parameter comments using clang-doc and markdown generator

2023-07-27 Thread Arnaud Botella via Phabricator via cfe-commits
BotellaA added a comment. Thanks. You can use this name Arnaud Botella with this email arnaud.bote...@geode-solutions.com. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156322/new/ https://reviews.llvm.org/D156322 ___ cfe-commits mailing li

[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 544823. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156400/new/ https://reviews.llvm.org/D156400 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Inter

[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, ""); + co

[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] 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 al

[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] 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] 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] 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 CGObjCM

[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: > s/SearchPathCa

[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 LO

[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). Chan

[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] 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 like

[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 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 &Key : Options) { carlosgalvezp

[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: clang-tools-ext

[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 like

[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; +SortedOptions.reserve(Options.si

[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: clang/lib/AST/ASTImp

[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 lo

[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] 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

[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 0x55d

[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] 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 https://reviews.

[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 ht

[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/ https://reviews.ll

[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 change

[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/ https://reviews.ll

[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 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 https://reviews.llvm.org/D156363/ne

[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] 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 yma

[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 pa

[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/ https://reviews.llvm.org/D

[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] 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] 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 c

[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 Gi

[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 im

[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: R

[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 ___

[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: clang/lib/Analysis/

[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 cfe-co

[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: c

[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] 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 https://review

[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 clang/lib/CodeGen/CGCal

[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 cfe-commits@lists

[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] 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 https://lists.llvm.org/cgi-b

[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 htt

[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 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&id=544903#toc Repository: rG LLVM Github Monorepo

[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] 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 __attribut

[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] 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 I

<    1   2   3   >