llvm-project/clang/tools/libclang
Alp Toker a2794f9f36 Introduce and use Decl::getAsFunction() to simplify templated function checks
Lift the getFunctionDecl() utility out of the parser into a general
Decl::getAsFunction() and use it to simplify other parts of the implementation.

Reduce isFunctionOrFunctionTemplate() to a simple type check that works the
same was as the other is* functions and move unwrapping of shadowed decls to
callers so it doesn't get run twice.

Shuffle around canSkipFunctionBody() to reduce virtual dispatch on ASTConsumer.
There's no need to query when we already know the body can't be skipped.

llvm-svn: 199794
2014-01-22 07:29:52 +00:00
..
ARCMigrate.cpp libclang: introduce cxstring::{createRef,createDup} for StringRefs 2013-02-02 02:19:29 +00:00
CIndex.cpp Introduce and use Decl::getAsFunction() to simplify templated function checks 2014-01-22 07:29:52 +00:00
CIndexCXX.cpp [libclang] Have clang_getCXXAccessSpecifier() also return the access control of a C++ declaration within its parent scope. 2013-04-11 17:02:10 +00:00
CIndexCodeCompletion.cpp Remove unnecessary inclusion of Sema.h 2013-09-13 18:32:52 +00:00
CIndexDiagnostic.cpp libclang: remove 'using namespace cxstring' 2013-02-03 13:52:47 +00:00
CIndexDiagnostic.h Implement clang_getDiagnosticCategoryText() to provide a way for a client of libclang to accurately 2012-04-12 00:03:31 +00:00
CIndexHigh.cpp Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily. 2013-07-04 03:08:24 +00:00
CIndexInclusionStack.cpp libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData) 2013-01-26 18:53:38 +00:00
CIndexUSRs.cpp Remove more uses of 'index' as namespace scope. 2013-08-21 01:51:19 +00:00
CIndexer.cpp libclang: Remove clang::RemapFiles, it's dead code. 2013-06-13 13:57:48 +00:00
CIndexer.h libclang: Remove clang::RemapFiles, it's dead code. 2013-06-13 13:57:48 +00:00
CLog.h [libclang] Add Logger::operator<< overloads for CXCursor and FileEntry. 2013-03-08 02:32:26 +00:00
CMakeLists.txt [CMake] Apply ADDITIONAL_HEADERS introduced in r199639. 2014-01-20 10:24:05 +00:00
CXComment.cpp Work around a bug in old gcc on the FreeBSD bot, which complains about 2013-11-14 00:36:24 +00:00
CXComment.h Make inline functions in a header file static. 2013-11-13 20:19:22 +00:00
CXCompilationDatabase.cpp Fix a tranche of comment, test and doc typos 2013-12-05 16:25:25 +00:00
CXCursor.cpp Eliminate UnaryTypeTraitExpr 2014-01-01 05:57:51 +00:00
CXCursor.h libclang: make getCursorParentDecl() return 'const Decl *' 2013-01-26 18:12:08 +00:00
CXLoadedDiagnostic.cpp Sort all the #include lines with LLVM's utils/sort_includes.py which 2014-01-07 11:51:46 +00:00
CXLoadedDiagnostic.h libclang: don't store nul-terminated strings as StringRefs, 2013-02-18 19:50:38 +00:00
CXSourceLocation.cpp [libclang] In clang_getLocation, check that the provided line/column is valid. 2013-09-12 01:10:36 +00:00
CXSourceLocation.h [libclang] Add some constness in CXSourceLocation and CXSourceRange. 2013-01-11 22:29:47 +00:00
CXStoredDiagnostic.cpp libclang: remove 'using namespace cxstring' 2013-02-03 13:52:47 +00:00
CXString.cpp libclang: wrap CXString implementation into 'namespace cxstring' 2013-02-03 13:54:26 +00:00
CXString.h Sort all the #include lines with LLVM's utils/sort_includes.py which 2014-01-07 11:51:46 +00:00
CXTranslationUnit.h Sort all the #include lines with LLVM's utils/sort_includes.py which 2014-01-07 11:51:46 +00:00
CXType.cpp Correct various uses of 'argument' that in fact refer to function parameters 2014-01-21 23:35:24 +00:00
CXType.h Change CXTranslationUnit to not directly cast to an ASTUnit*, 2010-11-16 08:15:36 +00:00
CursorVisitor.h [libclang] Modify clang_findReferencesInFile and clang_findIncludesInFile to return a value. 2013-03-08 20:42:33 +00:00
IndexBody.cpp Move tools/libclang/RecursiveASTVisitor.h -> include/clang/AST/DataRecursiveASTVisitor.h 2013-12-20 02:02:54 +00:00
IndexDecl.cpp [libclang] When indexing a @synthesize, don't consider that it defines a getter/setter if one is already defined by the user. 2013-05-29 23:58:31 +00:00
IndexTypeSourceInfo.cpp Move tools/libclang/RecursiveASTVisitor.h -> include/clang/AST/DataRecursiveASTVisitor.h 2013-12-20 02:02:54 +00:00
Index_Internal.h [libclang] Move CursorVisitor to its own header. 2011-11-03 19:02:34 +00:00
Indexing.cpp Use cstdio instead of stdio.h 2013-08-19 16:14:33 +00:00
IndexingContext.cpp Fix typo: s/Occurence/Occurrence/ 2013-11-30 23:33:14 +00:00
IndexingContext.h Fix typo: s/Occurence/Occurrence/ 2013-11-30 23:33:14 +00:00
Makefile Set NO_DEAD_STRIP for clang after llvm r198087. 2013-12-27 22:39:28 +00:00
libclang.exports [libclang] Rename CXSkippedRanges to CXSourceRangeList to make it more future-proof. 2013-12-06 18:55:45 +00:00