[PATCH] D125418: [Arm64EC 6/?] Implement C/C++ mangling for Arm64EC function definitions.

2022-08-31 Thread chenglin.bi via Phabricator via cfe-commits
bcl5980 added a comment. In D125418#3759174 , @efriedma wrote: > The reason struct returns require register shuffling is that AArch64 passes > the sret pointer in x8 (i.e. RAX), but the x64 calling convention expects in > in RCX (i.e. x0). So, for the

[PATCH] D132997: [clang][Interp] Handle DeclRefExpr of reference types

2022-08-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, shafik, erichkeane, tahonermann. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. And add a couple of tests for it. Notably, this is

[PATCH] D132998: [clang-tidy] Restrict use-equals-default to c++11-or-later

2022-08-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: gribozavr2, njames93, aaron.ballman. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-shaposhnikov

[clang] a5ab650 - [clang] Fix a crash in constant evaluation

2022-08-31 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2022-08-31T10:09:24+02:00 New Revision: a5ab650714d05c2e49ec158dc99156118a893027 URL: https://github.com/llvm/llvm-project/commit/a5ab650714d05c2e49ec158dc99156118a893027 DIFF: https://github.com/llvm/llvm-project/commit/a5ab650714d05c2e49ec158dc99156118a893027.dif

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-08-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa5ab650714d0: [clang] Fix a crash in constant evaluation (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132918/new/ https://reviews.l

[PATCH] D129664: [Clang] Adjust extension warnings for delimited sequences

2022-08-31 Thread Jakub Jelínek via Phabricator via cfe-commits
jakubjelinek added a comment. While accepting all these inside of string and character literals in C and C++20 and older is fine, accepting them inside of identifiers can change meaning of valid programs. https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600620.html #define z(x) 0 #define a

[clang] b58ed43 - Revert "[clang] Fix a crash in constant evaluation"

2022-08-31 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2022-08-31T10:12:52+02:00 New Revision: b58ed43a7f6b67bdb03ab746b654c823f54c261f URL: https://github.com/llvm/llvm-project/commit/b58ed43a7f6b67bdb03ab746b654c823f54c261f DIFF: https://github.com/llvm/llvm-project/commit/b58ed43a7f6b67bdb03ab746b654c823f54c261f.dif

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-08-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. sorry, i missed the other comments around having a lit test. reverting the change. Comment at: clang/lib/AST/ExprConstant.cpp:4797 } +// Can't access properties of an incomplete type. +if (!RD->hasDefinition()) { shafik w

[PATCH] D132950: Remove unnecessary `REQUIRES: x86-registered-target` from ps4/ps5 driver tests.

2022-08-31 Thread Ying Yi via Phabricator via cfe-commits
MaggieYi added a comment. Thanks Paul. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132950/new/ https://reviews.llvm.org/D132950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D132998: [clang-tidy] Restrict use-equals-default to c++11-or-later

2022-08-31 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. There's going to be contention with this. The modernize module is designed for converting pre c++11 codebases to c++11, can't really do that if the check is disabled on those older codebases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D132950: Remove unnecessary `REQUIRES: x86-registered-target` from ps4/ps5 driver tests.

2022-08-31 Thread Ying Yi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0e5fe1cdacdc: Remove `REQUIRES: x86-registered-target` from ps4/ps5 driver tests (authored by MaggieYi). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132950

[clang] 0e5fe1c - Remove `REQUIRES: x86-registered-target` from ps4/ps5 driver tests

2022-08-31 Thread Ying Yi via cfe-commits
Author: Ying Yi Date: 2022-08-31T09:56:37+01:00 New Revision: 0e5fe1cdacdca65edc84c89cc7a6de27f406de61 URL: https://github.com/llvm/llvm-project/commit/0e5fe1cdacdca65edc84c89cc7a6de27f406de61 DIFF: https://github.com/llvm/llvm-project/commit/0e5fe1cdacdca65edc84c89cc7a6de27f406de61.diff LOG:

[PATCH] D132998: [clang-tidy] Restrict use-equals-default to c++11-or-later

2022-08-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. My assumption was that a codebase needs to compile with c++11 in the first place - otherwise the automatic fixit will break the build (as it happens right now). I was looking at modernize/UseOverrideCheck.h - it requires c++11 and this seemed to be quite

[libclc] a11e2d7 - [libclc] Quote addition of CLC/LLAsm flags

