Introduce optional "Invalid" parameters to routines that invoke the
SourceManager's getBuffer() and, therefore, could fail, along with Preprocessor::getSpelling(). Use the Invalid parameters in the literal parsers (string, floating point, integral, character) to make them robust against errors that stem from, e.g., PCH files that are not consistent with the underlying file system. I still need to audit every use caller to all of these routines, to determine which ones need specific handling of error conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98608 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/SourceManager.h 22 additions, 11 deletionsinclude/clang/Basic/SourceManager.h
- include/clang/Lex/Preprocessor.h 11 additions, 5 deletionsinclude/clang/Lex/Preprocessor.h
- lib/Basic/SourceManager.cpp 57 additions, 25 deletionslib/Basic/SourceManager.cpp
- lib/Lex/LiteralSupport.cpp 13 additions, 2 deletionslib/Lex/LiteralSupport.cpp
- lib/Lex/PPExpressions.cpp 10 additions, 2 deletionslib/Lex/PPExpressions.cpp
- lib/Lex/Preprocessor.cpp 26 additions, 9 deletionslib/Lex/Preprocessor.cpp
- test/PCH/changed-files.c 11 additions, 0 deletionstest/PCH/changed-files.c
Loading
Please register or sign in to comment