r281315 - Simplify. NFC.
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 13 03:36:13 PDT 2016
Author: vvassilev
Date: Tue Sep 13 05:36:12 2016
New Revision: 281315
URL: http://llvm.org/viewvc/llvm-project?rev=281315&view=rev
Log:
Simplify. NFC.
Modified:
cfe/trunk/lib/Sema/SemaLookup.cpp
cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=281315&r1=281314&r2=281315&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Tue Sep 13 05:36:12 2016
@@ -1339,7 +1339,7 @@ Module *Sema::getOwningModule(Decl *Enti
// instance, maybe this is a lazily-declared special member of an imported
// class).
auto *Parent = cast<NamedDecl>(Entity->getDeclContext());
- assert(Parent->isHidden() && "unexpectedly hidden decl");
+ assert(!Parent->isHidden() && "unexpectedly hidden decl");
return getOwningModule(Parent);
}
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=281315&r1=281314&r2=281315&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Tue Sep 13 05:36:12 2016
@@ -4125,17 +4125,17 @@ void Sema::InstantiateVariableDefinition
// unit.
if (!Def) {
if (DefinitionRequired) {
- if (VarSpec)
+ if (VarSpec) {
Diag(PointOfInstantiation,
diag::err_explicit_instantiation_undefined_var_template) << Var;
+ Var->setInvalidDecl();
+ }
else
Diag(PointOfInstantiation,
diag::err_explicit_instantiation_undefined_member)
<< 2 << Var->getDeclName() << Var->getDeclContext();
Diag(PatternDecl->getLocation(),
diag::note_explicit_instantiation_here);
- if (VarSpec)
- Var->setInvalidDecl();
} else if (Var->getTemplateSpecializationKind()
== TSK_ExplicitInstantiationDefinition) {
PendingInstantiations.push_back(
More information about the cfe-commits
mailing list