llvm-project/clang/tools/libclang
Argyrios Kyrtzidis 6d7833f1b6 Introduce a flag in SourceManager to treat non-system source files
as "volatile", meaning there's a high enough chance that they may
change while we are trying to use them.

This flag is only enabled by libclang.
Currently "volatile" source files will be stat'ed immediately
before opening them, because the file size stat info
may not be accurate since when we got it (e.g. from the PCH).
This avoids crashes when trying to reference mmap'ed memory
from a file whose size is not what we expect.

Note that there's still a window for a racing issue to occur
but the window for it should be way smaller than before.
We can consider later on to avoid mmap completely on such files.

rdar://11612916

llvm-svn: 160074
2012-07-11 20:59:04 +00:00
..
ARCMigrate.cpp Add new code migrator support for migrating existing Objective-C code to use 2012-03-06 20:06:33 +00:00
CIndex.cpp Introduce a flag in SourceManager to treat non-system source files 2012-07-11 20:59:04 +00:00
CIndexCXX.cpp Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it) 2012-01-17 06:56:22 +00:00
CIndexCodeCompletion.cpp Add a new libclang completion API to get brief documentation comment that is 2012-07-02 17:35:10 +00:00
CIndexDiagnostic.cpp Fix an assertion hit when the serialized diagnostics writer receive a diagnostic 2012-05-10 05:03:45 +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] Add defensive checks to make sure we don't try to dereference 2011-12-10 02:36:25 +00:00
CIndexInclusionStack.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
CIndexUSRs.cpp Plug a long standing memory leak in TemplateArgument. 2012-06-07 15:09:51 +00:00
CIndexer.cpp remove unneeded config.h includes 2011-12-22 22:49:47 +00:00
CIndexer.h [libclang] If displayDiagnostics is set (when calling clang_createIndex), make sure to 2012-04-11 02:11:16 +00:00
CMakeLists.txt [libclang] Make implementation filename match the header's name for CXCompilationDatabase 2012-06-30 20:43:43 +00:00
CXCompilationDatabase.cpp [libclang] CompilationDatabase naming and comment fixes 2012-07-03 20:38:12 +00:00
CXCursor.cpp [libclang] Introduce clang_Cursor_isDynamicCall which, 2012-07-02 23:54:36 +00:00
CXCursor.h Reduce malloc() traffic of clang_getOverridenCursors() by using a pool of SmallVector<CXCursor> objects 2012-04-30 19:06:49 +00:00
CXLoadedDiagnostic.cpp Implement clang_getDiagnosticCategoryText() to provide a way for a client of libclang to accurately 2012-04-12 00:03:31 +00:00
CXLoadedDiagnostic.h Implement clang_getDiagnosticCategoryText() to provide a way for a client of libclang to accurately 2012-04-12 00:03:31 +00:00
CXSourceLocation.cpp serialized diagnostics: implement full deserialization of clang diagnostics via the libclang API. 2011-11-10 08:43:12 +00:00
CXSourceLocation.h Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
CXStoredDiagnostic.cpp Re-apply r159875 with fixes. 2012-07-07 05:53:30 +00:00
CXString.cpp [libclang] Workaround potential race condition with code completion AllocatedResults being freed after a CXTranslationUnit. 2011-08-17 22:19:53 +00:00
CXString.h drop more llvm:: prefixes on SmallString<> 2012-02-13 12:32:26 +00:00
CXTranslationUnit.h Reduce malloc() traffic of clang_getOverridenCursors() by using a pool of SmallVector<CXCursor> objects 2012-04-30 19:06:49 +00:00
CXType.cpp [libclang] Report CXType_ObjCId for 'const id', not CXType_Typedef. 2012-05-23 23:30:16 +00:00
CXType.h Change CXTranslationUnit to not directly cast to an ASTUnit*, 2010-11-16 08:15:36 +00:00
CursorVisitor.h Implement indexing support for lambdas in libclang (both kinds), as 2012-02-15 00:54:55 +00:00
IndexBody.cpp [libclang/AST] Index references of protocols in "@protocol(...)" syntax. 2012-05-16 00:50:02 +00:00
IndexDecl.cpp [libclang/AST] 2012-06-08 02:16:11 +00:00
IndexTypeSourceInfo.cpp [libclang] Put the RecursiveASTVisitor in libclang in a cxindex namespace. 2012-05-07 22:22:58 +00:00
Index_Internal.h [libclang] Move CursorVisitor to its own header. 2011-11-03 19:02:34 +00:00
Indexing.cpp Introduce a flag in SourceManager to treat non-system source files 2012-07-11 20:59:04 +00:00
IndexingContext.cpp [libclang] Fix use-after-free bug when handling attributes indexing info. 2012-03-31 01:14:06 +00:00
IndexingContext.h Replace some custom hash combines with the standard stuff from DenseMapInfo. 2012-05-27 13:28:44 +00:00
Makefile [libclang] Fix autoconf library dependencies for tooling support 2012-06-30 12:49:09 +00:00
RecursiveASTVisitor.h Etch out the code path for MS-style inline assembly. 2012-06-11 20:47:18 +00:00
libclang.exports [libclang] CompilationDatabase naming and comment fixes 2012-07-03 20:38:12 +00:00