https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/89887
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
I have not enough resources to create a reproducer and it is not trivial, so I
would merge this change now.
https://github.com/llvm/llvm-project/pull/89887
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/jcsxky approved this pull request.
https://github.com/llvm/llvm-project/pull/89887
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jcsxky wrote:
> > Could you please show your commands which reproduced this crash? I tested
> > locally with the following commands and it runs OK.
> > ```c++
> > clang++ -cc1 -std=c++17 -emit-pch -o test.cpp.ast test.cpp
> > clang++ -cc1 -x c++ -ast-merge test.cpp.ast /dev/null -ast-dump
> > `
balazske wrote:
> Could you please show your commands which reproduced this crash? I tested
> locally with the following commands and it runs OK.
>
> ```c++
> clang++ -cc1 -std=c++17 -emit-pch -o test.cpp.ast test.cpp
> clang++ -cc1 -x c++ -ast-merge test.cpp.ast /dev/null -ast-dump
> ```
Tha
jcsxky wrote:
> A test is needed to make the change acceptable but I could not find an easy
> case to provoke the situation. The problem looks to be related to his code:
>
> ```c++
> using size_t = int;
> template class tuple;
>
> template
> struct integral_constant
> {
> static constexpr
https://github.com/NagyDonat approved this pull request.
This seems to be a reasonable and straightforward improvement which rules out a
hard-to test corner case. I think it's acceptable to merge this as it is now,
because crafting a testcase would require a disproportionate amount of work.
ht
balazske wrote:
The problem is that there is a distance between getting the "InsertPos" and the
insetion into the list. Between getting the `InsertPos`
(`VarTemplate->findSpecialization`) and the insertion further AST import
statements can occur and probably it can cause the list of specializa
balazske wrote:
I could reproduce this assertion (with CTU analysis on project "contour"):
```
clang-19: llvm-project/clang/lib/AST/DeclTemplate.cpp:370: void
clang::RedeclarableTemplateDecl::addSpecializationImpl(llvm::FoldingSetVector&,
EntryType*, void*) [with Derived = clang::VarTemplateDec
balazske wrote:
A test is needed to make the change acceptable but I could not find an easy
case to provoke the situation. The problem looks to be related to his code:
```c++
using size_t = int;
template class tuple;
template
struct integral_constant
{
static constexpr T value = v;
usin
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Balázs Kéri (balazske)
Changes
In some situations a new `VarTemplateSpecializationDecl` (for the same
template) can be added during import of another one. The "insert position" that
is used to insert the current object into the list of sp
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/89887
In some situations a new `VarTemplateSpecializationDecl` (for the same
template) can be added during import of another one. The "insert position" that
is used to insert the current object into the list of speci
12 matches
Mail list logo