[LLVMbugs] [Bug 15240] New: duplicate warning about deprecated destructor
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Feb 11 23:05:53 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15240
Bug ID: 15240
Summary: duplicate warning about deprecated destructor
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: nlewycky at google.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
This code:
struct B {
~B() __attribute__((deprecated));
};
struct X : public B { };
void test() {
X *x = new X;
delete x;
}
produces:
$ clang y.cc
y.cc:5:8: warning: '~B' is deprecated [-Wdeprecated-declarations]
struct X : public B { };
^
y.cc:2:3: note: '~B' declared here
~B() __attribute__((deprecated));
^
y.cc:5:8: warning: '~B' is deprecated [-Wdeprecated-declarations]
struct X : public B { };
^
y.cc:2:3: note: '~B' declared here
~B() __attribute__((deprecated));
^
2 warnings generated.
The issue is that the diagnostic is emitted from
MarkBaseAndMemberDestructorsReferenced, which is called twice, once from
SetCtorInitializers and once from DefineImplicitDestructor.
--
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/20130212/1ee47c54/attachment.html>
More information about the llvm-bugs
mailing list