jansvoboda11 wrote:

I got around investigating 
"SemaCXX/warn-unsafe-buffer-usage-fixits-parm-span.cpp" and found out it uses 
this pattern:
```
%clang_cc1 ... -include %s %s
```

This means `FileID(1)` is the main input file `%s` and `FileID(2)` is the 
built-ins buffer that includes `%s` as `FileID(3)`.

Since I moved up the special-casing of built-ins buffer up in my last commit, 
it was happening **before** we got chance to walk up from `FileID(3)` to 
`FileID(2)`, meaning it wasn't kicking in. I think we need to sink the 
special-casing into `isInTheSameTranslationUnit()` and apply it to whatever 
`FileID` we end up with after not finding the common ancestor.

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

Reply via email to