[clang] [clang] Allow custom bug report messages (PR #157536)

2025-09-09 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/157536 Clang vendors may need to set a custom message for bug reports if the default is not sufficient (e.g. if they need the user to provide more information than what the default message asks for). This can be con

[clang] [clang] Allow custom bug report messages (PR #157536)

2025-09-09 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/157536 >From 9422db5ea09c40f74e2af34f6e50fa2fd4567594 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Mon, 8 Sep 2025 12:45:02 -0700 Subject: [PATCH 1/2] [clang] Allow custom bug report messages Clang vendors may nee

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-19 Thread Alan Zhao via cfe-commits
@@ -11003,8 +11003,9 @@ void ASTReader::diagnoseOdrViolations() { } void ASTReader::StartedDeserializing() { - if (++NumCurrentElementsDeserializing == 1 && ReadTimer.get()) -ReadTimer->startTimer(); + if (llvm::Timer *T = ReadTimer.get(); alanzhao1 wrot

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-19 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 edited https://github.com/llvm/llvm-project/pull/154231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-19 Thread Alan Zhao via cfe-commits
@@ -11003,8 +11003,9 @@ void ASTReader::diagnoseOdrViolations() { } void ASTReader::StartedDeserializing() { - if (++NumCurrentElementsDeserializing == 1 && ReadTimer.get()) -ReadTimer->startTimer(); + if (llvm::Timer *T = ReadTimer.get(); + ++NumCurrentElementsDese

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-18 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 unassigned https://github.com/llvm/llvm-project/pull/154231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-18 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/154231 >From 9f07859077fb6df79388d1cc346f3e57f2832f7c Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Mon, 18 Aug 2025 16:46:48 -0700 Subject: [PATCH 1/3] [clang][timers][modules] Fix a timer being started when it's

[clang] [clang][timers][stats] Add a flag to enable timers in the stats file (PR #149946)

2025-07-22 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/149946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [nfc] Fix formatting in clang release notes (PR #138172)

2025-05-01 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/138172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [nfc] Fix formatting in clang release notes (PR #138172)

2025-05-01 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/138172 `-ftime-report` was supposed to be an inline code section, which requires two backticks instead of one. >From da4f614cb810cb668c53ba1806802b8b01e4960b Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Thu, 1 Ma

[clang] [clang] Make `-ftime-report` and `-ftime-report-json` honor `-info-output-file` (PR #138035)

2025-04-30 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/138035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-30 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/137737 >From 1f0529aa5fbf9c4c1b3f0e58eaf5e527dc1605f2 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Mon, 28 Apr 2025 16:21:29 -0700 Subject: [PATCH 1/3] [clang] Implement JSON formatted -ftime-report This patch add

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-30 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/137737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-29 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/137737 >From 1f0529aa5fbf9c4c1b3f0e58eaf5e527dc1605f2 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Mon, 28 Apr 2025 16:21:29 -0700 Subject: [PATCH 1/2] [clang] Implement JSON formatted -ftime-report This patch add

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-29 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: The buildkite failure can be ignored; the offending test (Unwind/split-machine-functions.test) also fails on `main` (or rather the parent commit of this PR's branch). https://github.com/llvm/llvm-project/pull/137737 ___ cfe-commits m

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-28 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: @aeubanks this PR doesn't implement redirecting the output to a file, but I figured I'd implement that in another PR to keep things organized. https://github.com/llvm/llvm-project/pull/137737 ___ cfe-commits mailing list cfe-commits@l

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-28 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/137737 This patch adds a new flag, -ftime-report-json, which outputs the same information as -ftime-report but as JSON instead of -ftime-report's pretty printed format. >From 1f0529aa5fbf9c4c1b3f0e58eaf5e527dc1605f

[clang] [clang] Automatically add the `returns_twice` attribute to certain functions even if `-fno-builtin` is set (PR #133511)

2025-04-05 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/133511 Certain functions require the `returns_twice` attribute in order to produce correct codegen. However, `-fno-builtin` removes all knowledge of functions that require this attribute, so this PR modifies Clang t

[clang] [clang] Automatically add the `returns_twice` attribute to certain functions even if `-fno-builtin` is set (PR #133511)

2025-04-05 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/133511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-15 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 edited https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pas… (PR #131217)

2025-03-13 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 edited https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-13 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Looks like there's still some random bolt test failures going on. I think some test expectations need to be changed. https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-13 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Let's wait until CI passes before merging as the test repro is kind of flaky on my machine. https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pas… (PR #131217)

2025-03-13 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/131217 …s manager timers" (#131173) This reverts commit 31ebe6647b7f1fc7f6778a5438175b12f82357ae. The reason for the test failure is likely due to `Name2PairMap::getTimerGroup(...)` not holding a lock. >From 3734f8

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-13 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > Hmm...the bot breakages look like LLD test failures. Will investigate further. Note to self: add `cross-project-tests` to `LLVM_ENABLE_PROJECTS`to repro; I had no idea that existed. https://github.com/llvm/llvm-project/pull/130375

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-13 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Hmm...the bot breakages look like LLD test failures. Will investigate further. https://github.com/llvm/llvm-project/pull/130375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-13 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/130375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-12 Thread Alan Zhao via cfe-commits
@@ -39,19 +39,20 @@ Timer *getPassTimer(Pass *); /// This class implements -time-passes functionality for new pass manager. /// It provides the pass-instrumentation callbacks that measure the pass /// execution time. They collect timing info into individual timers as -/// passe

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-12 Thread Alan Zhao via cfe-commits
@@ -39,19 +39,20 @@ Timer *getPassTimer(Pass *); /// This class implements -time-passes functionality for new pass manager. /// It provides the pass-instrumentation callbacks that measure the pass /// execution time. They collect timing info into individual timers as -/// passe

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-10 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/130375 >From b2b4d522a442867aa65655cac1a0ece02616252b Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Mon, 24 Feb 2025 11:10:04 -0800 Subject: [PATCH 1/3] Use global TimerGroups for both new pass manager and old pass

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-07 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/130375 Additionally, remove the behavior for both pass manager's timer manager classes (`PassTimingInfo` for the old pass manager and `TimePassesHandler` for the new pass manager) where these classes would print the

[clang] [clang-format] Fix misannotations of `<` in ternary expressions (PR #100980)

2025-01-16 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: FYI this change messes up formatting of angle brackets for member function template parameters. See #123144 https://github.com/llvm/llvm-project/pull/100980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [compiler-rt] Move interceptors for libresolv functions to MSan (PR #119071)

2024-12-18 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Managed to reproduce it. This seems to break if the sysroot is set to the one Chrome uses. Our sysroot can be downloaded at https://commondatastorage.googleapis.com/chrome-linux-sysroot/dec7a3a0fc5b83b909cba1b6d119077e0429a138eadef6bf5a0f2e03b1904631 Command I used: ``` $ cma

[clang] [llvm] Revert "[X86][AMX] Support AMX-AVX512" (PR #115570)

2024-11-08 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/115570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[X86][AMX] Support AMX-AVX512" (PR #115570)

2024-11-08 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/115570 Reverts llvm/llvm-project#114070 Reason: Causes `immintrin.h` to fail to compile if `-msse` and `-mno-sse2` are passed to clang: https://github.com/llvm/llvm-project/pull/114070#issuecomment-2465926700 >Fro

[clang] [llvm] [X86][AMX] Support AMX-AVX512 (PR #114070)

2024-11-08 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Figured out a repro - `immintrin.h` doesn't compile if both `-msse` and `-mno-sse2` are passed to clang: ``` $ cat ~/src/test-mac.c #include $ bin/clang -msse -mno-sse2 -o /dev/null -c ~/src/test-mac.c In file included from /usr/local/google/home/ayzhao/src/test-mac.c:1: In fi

[clang] [llvm] [X86][AMX] Support AMX-AVX512 (PR #114070)

2024-11-08 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > FYI this is causing Chrome X86 MacOS builds to fail due to `error: unknown > type name '__m512bh'`: https://crbug.com/378111077 As I mentioned in https://crbug.com/378111077#comment3, the issue is that we pull in avx512bf16intrin.h because `__SCE__` is not defined, but `__SS

[clang] [llvm] [X86][AMX] Support AMX-AVX512 (PR #114070)

2024-11-08 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: FYI this is causing Chrome X86 MacOS builds to fail due to `error: unknown type name '__m512bh'`: https://crbug.com/378111077 https://github.com/llvm/llvm-project/pull/114070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > Reverted. The issue looks like the instantiation of the default argument was > skipped, but without any previous error actually being produced, so it > proceeded to CodeGen with invalid AST. Thanks! Still waiting on CReduce for that repro. https://github.com/llvm/llvm-proje

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: For posterity, here's the entire stacktrace I got: ``` /usr/local/google/home/ayzhao/src/llvm-project/build/bin/clang++ -MMD -MF obj/third_party/dawn/src/dawn/tests/dawn_unittests/CacheRequestTests.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -D__STDC_CONSTANT_MACROS

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Based on the [patch reversion policy](https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy), I think reverting is the right thing to do. (I'm working on the reduced repro, but creduce is _really_ slow. In the meantime, I attached the unreduced files). [unreduce

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: FYI this is causing Clang to crash with Chrome: https://crbug.com/377956048 I'm currently working on getting a reduced repro with CReduce. https://github.com/llvm/llvm-project/pull/113777 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang] Emit constraint intrinsics for arc and hyperbolic trig clang builtins (PR #98949)

2024-07-30 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > @alanzhao1 @efriedma-quic It should be fixed now by #101268 if you role the > clang build to latest. Confirmed. Thanks! https://github.com/llvm/llvm-project/pull/98949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang] Emit constraint intrinsics for arc and hyperbolic trig clang builtins (PR #98949)

2024-07-30 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: We (Chrome) are seeing linker failures on our x86 Windows builds due to this PR: https://crbug.com/355455678 ``` [12702/86218] LINK glmark2_wgl.exe glmark2_wgl.exe.pdb ..\..\third_party\llvm-build\Release+Asserts\bin\lld-link.exe /OUT:./glmark2_wgl.exe /nologo -libpath:..\..\

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-18 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > > @alanzhao1 do you think it's reasonable for the workaround to only apply to > > code in system headers, or does the NDK get included as regular headers > > generally? > > Having it only apply to system headers should be OK - in our case, chrome > imports these headers as

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-12 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > @alanzhao1 do you think it's reasonable for the workaround to only apply to > code in system headers, or does the NDK get included as regular headers > generally? Having it only apply to system headers should be OK - in our case, chrome imports these headers as part of a `

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-07-01 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Chrome's Windows debug builds also saw crashes due to this commit: https://crbug.com/350541784 https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-28 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: FYI this patch messes up some diagnostics with `-Wunreachable-code`: https://godbolt.org/z/6TEdrx55d If the unreachable code is a constructor with a default parameter that is a builtin function, clang incorrectly highlights the call to the builtin instead of the call to the c

[clang] [nfc][clang] Fix test in new-array-init.cpp (PR #79225)

2024-01-23 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/79225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [nfc][clang] Fix test in new-array-init.cpp (PR #79225)

2024-01-23 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/79225 This test was originally introduced in https://github.com/llvm/llvm-project/pull/76976, but it incorrectly tests braced-list initialization instead of parenthesized initialization. >From e68891368098b2ea488359

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-18 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/76976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-18 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/76976 >From 1ac47a1548f0dbd21747ef05c64fc2f08668e0e1 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 3 Jan 2024 12:29:21 -0800 Subject: [PATCH] [clang] Fix parenthesized list initialization of arrays not working

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-01-17 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: If we pass `-v` to Clang, we get the following include directories: without this patch: ``` clang -cc1 version 18.0.0git based upon LLVM 18.0.0git default target arm64-apple-darwin23.3.0 ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacO

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-01-17 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Here's what I did to repro: `include.cc`: ```cpp #include ``` Build clang: ``` $ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_LLD=False -DLLVM_CCACHE_BUILD=True -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" ../llvm $ ninja clang ``` I

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-17 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/76976 >From ee4e3c8634bb876166ee753a4ebcbf3c1699a175 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 3 Jan 2024 12:29:21 -0800 Subject: [PATCH 1/9] [clang] Fix parenthesized list initialization of arrays not wor

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-17 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/76976 >From ee4e3c8634bb876166ee753a4ebcbf3c1699a175 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 3 Jan 2024 12:29:21 -0800 Subject: [PATCH 1/8] [clang] Fix parenthesized list initialization of arrays not wor

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-16 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/76976 >From ee4e3c8634bb876166ee753a4ebcbf3c1699a175 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 3 Jan 2024 12:29:21 -0800 Subject: [PATCH 1/7] [clang] Fix parenthesized list initialization of arrays not wor

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-16 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 edited https://github.com/llvm/llvm-project/pull/76976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-16 Thread Alan Zhao via cfe-commits
@@ -1038,11 +1038,14 @@ void CodeGenFunction::EmitNewArrayInitializer( return true; }; + const InitListExpr *ILE = dyn_cast(Init); + const CXXParenListInitExpr *CPLIE = dyn_cast(Init); + const StringLiteral *SL = dyn_cast(Init); // If the initializer is an initiali

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-16 Thread Alan Zhao via cfe-commits
@@ -1038,11 +1038,14 @@ void CodeGenFunction::EmitNewArrayInitializer( return true; }; + const InitListExpr *ILE = dyn_cast(Init); + const CXXParenListInitExpr *CPLIE = dyn_cast(Init); + const StringLiteral *SL = dyn_cast(Init); // If the initializer is an initiali

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-16 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Ping. Any more comments? https://github.com/llvm/llvm-project/pull/76976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix direct-initialization with new expressions for arrays (PR #78201)

2024-01-15 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > I believe the approach here is not sufficient and we have a current PR in > progress: #76976 > > we also need codegen work to implement this. Correct - here are some examples that will cause this to fail: ```cpp void foo(int n) { new int[n](1, 2); } ``` ```cpp void bar()

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-09 Thread Alan Zhao via cfe-commits
@@ -1038,11 +1038,14 @@ void CodeGenFunction::EmitNewArrayInitializer( return true; }; + const InitListExpr *ILE = dyn_cast(Init); + const CXXParenListInitExpr *CPLIE = dyn_cast(Init); + const StringLiteral *SL = dyn_cast(Init); // If the initializer is an initiali

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-09 Thread Alan Zhao via cfe-commits
@@ -5495,14 +5495,12 @@ static void TryOrBuildParenListInitialization( return; } // ...and value-initialized for each k < i <= n; -if (ArrayLength > Args.size()) { alanzhao1 wrote: > What is this change supposed to do? `CodeGenFunction::

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-09 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/76976 >From ee4e3c8634bb876166ee753a4ebcbf3c1699a175 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 3 Jan 2024 12:29:21 -0800 Subject: [PATCH 1/6] [clang] Fix parenthesized list initialization of arrays not wor

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-09 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/76976 >From ee4e3c8634bb876166ee753a4ebcbf3c1699a175 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 3 Jan 2024 12:29:21 -0800 Subject: [PATCH 1/5] [clang] Fix parenthesized list initialization of arrays not wor

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-05 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > Have you considered the following case? > > ``` > void foo() { > char* arr = new char[]("asdf"); > } > ``` Thanks for catching this - this causes this patch to crash. Working on this right now. https://github.com/llvm/llvm-project/pull/76976

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/76976 >From ee4e3c8634bb876166ee753a4ebcbf3c1699a175 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 3 Jan 2024 12:29:21 -0800 Subject: [PATCH 1/4] [clang] Fix parenthesized list initialization of arrays not wor

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/76976 >From ee4e3c8634bb876166ee753a4ebcbf3c1699a175 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 3 Jan 2024 12:29:21 -0800 Subject: [PATCH 1/3] [clang] Fix parenthesized list initialization of arrays not wor

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/76976 >From ee4e3c8634bb876166ee753a4ebcbf3c1699a175 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 3 Jan 2024 12:29:21 -0800 Subject: [PATCH 1/2] [clang] Fix parenthesized list initialization of arrays not wor

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/76976 This bug is caused by parenthesized list initialization not being implemented in `CodeGenFunction::EmitNewArrayInitializer(...)`. Parenthesized list initialization of `struct`s with `operator new` already wo

[clang] fe0116a - [clang] Fix a crash when casting to an array type

2023-07-18 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-07-18T09:48:17-07:00 New Revision: fe0116aba833ee8597e2155d1e555c326acfaafc URL: https://github.com/llvm/llvm-project/commit/fe0116aba833ee8597e2155d1e555c326acfaafc DIFF: https://github.com/llvm/llvm-project/commit/fe0116aba833ee8597e2155d1e555c326acfaafc.diff LOG

[clang] 1cf5188 - [clang] Fix crash when passing a braced-init list to a parentehsized aggregate init expression

2023-05-31 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-05-31T13:52:45-07:00 New Revision: 1cf5188c72902e85e85095d788f5dfa138c320f8 URL: https://github.com/llvm/llvm-project/commit/1cf5188c72902e85e85095d788f5dfa138c320f8 DIFF: https://github.com/llvm/llvm-project/commit/1cf5188c72902e85e85095d788f5dfa138c320f8.diff LOG

[clang] d1d35f0 - [clang] Fix initializer_list matching failures with modules

2023-05-09 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-05-09T10:31:43-07:00 New Revision: d1d35f04c6cb2e3d5b0fbc6101d5425a33f8fc63 URL: https://github.com/llvm/llvm-project/commit/d1d35f04c6cb2e3d5b0fbc6101d5425a33f8fc63 DIFF: https://github.com/llvm/llvm-project/commit/d1d35f04c6cb2e3d5b0fbc6101d5425a33f8fc63.diff LOG

[clang] f762798 - Fix ReleaseNotes.rst unresolved merge conflict

2023-05-01 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-05-01T10:26:15-07:00 New Revision: f762798599171efca03964f4371cc8104d2392f9 URL: https://github.com/llvm/llvm-project/commit/f762798599171efca03964f4371cc8104d2392f9 DIFF: https://github.com/llvm/llvm-project/commit/f762798599171efca03964f4371cc8104d2392f9.diff LOG

[clang] 9b4faa1 - [clang] Fix overly aggressive lifetime checks for parenthesized aggregate initialization

2023-05-01 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-05-01T10:02:15-07:00 New Revision: 9b4faa11c68be4b45ddf29acd575bb52a3c2fad7 URL: https://github.com/llvm/llvm-project/commit/9b4faa11c68be4b45ddf29acd575bb52a3c2fad7 DIFF: https://github.com/llvm/llvm-project/commit/9b4faa11c68be4b45ddf29acd575bb52a3c2fad7.diff LOG

[clang] da0089c - [clang] Fix default initializers being ignored when initializing templated aggregate types

2023-05-01 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-05-01T09:27:52-07:00 New Revision: da0089c99ba1507b876cf3d2a205ba108aad65ff URL: https://github.com/llvm/llvm-project/commit/da0089c99ba1507b876cf3d2a205ba108aad65ff DIFF: https://github.com/llvm/llvm-project/commit/da0089c99ba1507b876cf3d2a205ba108aad65ff.diff LOG

[clang] 3e22eb3 - Fix spacing in ReleaseNotes.rst link

2023-04-27 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-04-27T11:41:21-07:00 New Revision: 3e22eb36b6ffd60608a0e70401b021738c1c4fe8 URL: https://github.com/llvm/llvm-project/commit/3e22eb36b6ffd60608a0e70401b021738c1c4fe8 DIFF: https://github.com/llvm/llvm-project/commit/3e22eb36b6ffd60608a0e70401b021738c1c4fe8.diff LOG

[clang] 7417e9d - [clang] Fix a crash with parenthesized aggregate initialization and base classes

2023-04-27 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-04-27T10:43:16-07:00 New Revision: 7417e9d75c9af7dd0d3dad12eebdee84b10b56d7 URL: https://github.com/llvm/llvm-project/commit/7417e9d75c9af7dd0d3dad12eebdee84b10b56d7 DIFF: https://github.com/llvm/llvm-project/commit/7417e9d75c9af7dd0d3dad12eebdee84b10b56d7.diff LOG

[clang] 7df3c71 - [clang] Fix 2 bugs with parenthesized aggregate initialization

2023-03-30 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-03-30T15:06:37-07:00 New Revision: 7df3c71b508b65284483225685f1ba19777f2bbb URL: https://github.com/llvm/llvm-project/commit/7df3c71b508b65284483225685f1ba19777f2bbb DIFF: https://github.com/llvm/llvm-project/commit/7df3c71b508b65284483225685f1ba19777f2bbb.diff LOG

[clang] 95a4c0c - [clang] Reland parenthesized aggregate init patches

2023-01-12 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-01-12T09:58:15-08:00 New Revision: 95a4c0c83554c025ef709a6805e67233d0dedba0 URL: https://github.com/llvm/llvm-project/commit/95a4c0c83554c025ef709a6805e67233d0dedba0 DIFF: https://github.com/llvm/llvm-project/commit/95a4c0c83554c025ef709a6805e67233d0dedba0.diff LOG

[clang] 4e02ff2 - [clang] Revert parentesized aggregate initalization patches

2023-01-04 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-01-04T15:09:36-08:00 New Revision: 4e02ff2303f8a69cc2459b77bbb879b248df6ca9 URL: https://github.com/llvm/llvm-project/commit/4e02ff2303f8a69cc2459b77bbb879b248df6ca9 DIFF: https://github.com/llvm/llvm-project/commit/4e02ff2303f8a69cc2459b77bbb879b248df6ca9.diff LOG

[clang] c77a91b - [clang] Remove overly restrictive aggregate paren init logic

2022-12-21 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2022-12-21T08:21:05-08:00 New Revision: c77a91bb7ba793ec3a6a5da3743ed55056291658 URL: https://github.com/llvm/llvm-project/commit/c77a91bb7ba793ec3a6a5da3743ed55056291658 DIFF: https://github.com/llvm/llvm-project/commit/c77a91bb7ba793ec3a6a5da3743ed55056291658.diff LOG

[clang] 40c5215 - [clang][C++20] P0960R3 and P1975R0: Allow initializing aggregates from a parenthesized list of values

2022-12-14 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2022-12-14T07:54:15-08:00 New Revision: 40c52159d3ee337dbed14e4c73b5616ea354c337 URL: https://github.com/llvm/llvm-project/commit/40c52159d3ee337dbed14e4c73b5616ea354c337 DIFF: https://github.com/llvm/llvm-project/commit/40c52159d3ee337dbed14e4c73b5616ea354c337.diff LOG

[clang] 4848f3b - [C++2a] P0634r3: Down with typename!

2022-09-28 Thread Alan Zhao via cfe-commits
Author: Nicolas Lesser Date: 2022-09-28T09:50:19-07:00 New Revision: 4848f3bf2ff5ec57a8e2b8d3676c947dcf0fd735 URL: https://github.com/llvm/llvm-project/commit/4848f3bf2ff5ec57a8e2b8d3676c947dcf0fd735 DIFF: https://github.com/llvm/llvm-project/commit/4848f3bf2ff5ec57a8e2b8d3676c947dcf0fd735.diff

[clang] 6f2b347 - Add missing `struct` keyword to the test p2-2.cpp

2022-09-28 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2022-09-28T09:48:00-07:00 New Revision: 6f2b34789541ff95d7f339eac5dc031d29655a58 URL: https://github.com/llvm/llvm-project/commit/6f2b34789541ff95d7f339eac5dc031d29655a58 DIFF: https://github.com/llvm/llvm-project/commit/6f2b34789541ff95d7f339eac5dc031d29655a58.diff LOG

[clang] ff8aadf - [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2022-08-15T15:24:39-04:00 New Revision: ff8aadf58d1a0ea7d8fa2b9a7a17ff0c6059baa5 URL: https://github.com/llvm/llvm-project/commit/ff8aadf58d1a0ea7d8fa2b9a7a17ff0c6059baa5 DIFF: https://github.com/llvm/llvm-project/commit/ff8aadf58d1a0ea7d8fa2b9a7a17ff0c6059baa5.diff LOG

[clang] 4ad17d2 - Clean "./" from __FILE__ expansion.

2022-06-02 Thread Alan Zhao via cfe-commits
Author: Paul Pluzhnikov Date: 2022-06-02T18:00:19-04:00 New Revision: 4ad17d2e96a382e5f595bab30920ba26762a6fa9 URL: https://github.com/llvm/llvm-project/commit/4ad17d2e96a382e5f595bab30920ba26762a6fa9 DIFF: https://github.com/llvm/llvm-project/commit/4ad17d2e96a382e5f595bab30920ba26762a6fa9.dif