2022-08-31 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-08-31T11:10:24+02:00 New Revision: a11e2d7366a11385e23d142ac93065a861b70a16 URL: https://github.com/llvm/llvm-project/commit/a11e2d7366a11385e23d142ac93065a861b70a16 DIFF: https://github.com/llvm/llvm-project/commit/a11e2d7366a11385e23d142ac93065a861b70a16.diff

[PATCH] D133006: [clang-tidy] Skip copy assignment operators with nonstandard return types

2022-08-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: njames93, gribozavr2, aaron.ballman. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-shaposhnikov

[PATCH] D132990: [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()

2022-08-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a reviewer: mizvekov. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:1534-1538 + if (TInfo->getType()->getContainedAutoType()) { Diag(D.getIdentifierLoc(), diag::warn_cxx14_compat_template_nontype_parm_auto_type)

[PATCH] D132640: [clang-tidy] Fix modernize-use-emplace to support alias cases

2022-08-31 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG495d984e14bd: [clang-tidy] Fix modernize-use-emplace to support alias cases (authored by corona10, committed by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[clang-tools-extra] 495d984 - [clang-tidy] Fix modernize-use-emplace to support alias cases

2022-08-31 Thread Nathan James via cfe-commits
Author: corona10 Date: 2022-08-31T10:21:10+01:00 New Revision: 495d984e14bd8367017ffdea8183840c8267cbbf URL: https://github.com/llvm/llvm-project/commit/495d984e14bd8367017ffdea8183840c8267cbbf DIFF: https://github.com/llvm/llvm-project/commit/495d984e14bd8367017ffdea8183840c8267cbbf.diff LOG:

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-31 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. @njames93 Is there anything else I should address? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 ___ cfe-commits mailing list c

[PATCH] D132990: [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()

2022-08-31 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/test/SemaTemplate/temp_arg_nontype_diagnostic_cxx1z.cpp:1 +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 -Wpre-c++17-compat %s + One thing we could do is to run this test also in std=c++17 mode, with a diff

[PATCH] D133009: [libclang] Fix conversion from `StringRef` to `CXString`

2022-08-31 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan created this revision. egorzhdan added a reviewer: gribozavr2. Herald added a subscriber: arphaman. Herald added a project: All. egorzhdan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `CXString createRef(StringRef String)` used

[PATCH] D132136: [clang] Perform implicit lvalue-to-rvalue cast with new interpreter

2022-08-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D132136#3755724 , @aaron.ballman wrote: > In D132136#3753290 , @tbaeder wrote: > >> In D132136#3751702 , @erichkeane >> wrote: >> >>> Would b

[PATCH] D132829: [clang][Interp] Handle ImplictValueInitExprs

2022-08-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 456915. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132829/new/ https://reviews.llvm.org/D132829 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Opcodes.td clang/test/AST/Interp/ar

[clang] 9e842dd - [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-31 Thread Wei Yi Tee via cfe-commits
Author: Wei Yi Tee Date: 2022-08-31T10:23:53Z New Revision: 9e842dd4bd551c42951d1a56bb9d9eef1fa6c385 URL: https://github.com/llvm/llvm-project/commit/9e842dd4bd551c42951d1a56bb9d9eef1fa6c385 DIFF: https://github.com/llvm/llvm-project/commit/9e842dd4bd551c42951d1a56bb9d9eef1fa6c385.diff LOG: [c

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-31 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9e842dd4bd55: [clang][dataflow] Extend transfer functions for other `CFGElement`s (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new

[PATCH] D132997: [clang][Interp] Handle DeclRefExpr of reference types

2022-08-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 456917. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132997/new/ https://reviews.llvm.org/D132997 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/references.cpp Index: clang/test/AST/Interp/references.cpp =

[PATCH] D131563: [clang] Fix clang multiarch isssue with musl

2022-08-31 Thread Brahmajit via Phabricator via cfe-commits
listout updated this revision to Diff 456920. listout marked an inline comment as done. listout retitled this revision from "[WIP] [clang] Fix clang multiarch isssue with musl" to "[clang] Fix clang multiarch isssue with musl". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131563/new/ ht

[PATCH] D131563: [clang] Fix clang multiarch isssue with musl

2022-08-31 Thread Brahmajit via Phabricator via cfe-commits
listout added a comment. Hey everyone, it would be very helpful if someone looked at this and help me merge this patch, python3.11 is failing without these modifications CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131563/new/ https://reviews.llvm.org/D131563

[clang] 0f95b2b - [clang] update pr27699 test to make headers different (NFC)

2022-08-31 Thread Mikhail Goncharov via cfe-commits
Author: Mikhail Goncharov Date: 2022-08-31T13:12:28+02:00 New Revision: 0f95b2b0606317ba048ff39da7a1d65c3bdc8fb5 URL: https://github.com/llvm/llvm-project/commit/0f95b2b0606317ba048ff39da7a1d65c3bdc8fb5 DIFF: https://github.com/llvm/llvm-project/commit/0f95b2b0606317ba048ff39da7a1d65c3bdc8fb5.d

[clang] ce4c7a9 - [clang] Silence a false positive GCC -Wunused-but-set-parameter warning with constexpr

2022-08-31 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2022-08-31T14:55:44+03:00 New Revision: ce4c7a987fa3f255fa49570da4be1b9739815369 URL: https://github.com/llvm/llvm-project/commit/ce4c7a987fa3f255fa49570da4be1b9739815369 DIFF: https://github.com/llvm/llvm-project/commit/ce4c7a987fa3f255fa49570da4be1b9739815369.diff

[PATCH] D132920: [clang] Silence a false positive GCC -Wunused-but-set-parameter warning with constexpr

2022-08-31 Thread Martin Storsjö 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 rGce4c7a987fa3: [clang] Silence a false positive GCC -Wunused-but-set-parameter warning with… (authored by mstorsjo). Repository: rG LLVM Github Mon

[clang] 5b86174 - Clarifying the documentation for diagnostic formats; NFC

2022-08-31 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-08-31T08:32:58-04:00 New Revision: 5b861743539aa9a1184589647f6e9ce96da8b620 URL: https://github.com/llvm/llvm-project/commit/5b861743539aa9a1184589647f6e9ce96da8b620 DIFF: https://github.com/llvm/llvm-project/commit/5b861743539aa9a1184589647f6e9ce96da8b620.diff

[PATCH] D133009: [libclang] Fix conversion from `StringRef` to `CXString`

2022-08-31 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan updated this revision to Diff 456942. egorzhdan added a comment. XFAIL a test that was accidentally passing because of incorrect behavior Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133009/new/ https://reviews.llvm.org/D133009 Files:

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @aaron.ballman, that's my reading of the standard as well. Do you think we should proceed with the current approach or is there another direction worth pursuing to make source_location work? In D129488#3760178 , @ChuanqiXu

[PATCH] D133009: [libclang] Fix conversion from `StringRef` to `CXString`

2022-08-31 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan added inline comments. Comment at: clang/test/Index/comment-lots-of-unknown-commands.c:3 +// XFAIL: * + This test was never properly passing. Because of the bug in string conversion, the printed comments contained the entire source file and not just

[PATCH] D132997: [clang][Interp] Handle DeclRefExpr of reference types

2022-08-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 456944. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132997/new/ https://reviews.llvm.org/D132997 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/arrays.cpp clang/test/AST/Interp/references.cpp Index: clang/test/AST/Inte

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:41-44 +template +constexpr T getElementOf(T* array, int i) { + return array[i]; +} aaron.ballman wrote: > A similar test we might want to add (w

Re: [clang] b58ed43 - Revert "[clang] Fix a crash in constant evaluation"

2022-08-31 Thread Aaron Ballman via cfe-commits
On Wed, Aug 31, 2022 at 4:13 AM Kadir Cetinkaya via cfe-commits wrote: > > > Author: Kadir Cetinkaya > Date: 2022-08-31T10:12:52+02:00 > New Revision: b58ed43a7f6b67bdb03ab746b654c823f54c261f > > URL: > https://github.com/llvm/llvm-project/commit/b58ed43a7f6b67bdb03ab746b654c823f54c261f > DIFF:

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-31 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 456945. yusuke-kadowaki marked 4 inline comments as done. yusuke-kadowaki added a comment. - Remove trailing whitespace - Update document Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https:

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-31 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:785 + - Consecutive + - AcrossEmptyLines + - AcrossComments HazardyKnusperkeks wrote: > yusuke-kadowaki wrote: > > MyDeveloperDay wrote: > > > may be AcrossEmptyLines sho

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-08-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4797 } +// Can't access properties of an incomplete type. +if (!RD->hasDefinition()) { kadircet wrote: > shafik wrote: > > erichkeane wrote: > > > It seems to me that we

[PATCH] D132918: [clang] Fix a crash in constant evaluation

2022-08-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: aaron.ballman, clang-language-wg. aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Marking this as requesting changes so we don't have another accidental commit. Repository: rG LLVM Gi

[PATCH] D132851: Further update -Wbitfield-constant-conversion for 1-bit bitfield

2022-08-31 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3b00e486797c: Further update -Wbitfield-constant-conversion for 1-bit bitfield (authored by aaron.ballman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132

[clang] 3b00e48 - Further update -Wbitfield-constant-conversion for 1-bit bitfield

2022-08-31 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-08-31T09:23:45-04:00 New Revision: 3b00e486797c0a28f0b5216ea507329d098ce573 URL: https://github.com/llvm/llvm-project/commit/3b00e486797c0a28f0b5216ea507329d098ce573 DIFF: https://github.com/llvm/llvm-project/commit/3b00e486797c0a28f0b5216ea507329d098ce573.diff

[PATCH] D130181: [clang-tidy] Add readability-use-early-exits check

2022-08-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/use-early-exits.rst:63 +void Process(bool A, bool B) { + if (A && B) { +// Long processing. njames93 wrote: > JonasToth wrote: > > if this option i

[PATCH] D131563: [clang] Fix clang multiarch isssue with musl

2022-08-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: echristo. aaron.ballman added a comment. Adding another reviewer to try to get this unstuck. Can you add test coverage for the changes (to clang\test\Driver)? Also, there should be a release note so users know about the fix (that can go into clang\docs\ReleaseNot

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-08-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9436 +CGM.getModule(), Type, true, +llvm::GlobalValue::LinkageTypes::LinkOnceODRLinkage, +llvm::ConstantInt::get(Type, Value), Name, nullptr, jhuber6 wrote: > yaxun

[PATCH] D122255: Meta directive runtime support

2022-08-31 Thread Abid via Phabricator via cfe-commits
abidmalikwaterloo marked 2 inline comments as done. abidmalikwaterloo added a comment. I will work on the patch in parts. I am planning to submit taking care of comments except for comments for SemaOpenMP and code generation. Comment at: clang/lib/AST/OpenMPClause.cpp:1679 +

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 456953. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132727/new/ https://reviews.llvm.org/D132727 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/In

[PATCH] D132801: [driver] Additional ignoring of module-map related flags, if modules are disabled

2022-08-31 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. In D132801#3760014 , @rsmith wrote: > This doesn't look right to me -- we still use module maps when modules are > disabled to enforce layering checking, and when > `-fmodules-local-submodule-visibility` is enabled but `-fmodule

[PATCH] D133029: [Sema] Allow to diagnose the references to std::vector with incomplete T

2022-08-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Herald added a project: All. ilya-biryukov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add a warning `-Waccess-vector-incomplete-member`. Inspired by recent changes to libc++ that make some uses act

[PATCH] D132944: [clang] cleanup -fstrict-flex-arrays implementation

2022-08-31 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 456971. serge-sans-paille edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132944/new/ https://reviews.llvm.org/D132944 Files: clang/include/clang/Driver/Options.td clang/lib/CodeGen/CGExpr.cpp clang/

[PATCH] D133029: [Sema] Allow to diagnose the references to std::vector with incomplete T

2022-08-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This warning might be a little verbose and pedantic for Clang, but I still wanted to share the code. I would be more comfortable doing this a `clang-tidy` check, but I don't think there is an easy way to write it outside `Sema` and `Sema` is not readily available

[PATCH] D131879: [clang][analyzer] Errno modeling code refactor (NFC).

2022-08-31 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. Herald added a subscriber: rnkovacs. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131879/new/ https://reviews.llvm.org/D131879 ___ cfe-comm

[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456978. wyt added a comment. Herald added subscribers: llvm-commits, mgrang, mgorny. Herald added a project: LLVM. Remove use of designated initializers which are only allowed on C++20. Instead, introduce a constructor that sets required fields, and `withFieldNam

[PATCH] D133009: [libclang] Fix conversion from `StringRef` to `CXString`

2022-08-31 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/test/Index/comment-lots-of-unknown-commands.c:3 +// XFAIL: * + egorzhdan wrote: > This test was never properly passing. Because of the bug in string > conversion, the printed comments contained the entire sou

[PATCH] D132944: [clang] cleanup -fstrict-flex-arrays implementation

2022-08-31 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. #include #include consteval int fn(std::source_location sl = std::source_location::current()) { return sl.line(); } consteval int fn2(int line = fn()) { return line; } int main() { printf("fn=%d fn2=%d\n", fn(), fn2()); } I belie

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-31 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. #include #include consteval int fn(std::source_location sl = std::source_location::current()) { return sl.line(); } consteval int fn2(int line = fn()) { return line; } int main() { printf("fn=%d fn2=%d\n", fn(), fn2()); } I belie

[PATCH] D133029: [Sema] Allow to diagnose the references to std::vector with incomplete T

2022-08-31 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. In D133029#3761344 , @ilya-biryukov wrote: > [...] I don't think there is an easy way to write it outside `Sema` and > `Sema` is not readily available for `clang-tidy`. What information is missing, exactly? Repository: r

[PATCH] D133009: [libclang] Fix conversion from `StringRef` to `CXString`

2022-08-31 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan added inline comments. Comment at: clang/test/Index/comment-lots-of-unknown-commands.c:3 +// XFAIL: * + gribozavr2 wrote: > egorzhdan wrote: > > This test was never properly passing. Because of the bug in string > > conversion, the printed comments c

[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456980. wyt added a comment. This is a re-update of a previous update which uploaded the wrong diff. Remove use of designated initializers which are only allowed on C++20. Instead, introduce a constructor that sets required fields, and withFieldName methods that

[PATCH] D133029: [Sema] Allow to diagnose the references to std::vector with incomplete T

2022-08-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D133029#3761400 , @gribozavr2 wrote: > In D133029#3761344 , @ilya-biryukov > wrote: > >> [...] I don't think there is an easy way to write it outside `Sema` and >> `Sema` is no

[PATCH] D132944: [clang] cleanup -fstrict-flex-arrays implementation

2022-08-31 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. (please ignore the last comment, I sent it to the wrong review thread) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132944/new/ https://reviews.llvm.org/D132944 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456982. wyt added a comment. Update according to change in parent patch to replace designated initialisers when constructing `AnalysisInputs`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132377/new/ https://revi

[PATCH] D129664: [Clang] Adjust extension warnings for delimited sequences

2022-08-31 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. > While accepting all these inside of string and character literals in C and > C++20 and older is fine, accepting them inside of identifiers can change > meaning of valid programs. Thank you for reporting this impact, @jakubjelinek! I'll copy you on an email to WG2

[PATCH] D132763: [clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector>`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456983. wyt added a comment. Propagate change from parent patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132763/new/ https://reviews.llvm.org/D132763 Files: clang/unittests/Analysis/FlowSensitive/TestingSu

[PATCH] D132756: [clang][dataflow] Refactor `TypeErasedDataflowAnalysisTest` - replace usage of the deprecated overload of `checkDataflow`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456986. wyt added a comment. Update according to change in preceding patches to replace use of designated initialisers when constructing `AnalysisInputs`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132756/new/

[PATCH] D132962: [clangd][ObjC] Improve completions for protocols + category names

2022-08-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. can you also add test cases for the other two (filtering both for speculative index queries/regular ones, and making sure we don't suggest symbols from index for category names), so that we don't regress in the future? Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D129008: [Clang][OpenMP] Fix the issue that globalization doesn't work with byval struct function argument

2022-08-31 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D129008#3640233 , @jdoerfert wrote: > In D129008#3640194 , > @tianshilei1992 wrote: > >> `callCStructCopyConstructor` is actually for Objective-C…Cannot use it here. > > Don't w

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D129488#3761398 , @jyknight wrote: > I believe this should print `fn=14 fn2=14`. I don't see how we can get that > by special-casing calls to `std::source_location::current`, and indeed, with > this version of the patch

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-31 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. I am okay with this change, it does give a proper canonical form, which is good. On the other hand, I agree that (on the long term) base regions and offsets would be a better memory model th

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. @aaron.ballman should review+accept this before you land it, but I'm satisfied with the result. Thank you @inclyc for working on this! Repository: rG LLVM Github Monorepo

[clang] 8c09352 - [libclang] Fix conversion from `StringRef` to `CXString`

2022-08-31 Thread Egor Zhdan via cfe-commits
Author: Egor Zhdan Date: 2022-08-31T17:39:45+01:00 New Revision: 8c0935238527622ba0a7e78e8a1ee2d36026961c URL: https://github.com/llvm/llvm-project/commit/8c0935238527622ba0a7e78e8a1ee2d36026961c DIFF: https://github.com/llvm/llvm-project/commit/8c0935238527622ba0a7e78e8a1ee2d36026961c.diff LO

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-31 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:141 - /// Alignment options. - /// - /// They can also be read as a whole for compatibility. The choices are: + /// Alignment styles of ``AlignConsecutiveStyle`` are: /// - None ---

[PATCH] D133009: [libclang] Fix conversion from `StringRef` to `CXString`

2022-08-31 Thread Egor Zhdan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c0935238527: [libclang] Fix conversion from `StringRef` to `CXString` (authored by egorzhdan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133009/new/ ht

[PATCH] D131563: [clang] Fix clang multiarch isssue with musl

2022-08-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. This may not be the right direction. If GCC is not configured with `--enable-multi-arch`, `--print-multiarch` output is an empty line. The `x86_64-linux-gnu` style output is for Deb

[PATCH] D132932: [Clang][Comments] Parse `` in doc comments correctly

2022-08-31 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan updated this revision to Diff 456989. egorzhdan added a comment. Rebase to apply fixes to string conversion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132932/new/ https://reviews.llvm.org/D132932 Files: clang/lib/AST/CommentLexer.cp

[clang] 83902c4 - Reapply "[clang][deps] Split translation units into individual -cc1 or other commands"

2022-08-31 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-31T09:45:11-07:00 New Revision: 83902c403611af3a52453867cb8848fb3fd6a39c URL: https://github.com/llvm/llvm-project/commit/83902c403611af3a52453867cb8848fb3fd6a39c DIFF: https://github.com/llvm/llvm-project/commit/83902c403611af3a52453867cb8848fb3fd6a39c.diff

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. Basically LGTM as well, just some nits about comments and a small fix to the c status page. In D132568#3753512 , @inclyc wrote: > Currently this patch has not fully implemented `wchar_

[clang] c9033ee - [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-31 Thread Wei Yi Tee via cfe-commits
Author: Wei Yi Tee Date: 2022-08-31T17:02:07Z New Revision: c9033eeb2e59c0157b84adfc6b0fe345f6f03113 URL: https://github.com/llvm/llvm-project/commit/c9033eeb2e59c0157b84adfc6b0fe345f6f03113 DIFF: https://github.com/llvm/llvm-project/commit/c9033eeb2e59c0157b84adfc6b0fe345f6f03113.diff LOG: [c

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc9033eeb2e59: [clang][dataflow] Generalise match switch utility to other AST types and add a… (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D131979: [clang][UBSan] Fix __builtin_assume_aligned crash

2022-08-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks. Just a few small requests to re-use more of the existing logic here. Comment at: clang/lib/Sema/SemaChecking.cpp:7659 + << 0 << 2 << TheCall->getNumArgs() << Callee->getSourceRange(); + } + It looks like this should

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/docs/ReleaseNotes.rst:141 +- Implemented `WG14 N2562 `_. + Clang will now consider default argument promotions in printf, and remove unnecessary warnings. --

[PATCH] D132991: [Clang] Give error message for invalid profile path when compiling IR

2022-08-31 Thread Rong Xu via Phabricator via cfe-commits
xur added a comment. I'm fine with this change. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1301 +unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, +"Could not read profile %0: %1"); +llvm::handleAllE

[clang] 66f3e90 - [Driver][test] Test -dumpmachine

2022-08-31 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-08-31T10:31:45-07:00 New Revision: 66f3e90cf8225333273bfaddc1a7f832fe0c263d URL: https://github.com/llvm/llvm-project/commit/66f3e90cf8225333273bfaddc1a7f832fe0c263d DIFF: https://github.com/llvm/llvm-project/commit/66f3e90cf8225333273bfaddc1a7f832fe0c263d.diff

[PATCH] D131979: [clang][UBSan] Fix __builtin_assume_aligned crash

2022-08-31 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. Thanks for your review John, I'll try to fix these problem later which you point out. Comment at: clang/lib/Sema/SemaChecking.cpp:7659 + << 0 << 2 << TheCall->getNumArgs() << Callee->getSourceRange(); + } + rjmccall wrote: >

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D132952#3759731 , @efriedma wrote: > As a practical matter, there isn't any reason to force variably modified > parameters to make a function variably modified. The types of parameters > aren't visible in the caller of

[clang] 74c8d9d - Revert "[clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`."

2022-08-31 Thread Wei Yi Tee via cfe-commits
Author: Wei Yi Tee Date: 2022-08-31T18:49:56Z New Revision: 74c8d9d5fc83868977d497c4376296bc27319622 URL: https://github.com/llvm/llvm-project/commit/74c8d9d5fc83868977d497c4376296bc27319622 DIFF: https://github.com/llvm/llvm-project/commit/74c8d9d5fc83868977d497c4376296bc27319622.diff LOG: Re

[PATCH] D131979: [clang][UBSan] Fix __builtin_assume_aligned crash

2022-08-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7671 + AllArgs, CallType)) +return true; + yihanaa wrote: > rjmccall wrote: > > You can just pull the argument expressions out of the `CallExpr`; you don't

[PATCH] D132962: [clangd][ObjC] Improve completions for protocols + category names

2022-08-31 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 457049. dgoldman added a comment. Add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132962/new/ https://reviews.llvm.org/D132962 Files: clang-tools-extra/clangd/CodeComplete.cpp clang-tools-extra/cl

[PATCH] D132962: [clangd][ObjC] Improve completions for protocols + category names

2022-08-31 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. In D132962#3761463 , @kadircet wrote: > can you also add test cases for the other two (filtering both for speculative > index queries/regular ones, and making sure we don't suggest symbols from > index for category names), so t

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 457052. wyt added a comment. Use `u` suffix to declare constants as unsigned in `CFGMatchSwitchTest.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files: clang/i

[clang] cdf3de4 - [CodeGen] fix misnamed "not" operation; NFC

2022-08-31 Thread Sanjay Patel via cfe-commits
Author: Sanjay Patel Date: 2022-08-31T15:11:48-04:00 New Revision: cdf3de45d282694290011a2949bdcc61cabb47ef URL: https://github.com/llvm/llvm-project/commit/cdf3de45d282694290011a2949bdcc61cabb47ef DIFF: https://github.com/llvm/llvm-project/commit/cdf3de45d282694290011a2949bdcc61cabb47ef.diff

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-08-31 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:297 + } + IdentifierInfo &HLSL = AST.Idents.get("hlsl", tok::TokenKind::identifier); beanz wrote: > I think the core of what you'e doing here is not far off, but I think

[clang] 41b1c9f - Re-add the REQUIRES line to fix a failed build on builder llvm-clang-win-x-aarch64.

2022-08-31 Thread Ying Yi via cfe-commits
Author: Ying Yi Date: 2022-08-31T20:22:18+01:00 New Revision: 41b1c9ff70142dc38a381517718cd3f95e8d62b7 URL: https://github.com/llvm/llvm-project/commit/41b1c9ff70142dc38a381517718cd3f95e8d62b7 DIFF: https://github.com/llvm/llvm-project/commit/41b1c9ff70142dc38a381517718cd3f95e8d62b7.diff LOG:

[PATCH] D133043: [clangd] Fix tests for implicit C function declaration

2022-08-31 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: aaron.ballman, sammccall, kadircet. Herald added a subscriber: arphaman. Herald added a project: All. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools

[PATCH] D132998: [clang-tidy] Restrict use-equals-default to c++11-or-later

2022-08-31 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D132998#3760603 , @alexander-shaposhnikov wrote: > My assumption was that a codebase needs to compile with c++11 in the first > place - otherwise the automatic fixit will break the build (as it happens > right now). > I was l

[PATCH] D133044: [Frontend] Restore Preprocessor::getPredefines()

2022-08-31 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a subscriber: kristof.beyls. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A patch from May removed Preprocessor::getPredefines() from Clang's API,

[PATCH] D133044: [Frontend] Restore Preprocessor::getPredefines()

2022-08-31 Thread Brad King via Phabricator via cfe-commits
brad.king accepted this revision. brad.king added a comment. This revision is now accepted and ready to land. LGTM. After applying this patch locally on top of the release/15.x branch, CastXML builds again. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D133044: [Frontend] Restore Preprocessor::getPredefines()

2022-08-31 Thread Tobias Hieta via Phabricator via cfe-commits
thieta accepted this revision. thieta added a comment. LGTM and seems pretty safe so I am not opposed to merge it before 15 final. I would maybe add a link to the GitHub issue in the comment, but that's a nit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

  1   2   >