aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-25 17:04:48 +0000
committerChris Lattner <sabre@nondot.org>2009-10-25 17:04:48 +0000
commitb7c3fd7b493329550c29dec11d31aca4d537e23e (patch)
treef9c414e93acf605324ce9377c42b6efcadb38fb4 /lib/Sema/SemaDecl.cpp
parent9994a34f6cf842721ba7723edc0b9036229fe387 (diff)
In objc mode, every identifier in a cast expression was using doing a
type looking using getTypeName() and every property access was using NextToken() to do lookahead to see if the identifier is followed by a '.'. Rearrange this code to not need lookahead and only do the type lookup if we have "identifier." in the token stream. Also improve a diagnostic a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index fe8052981f..4858321d51 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -142,7 +142,7 @@ Sema::TypeTy *Sema::getTypeName(IdentifierInfo &II, SourceLocation NameLoc,
QualType T;
if (TypeDecl *TD = dyn_cast<TypeDecl>(IIDecl)) {
- // Check whether we can use this type
+ // Check whether we can use this type.
(void)DiagnoseUseOfDecl(IIDecl, NameLoc);
if (getLangOptions().CPlusPlus) {