[LLVMbugs] [Bug 22950] New: rejects-valid on dependent type in exception specification of overriding function
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 18 09:48:50 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=22950
Bug ID: 22950
Summary: rejects-valid on dependent type in exception
specification of overriding function
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: hstong at ca.ibm.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
In handling C++03 subclause 15.4 [except.spec] paragraph 3, it seems to me that
an exception-specification containing a dependent type-id should not be checked
to see if it only allows exceptions that are allowed by another (non-empty)
exception-specification while processing the template definition (versus an
instantiation).
### SOURCE (<stdin>):
struct A {
virtual void foo() throw(int) = 0;
};
template <typename T>
struct B : A {
virtual void foo() throw(T);
};
### COMPILER INVOCATION:
clang -fsyntax-only -x c++ -
### ACTUAL OUTPUT:
<stdin>:7:17: error: exception specification of overriding function is more lax
than base version
virtual void foo() throw(T);
^
<stdin>:2:17: note: overridden virtual function is here
virtual void foo() throw(int) = 0;
^
1 error generated.
### EXPECTED OUTPUT:
No errors.
### COMPILER VERSION INFO:
clang version 3.7.0 (trunk 232637)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation:
/usr/local/gcc-4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2
Selected GCC installation:
/usr/local/gcc-4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2
Candidate multilib: .;@m64
Selected multilib: .;@m64
--
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/20150318/ed801a51/attachment.html>
More information about the llvm-bugs
mailing list