r207893 - Revert "Sema: Implement DR244"
David Majnemer
david.majnemer at gmail.com
Fri May 2 19:22:11 PDT 2014
Author: majnemer
Date: Fri May 2 21:22:11 2014
New Revision: 207893
URL: http://llvm.org/viewvc/llvm-project?rev=207893&view=rev
Log:
Revert "Sema: Implement DR244"
This was accidentally committed.
This reverts commit r207892.
Modified:
cfe/trunk/lib/Sema/SemaExprCXX.cpp
cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp
cfe/trunk/test/CXX/drs/dr2xx.cpp
cfe/trunk/www/cxx_dr_status.html
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=207893&r1=207892&r2=207893&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Fri May 2 21:22:11 2014
@@ -144,10 +144,8 @@ ParsedType Sema::getDestructorName(Sourc
AlreadySearched = true;
LookupCtx = DC;
isDependent = false;
- } else if (DC && isa<CXXRecordDecl>(DC)) {
+ } else if (DC && isa<CXXRecordDecl>(DC))
LookAtPrefix = false;
- LookInScope = true;
- }
// The second case from the C++03 rules quoted further above.
NestedNameSpecifier *Prefix = 0;
@@ -165,6 +163,8 @@ ParsedType Sema::getDestructorName(Sourc
LookupCtx = computeDeclContext(SS, EnteringContext);
isDependent = LookupCtx && LookupCtx->isDependentContext();
}
+
+ LookInScope = false;
} else if (ObjectTypePtr) {
// C++ [basic.lookup.classref]p3:
// If the unqualified-id is ~type-name, the type-name is looked up
Modified: cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp?rev=207893&r1=207892&r2=207893&view=diff
==============================================================================
--- cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp (original)
+++ cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp Fri May 2 21:22:11 2014
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-// expected-no-diagnostics
struct C {
typedef int I;
@@ -21,5 +20,5 @@ struct A {
typedef A AB;
int main() {
AB *p;
- p->AB::~AB();
+ p->AB::~AB(); // expected-error{{expected the class name after '~' to name a destructor}}
}
Modified: cfe/trunk/test/CXX/drs/dr2xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr2xx.cpp?rev=207893&r1=207892&r2=207893&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr2xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr2xx.cpp Fri May 2 21:22:11 2014
@@ -466,7 +466,7 @@ namespace dr243 { // dr243: yes
A a2 = b; // expected-error {{ambiguous}}
}
-namespace dr244 { // dr244: 3.5
+namespace dr244 { // dr244: no
struct B {}; struct D : B {}; // expected-note {{here}}
D D_object;
@@ -480,7 +480,7 @@ namespace dr244 { // dr244: 3.5
B_ptr->~B_alias();
B_ptr->B_alias::~B();
// This is valid under DR244.
- B_ptr->B_alias::~B_alias();
+ B_ptr->B_alias::~B_alias(); // FIXME: expected-error {{expected the class name after '~' to name a destructor}}
B_ptr->dr244::~B(); // expected-error {{refers to a member in namespace}}
B_ptr->dr244::~B_alias(); // expected-error {{refers to a member in namespace}}
}
@@ -1013,6 +1013,7 @@ namespace dr298 { // dr298: yes
B::B() {} // expected-error {{requires a type specifier}}
B::A() {} // ok
+ C::~C() {} // expected-error {{expected the class name}}
C::~A() {} // ok
typedef struct D E; // expected-note {{here}}
Modified: cfe/trunk/www/cxx_dr_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_dr_status.html?rev=207893&r1=207892&r2=207893&view=diff
==============================================================================
--- cfe/trunk/www/cxx_dr_status.html (original)
+++ cfe/trunk/www/cxx_dr_status.html Fri May 2 21:22:11 2014
@@ -1504,7 +1504,7 @@ accessible?</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#244">244</a></td>
<td>CD1</td>
<td>Destructor lookup</td>
- <td class="svn" align="center">SVN</td>
+ <td class="none" align="center">No</td>
</tr>
<tr id="245">
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#245">245</a></td>
More information about the cfe-commits
mailing list