[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 17 16:07:34 PDT 2024
HighCommander4 wrote:
@zyn0217 I've debugged the `DefineInlineTest.AddInline` failure with your new suggested change, it concerns the following scenario:
header.h
```c++
template <typename T> void foo();
template <> void foo<int>();
```
source.cpp:
```c++
#include "header.h"
template <> void foo<int>() {}
```
It seems the `FuntionDecl` for the explicit specialization declaration in the header file gets assigned the template parameter lists of the definition in the main file, and its `getBeginLoc()` starts returning the main-file location.
https://github.com/llvm/llvm-project/pull/108475
More information about the cfe-commits
mailing list