Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Sema/SemaType.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 8,648 Lines • ▼ Show 20 Lines | if (!Incomplete) { | ||||
if (Def && | if (Def && | ||||
!hasVisibleDefinition(Def, &SuggestedDef, /*OnlyNeedComplete*/true)) { | !hasVisibleDefinition(Def, &SuggestedDef, /*OnlyNeedComplete*/true)) { | ||||
// If the user is going to see an error here, recover by making the | // If the user is going to see an error here, recover by making the | ||||
// definition visible. | // definition visible. | ||||
bool TreatAsComplete = Diagnoser && !isSFINAEContext(); | bool TreatAsComplete = Diagnoser && !isSFINAEContext(); | ||||
if (Diagnoser && SuggestedDef) | if (Diagnoser && SuggestedDef) | ||||
diagnoseMissingImport(Loc, SuggestedDef, MissingImportKind::Definition, | diagnoseMissingImport(Loc, SuggestedDef, MissingImportKind::Definition, | ||||
/*Recover*/TreatAsComplete); | /*Recover*/TreatAsComplete); | ||||
// FIXME: It is possible to emit duplicated diagnostic message. See | |||||
// CXX/module/module.reach/p4/X.cpp for example. | |||||
return !TreatAsComplete; | return !TreatAsComplete; | ||||
} else if (Def && !TemplateInstCallbacks.empty()) { | } else if (Def && !TemplateInstCallbacks.empty()) { | ||||
CodeSynthesisContext TempInst; | CodeSynthesisContext TempInst; | ||||
TempInst.Kind = CodeSynthesisContext::Memoization; | TempInst.Kind = CodeSynthesisContext::Memoization; | ||||
TempInst.Template = Def; | TempInst.Template = Def; | ||||
TempInst.Entity = Def; | TempInst.Entity = Def; | ||||
TempInst.PointOfInstantiation = Loc; | TempInst.PointOfInstantiation = Loc; | ||||
atTemplateBegin(TemplateInstCallbacks, *this, TempInst); | atTemplateBegin(TemplateInstCallbacks, *this, TempInst); | ||||
▲ Show 20 Lines • Show All 432 Lines • Show Last 20 Lines |