aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Sema/DeclSpec.cpp2
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp
index 2cb4904347..df29febe4f 100644
--- a/lib/Sema/DeclSpec.cpp
+++ b/lib/Sema/DeclSpec.cpp
@@ -126,7 +126,7 @@ void CXXScopeSpec::Adopt(NestedNameSpecifierLoc Other) {
NestedNameSpecifierLoc
CXXScopeSpec::getWithLocInContext(ASTContext &Context) const {
- if (isEmpty() || isInvalid())
+ if (!Builder.getRepresentation())
return NestedNameSpecifierLoc();
return Builder.getWithLocInContext(Context);
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 3a40b6fd77..cbbc2d9f89 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -2917,7 +2917,7 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,
// FIXME: Can we use the CurrentInstantiationScope to avoid this
// extra instantiation in the common case?
- T = SubstType(T, TemplateArgs, SourceLocation(), DeclarationName());
+ T = SubstType(T, TemplateArgs, Loc, DeclarationName());
assert(!T.isNull() && "Instantiation of injected-class-name cannot fail.");
if (!T->isDependentType()) {