summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-04 19:16:12 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-04 19:16:12 +0000
commitec6e1893d7dd35a7a7db3393081c361aad4f8824 (patch)
tree1338b5a831ebc0916f4eaac0a2fb3fffe0a2f1f2 /clang/lib/Sema/SemaDecl.cpp
parentc409c778177ad40bb66a132e83297f4ac9cdfb96 (diff)
downloadbcm5719-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.cpp12
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);
OpenPOWER on IntegriCloud