Issue |
153540
|
Summary |
Clang getBeginLoc of some CXXConstructExpr has moved past namespace prefix
|
Labels |
clang
|
Assignees |
|
Reporter |
stbergmann
|
With test.cc being
```
namespace N { template<typename T> struct S { S(T); }; }
int main() {
N::S(0);
}
```
doing `clang++ -fsyntax-only -Xclang -ast-dump test.cc` shows that, for recent LLVM trunk, the begin of the statement `N::S(0);` has moved from col 3 (before `N::?),
```
`-FunctionDecl 0x55bacea168b8 <line:2:1, line:4:1> line:2:5 main 'int ()'
`-CompoundStmt 0x55bacea171b8 <col:12, line:4:1>
`-CXXFunctionalCastExpr 0x55bacea17190 <line:3:3, col:9> 'N::S' functional cast to N::S <ConstructorConversion>
`-CXXConstructExpr 0x55bacea17000 <col:3, col:9> 'N::S' 'void (int)'
`-IntegerLiteral 0x55bacea16a68 <col:8> 'int' 0
```
to col 6 (after `N::`),
```
`-FunctionDecl 0x3f53d5d8 <line:2:1, line:4:1> line:2:5 main 'int ()'
`-CompoundStmt 0x3f561d18 <col:12, line:4:1>
`-CXXFunctionalCastExpr 0x3f561cf0 <line:3:6, col:9> 'N::S<int>' functional cast to N::S <ConstructorConversion>
`-CXXConstructExpr 0x3f561b60 <col:6, col:9> 'N::S<int>' 'void (int)'
`-IntegerLiteral 0x3f53d7a8 <col:8> 'int' 0
```
(which trips up one of the LibreOffice Clang plugins).
@mizvekov: I assume this is related to recent <https://github.com/llvm/llvm-project/commit/91cdd35008e9ab32dffb7e401cdd7313b3461892> "[clang] Improve nested name specifier AST representation (https://github.com/llvm/llvm-project/pull/147835)".
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs