Hi, no body was interested on this topic?? :(
I create a minimal sample, which has a simple interpreter to show how codecompletion works. My project was linked to clang's index.
see https://quexparser.googlecode.com/svn/trunk/clang
Now, here is my test code: (test.cpp)
#include <vector>
using namespace std;
class AAA
{
public:
int aaa;
int bbb;
};
int myfunction()
{
AAA a;
//a.
std::vector<AAA> b;
b[1].
return 0;
}
and here is the log output:
code completion demo project with lib clang support!!! asmwarrior
ollydbg from codeblocks forum
it will bydefault open the test.cpp file!
* to show the code completion list, please enter the command
cc line column [ENTER]
* to exit, just enterexit [ENTER]
cc 20 8
ClassDecl:{TypedText AAA}{Text ::} (75)
FieldDecl:{ResultType int}{TypedText aaa} (35)
FieldDecl:{ResultType int}{TypedText bbb} (35)
CXXMethod:{ResultType AAA &}{TypedText operator=}{LeftParen (}{Placeholder const
AAA &}{RightParen )} (34)
CXXDestructor:{ResultType void}{TypedText ~AAA}{LeftParen (}{RightParen )} (34)
Please note I have use a feature called:
CXTranslationUnit_PrecompiledPreamble
Here is the explanation:
Used to indicate that the translation unit should be built with an implicit precompiled header for the preamble.
An implicit precompiled header is used as an optimization when a particular translation unit is likely to be reparsed many times when the sources aren't changing that often. In this case, an implicit precompiled header will be built containing all of the initial includes at the top of the main file (what we refer to as the "preamble" of the file). In subsequent parses, if the preamble or the files in it have not changed, clang_reparseTranslationUnit() will re-use the implicit precompiled header to improve parsing performance.
see:
clang: clang: Translation unit manipulation (http://clang.llvm.org/doxygen/group__CINDEX__TRANSLATION__UNIT.html#ggab1e4965c1ebe8e41d71e90203a723fe9a7c55905793254bd43d9f46964b1883fa)
Even you edit the source file, then a implicit PCH will build internally. So, the performance is quite good.
ollydbg/asmwarrior