diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-02-23 00:52:04 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-02-23 00:52:04 +0000 |
| commit | 471733d84639fcea35d7876940d7d32fa575e158 (patch) | |
| tree | 5fae806423561e9ef4a37a706f4bd80434992b6f /CodeGen/CodeGenFunction.cpp | |
| parent | d156d536e1fb9defcf187da64e7765ec058580eb (diff) | |
Patch from Argiris Kirtzidis:
The patch fixes some debug assertions that the msvcrt throws:
1)
- if (isprint(value) && value < 256) {
+ if (value < 256 && isprint(value)) {
isprint() does an assertion check of its own for value < 256; check value before calling it to prevent it.
2)
- Stmt->Names.push_back(std::string(&data[0], data.size()));
+ if (data.size() == 0)
+ Stmt->Names.push_back(std::string());
+ else
+ Stmt->Names.push_back(std::string(&data[0], data.size()));
If data.size() == 0 then data[0] throws "out of range" assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
