aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Parse/ParseStmt.cpp1
-rw-r--r--lib/Sema/SemaDecl.cpp14
2 files changed, 3 insertions, 12 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index 8a03864ad6..a324bdc045 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -148,7 +148,6 @@ Retry:
break;
case Sema::NC_Type:
- // We have a type.
// We have a type. In C, this means that we have a declaration.
if (!getLang().CPlusPlus) {
ParsedType Type = Classification.getType();
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 05a077b38f..d07bd4b72d 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -411,11 +411,7 @@ Sema::NameClassification Sema::ClassifyName(Scope *S,
// unqualified lookup mechanism.
if (!SS.isSet() && CurMethod && !isResultTypeOrTemplate(Result, NextToken)) {
ExprResult E = LookupInObjCMethod(Result, S, Name, true);
-
- if (E.isInvalid())
- return NameClassification::Error();
-
- if (E.get())
+ if (E.get() || E.isInvalid())
return E;
// Synthesize ivars lazily.
@@ -430,12 +426,8 @@ Sema::NameClassification Sema::ClassifyName(Scope *S,
// FIXME: This is strange. Shouldn't we just take the ivar returned
// from SynthesizeProvisionalIvar and continue with that?
- E = LookupInObjCMethod(Result, S, Name, true);
-
- if (E.isInvalid())
- return NameClassification::Error();
-
- if (E.get())
+ E = LookupInObjCMethod(Result, S, Name, true);
+ if (E.get() || E.isInvalid())
return E;
}
}