search for: pollnossa

Displaying 3 results from an estimated 3 matches for "pollnossa".

2015 Jul 11
2
[LLVMdev] StringMap question
Hello everyone! I'm a newcomer for the great LLVM project. I've started to explore the source code of LLVM project to become more familiar with it, and I've found some strange usage of move semantics in constructor of StringMapImpl( StringMapImpl &&RHS) {...} class in include/llvm/ADT/StringMap.h line 56. Could anyone explain me the purpose of zeroing of all fields of RHS in
2015 Jul 29
1
[LLVMdev] Clang: strange malloc usage
Hello everyone! I've found weird lines of code in tools/libclang/CIndex.cpp file in clang sources. Function clang_tokenize holds the following lines: *Tokens = (CXToken *)malloc(sizeof(CXToken) * CXTokens.size()); memmove(*Tokens, CXTokens.data(), sizeof(CXToken) * CXTokens.size()); Since malloc function can return null pointer and there are no checks for this case, memmove invocation
2015 Jul 29
0
[LLVMdev] Clang
Hello everyone! I've found strange code in tools/libclang/CIndex.cpp in function clang_tokenize(). Lines 5570*Tokens = (CXToken *)malloc(sizeof(CXToken) * CXTokens.size()); memmove(*Tokens, CXTokens.data(), sizeof(CXToken) * CXTokens.size()); seem weird without checking the result of malloc-function invocation. Since malloc() can return null pointer, this value can be used in memmove