]> granicus.if.org Git - clang/commit
Introduce a new BufferResult class to act as the return type of
authorDouglas Gregor <dgregor@apple.com>
Mon, 15 Mar 2010 22:54:52 +0000 (22:54 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 15 Mar 2010 22:54:52 +0000 (22:54 +0000)
commitaea67dbd653a2dd6dd5cc2159279e81e855b2482
treebd96a24447cf5a504d84556ed129f6366f2fae2d
parent37cafb077ad5b170acae77e566638603011ef4c0
Introduce a new BufferResult class to act as the return type of
SourceManager's getBuffer() (and similar) operations. This abstract
can be used to force callers to cope with errors in getBuffer(), such
as missing files and changed files. Fix a bunch of callers to use the
new interface.

Add some very basic checks for file consistency (file size,
modification time) into ContentCache::getBuffer(), although these
checks don't help much until we've updated the main callers (e.g.,
SourceManager::getSpelling()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98585 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/clang/AST/ASTContext.h
include/clang/Basic/DiagnosticCommonKinds.td
include/clang/Basic/SourceManager.h
lib/AST/ASTContext.cpp
lib/Basic/SourceManager.cpp
lib/Frontend/RewriteObjC.cpp
lib/Frontend/TextDiagnosticPrinter.cpp
lib/Lex/Lexer.cpp
lib/Lex/PPLexerChange.cpp
lib/Lex/TokenLexer.cpp
lib/Rewrite/HTMLRewrite.cpp
lib/Rewrite/Rewriter.cpp
lib/Sema/SemaChecking.cpp
tools/CIndex/CIndex.cpp