[LLVMbugs] [Bug 20744] New: Source range of explicitly defaulted constructor not recorded

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 25 09:31:12 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20744

            Bug ID: 20744
           Summary: Source range of explicitly defaulted constructor not
                    recorded
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jpienaar at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The complete source range for an explicitly defaulted constructor is not
captured.  The AST dump of

struct A {                                                                      
  constexpr A() = default;
};

is

TranslationUnitDecl 0x64a66b0 <<invalid sloc>> <invalid sloc>
|-TypedefDecl 0x64a6bf0 <<invalid sloc>> <invalid sloc> implicit __int128_t
'__int128'
|-TypedefDecl 0x64a6c50 <<invalid sloc>> <invalid sloc> implicit __uint128_t
'unsigned __int128'
|-TypedefDecl 0x64a7010 <<invalid sloc>> <invalid sloc> 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

It appears as if the source range of the constructor only reports "constexpr
A()"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140825/ec27f211/attachment.html>


More information about the llvm-bugs mailing list