in isDefinedInClangModule() and assume that the incomplete definition
is not defined in the module.
This broke the -gmodules self host recently.
rdar://problem/
27894367
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279485
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!RD->isExternallyVisible() && RD->getName().empty())
return false;
if (auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD)) {
- assert(CXXDecl->isCompleteDefinition() && "incomplete record definition");
+ if (!CXXDecl->isCompleteDefinition())
+ return false;
auto TemplateKind = CXXDecl->getTemplateSpecializationKind();
if (TemplateKind != TSK_Undeclared) {
// This is a template, check the origin of the first member.
--- /dev/null
+/* -*- C++ -*- */
+template <typename T> class Base {};
+template <typename T> struct A : public Base<A<T>> {
+ void f();
+};
+
+class F {};
+typedef A<F> AF;
--- /dev/null
+/* -*- C++ -*- */
+#include "DebugNestedA.h"
+class C {
+ void run(AF &af) {
+ af.f();
+ }
+};
module DiagOutOfDate {
header "DiagOutOfDate.h"
}
+
+module DebugNestedA {
+ header "DebugNestedA.h"
+ export *
+}
+
+module DebugNestedB {
+ header "DebugNestedB.h"
+ export *
+}