diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-02-04 19:16:12 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-02-04 19:16:12 +0000 |
| commit | ec6e1893d7dd35a7a7db3393081c361aad4f8824 (patch) | |
| tree | 1338b5a831ebc0916f4eaac0a2fb3fffe0a2f1f2 /clang/lib/Sema/SemaDecl.cpp | |
| parent | c409c778177ad40bb66a132e83297f4ac9cdfb96 (diff) | |
| download | bcm5719-llvm-ec6e1893d7dd35a7a7db3393081c361aad4f8824.tar.gz bcm5719-llvm-ec6e1893d7dd35a7a7db3393081c361aad4f8824.zip | |
Improve documentation for Sema::getTypeName. Also, it's return type is
DeclTy*, not TypeTy*.
llvm-svn: 63756
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 3e501f450a8..e31f376d864 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -31,7 +31,17 @@ using namespace clang; -Sema::TypeTy *Sema::getTypeName(IdentifierInfo &II, SourceLocation NameLoc, +/// \brief If the identifier refers to a type name within this scope, +/// return the declaration of that type. +/// +/// This routine performs ordinary name lookup of the identifier II +/// within the given scope, with optional C++ scope specifier SS, to +/// determine whether the name refers to a type. If so, returns the +/// declaration corresponding to that type. Otherwise, returns NULL. +/// +/// If name lookup results in an ambiguity, this routine will complain +/// and then return NULL. +Sema::DeclTy *Sema::getTypeName(IdentifierInfo &II, SourceLocation NameLoc, Scope *S, const CXXScopeSpec *SS) { Decl *IIDecl = 0; LookupResult Result = LookupParsedName(S, SS, &II, LookupOrdinaryName, false); |

