summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CXString.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Clean up use of C allocation functionsSerge Pavlov2018-02-211-1/+1
| | | | | | | | | | | | | | | | If the value returned by `malloc`, `calloc` or `realloc` is not checked for null pointer, this change replaces them for `safe_malloc`, `safe_calloc` or `safe_realloc`, which are defined in the namespace `llvm`. These function report fatal error on out of memory. In the plain C files, assertion statements are added to ensure that memory is successfully allocated. The aim of this change is to get better diagnostics of OOM on Windows. Differential Revision: https://reviews.llvm.org/D43017 llvm-svn: 325661
* [libclang] Remove the 'extern "C"' blocks from the implementation files.Argyrios Kyrtzidis2016-12-171-3/+0
| | | | | | | These are unnecessary, the declarations already carry the 'extern C' property, and if there is mismatch between declaration and definition then we will get linker errors via libclang.exports. llvm-svn: 290025
* [NFC] Header cleanupMehdi Amini2016-07-181-1/+0
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
* Try to fix leak in CXStringSet from r252853Reid Kleckner2015-11-181-0/+2
| | | | llvm-svn: 253418
* libclang: add new StringSet typeSaleem Abdulrasool2015-11-121-0/+15
| | | | | | | This allows the return of a set of CXStrings from libclang. This is setup work for an upcoming change to permit returning multiple mangled symbols. llvm-svn: 252852
* [C++11] Use 'nullptr'. Tools edition.Craig Topper2014-06-081-1/+1
| | | | llvm-svn: 210422
* Avoid dubious IdentifierInfo::getNameStart() usesAlp Toker2014-06-071-1/+5
| | | | | | | | These cases in particular were incurring an extra strlen() when we already knew the length. They appear to be leftovers from when the interfaces worked with C strings that have continued to compile due to the implicit StringRef ctor. llvm-svn: 210403
* libclang: wrap CXString implementation into 'namespace cxstring'Dmitri Gribenko2013-02-031-19/+24
| | | | | | This removes quite a few 'cxstring::' qualifications where they are obvious. llvm-svn: 174286
* libclang: introduce cxstring::{createRef,createDup} for StringRefsDmitri Gribenko2013-02-021-11/+18
| | | | | | Also migrate all clients from the old API. llvm-svn: 174263
* libclang: introduce cxstring::{createRef,createDup} for C stringsDmitri Gribenko2013-02-021-8/+19
| | | | | | Also migrate all clients from the old API. llvm-svn: 174238
* libclang: add comments for CXStringFlagDmitri Gribenko2013-02-011-1/+12
| | | | llvm-svn: 174194
* libclang: itroduce cxstring::createEmpty()Dmitri Gribenko2013-02-011-0/+7
| | | | llvm-svn: 174174
* libclang: introduce cxstring::createNull()Dmitri Gribenko2013-02-011-0/+7
| | | | llvm-svn: 174173
* libclang: refactor CXStringPool: make it a classDmitri Gribenko2013-01-261-26/+18
| | | | | | | We are not exposing the pool or string buffers to libclang users, so no need to maintain a procedural interface. llvm-svn: 173595
* libclang: use C++ casts in CXString.cppDmitri Gribenko2013-01-111-4/+5
| | | | llvm-svn: 172272
* libclang: constness for CXStringDmitri Gribenko2013-01-111-3/+3
| | | | llvm-svn: 172270
* Sort #include lines for tools/...Chandler Carruth2012-12-041-1/+1
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* [libclang] Workaround potential race condition with code completion ↵Ted Kremenek2011-08-171-0/+4
| | | | | | | | | AllocatedResults being freed after a CXTranslationUnit. The Container USR's CXString had its underlying data owned by the CXTranslationUnit's string pool. This would result in trying to access freed memory. llvm-svn: 137887
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-1/+1
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Make definition of CXTranslationUnitImpl privateTed Kremenek2010-11-171-0/+1
| | | | | | to libclang. llvm-svn: 119585
* Change CXTranslationUnit to not directly cast to an ASTUnit*,Ted Kremenek2010-11-161-8/+70
| | | | | | | | | | | | | | | | | | | but to wrap both an ASTUnit and a "string pool" that will be used for fast USR generation. This requires a bunch of mechanical changes, as there was a ton of code that assumed that CXTranslationUnit and ASTUnit* were the same. Along with this change, introduce CXStringBuf, which provides an llvm::SmallVector<char> backing for repeatedly generating CXStrings without a huge amount of malloc() traffic. This requires making some changes to the representation of CXString by renaming a few fields (but keeping the size of the object the same). llvm-svn: 119337
* Add CXString.cpp and CXString.hTed Kremenek2010-11-161-0/+67
llvm-svn: 119322
OpenPOWER on IntegriCloud