Closed jpienaar closed 9 years ago
The complete source range for an explicitly defaulted constructor is not captured. The AST dump of
struct A { constexpr A() = default; };
is
TranslationUnitDecl 0x64a66b0 <> |-TypedefDecl 0x64a6bf0 <> implicit int128_t 'int128' |-TypedefDecl 0x64a6c50 <> implicit uint128_t 'unsigned int128' |-TypedefDecl 0x64a7010 <> implicit builtin_va_list 'va_list_tag [1]' -CXXRecordDecl 0x64a7060 </usr/local/google/home/jpienaar/min.cpp:1:1, line:3:1> line:1:8 struct A definition |-CXXRecordDecl 0x64a7170 <col:1, col:8> col:8 implicit struct A -CXXConstructorDecl 0x64a72a0 <line:2:3, col:15> col:13 A 'void (void)' noexcept-unevaluated 0x64a72a0
-CXXRecordDecl 0x64a7060 </usr/local/google/home/jpienaar/min.cpp:1:1, line:3:1> line:1:8 struct A definition |-CXXRecordDecl 0x64a7170 <col:1, col:8> col:8 implicit struct A
It appears as if the source range of the constructor only reports "constexpr A()"
Fixed in r233028
Extended Description
The complete source range for an explicitly defaulted constructor is not captured. The AST dump of
struct A {
constexpr A() = default; };
is
TranslationUnitDecl 0x64a66b0 <>
|-TypedefDecl 0x64a6bf0 <> implicit int128_t 'int128'
|-TypedefDecl 0x64a6c50 <> implicit uint128_t 'unsigned int128'
|-TypedefDecl 0x64a7010 <> implicit builtin_va_list 'va_list_tag [1]'
-CXXRecordDecl 0x64a7060 </usr/local/google/home/jpienaar/min.cpp:1:1, line:3:1> line:1:8 struct A definition |-CXXRecordDecl 0x64a7170 <col:1, col:8> col:8 implicit struct A
-CXXConstructorDecl 0x64a72a0 <line:2:3, col:15> col:13 A 'void (void)' noexcept-unevaluated 0x64a72a0It appears as if the source range of the constructor only reports "constexpr A()"