llvm-project/clang/tools/libclang
David Blaikie 6adc78e0df Replace TypeLoc llvm::cast support to be well-defined.
The TypeLoc hierarchy used the llvm::cast machinery to perform undefined
behavior by casting pointers/references to TypeLoc objects to derived types
and then using the derived copy constructors (or even returning pointers to
derived types that actually point to the original TypeLoc object).

Some context is in this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html
Though it's spread over a few months which can be hard to read in the mail
archive.

llvm-svn: 175462
2013-02-18 22:06:02 +00:00
..
ARCMigrate.cpp libclang: introduce cxstring::{createRef,createDup} for StringRefs 2013-02-02 02:19:29 +00:00
CIndex.cpp Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00
CIndexCXX.cpp libclang: change return type of getCursorDecl() to 'const Decl *' 2013-01-23 17:25:27 +00:00
CIndexCodeCompletion.cpp libclang: reduce CXString abuse 2013-02-07 19:09:22 +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 libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData) 2013-01-26 18:53:38 +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 Add OpenCL samplers as Clang builtin types and check sampler related restrictions. 2013-02-07 10:55:47 +00:00
CIndexer.cpp Sort #include lines for tools/... 2012-12-04 09:25:21 +00:00
CIndexer.h libclang: change CXCursor to store 'const void *' pointers for 2013-01-11 21:01:49 +00:00
CLog.h Re-sort all the headers. Lots of regressions have crept in here. 2013-01-19 08:09:44 +00:00
CMakeLists.txt this depends on the bitcode reader, since it is using it. 2013-01-19 18:24:13 +00:00
CXComment.cpp Comment to XML conversion: replace string comparison with command ID comparison 2013-02-03 17:48:05 +00:00
CXComment.h libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData) 2013-01-26 18:53:38 +00:00
CXCompilationDatabase.cpp libclang: remove 'using namespace cxstring' 2013-02-03 13:52:47 +00:00
CXCursor.cpp Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00
CXCursor.h libclang: make getCursorParentDecl() return 'const Decl *' 2013-01-26 18:12:08 +00:00
CXLoadedDiagnostic.cpp libclang: don't store nul-terminated strings as StringRefs, 2013-02-18 19:50:38 +00:00
CXLoadedDiagnostic.h libclang: don't store nul-terminated strings as StringRefs, 2013-02-18 19:50:38 +00:00
CXSourceLocation.cpp libclang: remove 'using namespace cxstring' 2013-02-03 13:52:47 +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 libclang: introduce cxstring::{createRef,createDup} for StringRefs 2013-02-02 02:19:29 +00:00
CXTranslationUnit.h libclang: refactor CXStringPool: make it a class 2013-01-26 22:44:19 +00:00
CXType.cpp libclang: add clang_getTypeSpelling(CXType CT) 2013-02-15 21:15:49 +00:00
CXType.h Change CXTranslationUnit to not directly cast to an ASTUnit*, 2010-11-16 08:15:36 +00:00
CursorVisitor.h libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData) 2013-01-26 18:53:38 +00:00
IndexBody.cpp Sort #include lines for tools/... 2012-12-04 09:25:21 +00:00
IndexDecl.cpp libclang: migrate IndexingDeclVisitor to ConstDeclVisitor 2013-02-03 13:42:20 +00:00
IndexTypeSourceInfo.cpp Sort #include lines for tools/... 2012-12-04 09:25:21 +00:00
Index_Internal.h [libclang] Move CursorVisitor to its own header. 2011-11-03 19:02:34 +00:00
Indexing.cpp libclang: remove 'using namespace cxstring' 2013-02-03 13:52:47 +00:00
IndexingContext.cpp Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00
IndexingContext.h libclang: remove unneeded const_casts 2013-02-03 13:19:54 +00:00
Makefile Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in the Apple way. 2013-02-13 19:44:17 +00:00
RecursiveASTVisitor.h Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00
SimpleFormatContext.h Remove useless 'llvm::' qualifier from names like StringRef and others that are 2013-01-12 19:30:44 +00:00
libclang.exports libclang: add clang_getTypeSpelling(CXType CT) 2013-02-15 21:15:49 +00:00