summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-02-19 07:28:55 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-02-19 07:28:55 +0000
commit33d548531f9e97ca31db2c13883a388888c112d8 (patch)
treea0556b51d3bc82b4f7f20a2c934bd3a32e06b0fe
parent786bae078f042db9bcee767eef0aa73f06293039 (diff)
downloadclang-33d548531f9e97ca31db2c13883a388888c112d8.tar.gz
Mark DR1948 as implemented
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229827 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaExceptionSpec.cpp6
-rw-r--r--test/CXX/drs/dr19xx.cpp6
-rw-r--r--www/cxx_dr_status.html2
3 files changed, 10 insertions, 4 deletions
diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp
index 2387325be4..41abd49627 100644
--- a/lib/Sema/SemaExceptionSpec.cpp
+++ b/lib/Sema/SemaExceptionSpec.cpp
@@ -437,7 +437,7 @@ bool Sema::CheckEquivalentExceptionSpec(const PartialDiagnostic &DiagID,
OldNR != FunctionProtoType::NR_NoNoexcept &&
NewNR != FunctionProtoType::NR_NoNoexcept) {
Diag(NewLoc, DiagID);
- if (NoteID.getDiagID() != 0)
+ if (NoteID.getDiagID() != 0 && OldLoc.isValid())
Diag(OldLoc, NoteID);
return true;
}
@@ -518,7 +518,7 @@ bool Sema::CheckEquivalentExceptionSpec(const PartialDiagnostic &DiagID,
}
Diag(NewLoc, DiagID);
- if (NoteID.getDiagID() != 0)
+ if (NoteID.getDiagID() != 0 && OldLoc.isValid())
Diag(OldLoc, NoteID);
return true;
}
@@ -547,7 +547,7 @@ bool Sema::CheckEquivalentExceptionSpec(const PartialDiagnostic &DiagID,
return false;
}
Diag(NewLoc, DiagID);
- if (NoteID.getDiagID() != 0)
+ if (NoteID.getDiagID() != 0 && OldLoc.isValid())
Diag(OldLoc, NoteID);
return true;
}
diff --git a/test/CXX/drs/dr19xx.cpp b/test/CXX/drs/dr19xx.cpp
index 8087631067..dd98aafb51 100644
--- a/test/CXX/drs/dr19xx.cpp
+++ b/test/CXX/drs/dr19xx.cpp
@@ -40,6 +40,12 @@ namespace dr1902 { // dr1902: 3.7
}
#if __cplusplus >= 201103L
+// dr1948: yes
+// FIXME: This diagnostic could be improved.
+void *operator new(__SIZE_TYPE__) noexcept { return nullptr; } // expected-error{{exception specification in declaration does not match previous declaration}}
+#endif
+
+#if __cplusplus >= 201103L
namespace dr1968 { // dr1968: yes
static_assert(&typeid(int) == &typeid(int), ""); // expected-error{{not an integral constant expression}}
}
diff --git a/www/cxx_dr_status.html b/www/cxx_dr_status.html
index 5651a1c1dc..fb9368708a 100644
--- a/www/cxx_dr_status.html
+++ b/www/cxx_dr_status.html
@@ -11503,7 +11503,7 @@ and <I>POD class</I></td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1948">1948</a></td>
<td>NAD</td>
<td><I>exception-specification</I> of replacement global <TT>new</TT></td>
- <td class="none" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr class="open" id="1949">
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1949">1949</a></td>