[cfe-commits] r107681 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Douglas Gregor
dgregor at apple.com
Tue Jul 6 11:29:01 PDT 2010
Author: dgregor
Date: Tue Jul 6 13:29:01 2010
New Revision: 107681
URL: http://llvm.org/viewvc/llvm-project?rev=107681&view=rev
Log:
Remove my egregious hack that forced deserialization of visible
declarations when implicitly declaring the default constructor, copy
constructor, destructor, and copy-assignment operators of a
class. Argiris fixed the underlying problem in r107596.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=107681&r1=107680&r2=107681&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Tue Jul 6 13:29:01 2010
@@ -4161,17 +4161,6 @@
assert(!ClassDecl->hasUserDeclaredConstructor() &&
"Should not build implicit default constructor!");
- // FIXME: HACK HACK HACK
- if (Context.getExternalSource()) {
- // This hack ensures that, when using precompiled headers, the lookup
- // table in the DeclContext has already loaded the constructor declarations
- // so that we can add a new one. The real fix will go into DeclContext,
- // when I figure out what that is.
- CanQualType T
- = Context.getCanonicalType(Context.getTypeDeclType(ClassDecl));
- ClassDecl->lookup(Context.DeclarationNames.getCXXConstructorName(T));
- }
-
// C++ [except.spec]p14:
// An implicitly declared special member function (Clause 12) shall have an
// exception-specification. [...]
@@ -4647,15 +4636,6 @@
// operators taking an object instead of a reference are allowed.
- // FIXME: HACK HACK HACK
- if (Context.getExternalSource()) {
- // This hack ensures that, when using precompiled headers, the lookup
- // table in the DeclContext has already loaded the assignment operator
- // declarations so that we can add a new one. The real fix will go into
- // DeclContext, when I figure out what that is.
- ClassDecl->lookup(Context.DeclarationNames.getCXXOperatorName(OO_Equal));
- }
-
// C++ [class.copy]p10:
// If the class definition does not explicitly declare a copy
// assignment operator, one is declared implicitly.
@@ -5088,17 +5068,6 @@
// If the class definition does not explicitly declare a copy
// constructor, one is declared implicitly.
- // FIXME: HACK HACK HACK
- if (Context.getExternalSource()) {
- // This hack ensures that, when using precompiled headers, the lookup
- // table in the DeclContext has already loaded the constructor declarations
- // so that we can add a new one. The real fix will go into DeclContext,
- // when I figure out what that is.
- CanQualType T
- = Context.getCanonicalType(Context.getTypeDeclType(ClassDecl));
- ClassDecl->lookup(Context.DeclarationNames.getCXXConstructorName(T));
- }
-
// C++ [class.copy]p5:
// The implicitly-declared copy constructor for a class X will
// have the form
More information about the cfe-commits
mailing list