http://llvm.org/bugs/show_bug.cgi?id=14097
Bug #: 14097
Summary: incorrect debug info generated for constructor
Product: clang
Version: 3.1
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Created attachment 9357
--> http://llvm.org/bugs/attachment.cgi?id=9357
clang-generated code with debug info
Please take a look at the file test.cpp with class B and class D virtually
inheriting B.
test.cpp:
class B {
int b;
};
class D : virtual B {
int d;
public:
void f(int i);
};
void D::f(int i) {
d = i + 5;
}
int main() {
D xx;
xx.f(1);
}
Debug info descriptor for automatically-generated constructor of class B is
incorrect. Constructor B() doesn't have declaration, only definition. B() is
not linked in any way with the class B (it is not in the list of members of
class B). Thus B() appears as stand-alone artificial function and cannot be
determined as constructor.
The same bug could be reproduced in some more complicated cases for
destructors.
The .bc file is attached.
Compilation line: clang -O0 -g -S -emit-llvm -o test.bc test.cpp
Olga Chupina
---
Software Engineer
Intel Compiler Team
Intel Corp.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs