Sterling-Augustine wrote:

Even with this fix, I'm seeing a segfault in clang/lib/AST/QualTypeNames.cpp at 
line 216. 

```
  switch(Scope->getKind()) {
```
Scope is nullptr. The call is from line 70:

```
  QualifiedTemplateName *QTName = TName.getAsQualifiedTemplateName();

  if (QTName && !QTName->hasTemplateKeyword()) {
    NNS = QTName->getQualifier();
    NestedNameSpecifier *QNNS = getFullyQualifiedNestedNameSpecifier(
        Ctx, NNS, WithGlobalNsPrefix);
```

which means that the `QTName->getQualifier()` is returning nullptr where it 
didn't before. Checking QTName->getQualifier() for nullptr in the conditional 
(so it can take the else side), everything works. But it seems to me that there 
is probably a better fix that someone familiar with the code would be able to 
figure out. I'm not even sure the original is doing the right thing.

I have a fix in testing that adds this check, but if you would double check it 
after it goes in, that would be helpful.

Unfortunately the failure is in an internal tool, against internal sources, 
which makes getting a reproducer a long process. I'm also working on that.

https://github.com/llvm/llvm-project/pull/93926
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to