Remove ImplicitMustBeDefined, use universal 'Used' flag
instead. Do the implicit default ctor checking in MarkDeclarationReferenced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73888 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 692502b..e989b1f 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -5461,6 +5461,13 @@
     return;
   
   // Note that this declaration has been used.
+  if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
+    DefineImplicitDefaultConstructor(Loc, Constructor);
+    // FIXME: set the Used flag if it is determined that ctor is valid.
+    Constructor->setUsed(true);
+    return;
+  } 
+  
   if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {
     // FIXME: implicit template instantiation
     // FIXME: keep track of references to static functions