samedi 4 février 2017

CodeLite 10.0.1 cannot autocomplete for iterators?

I'm programming C++11 on Ubuntu 16.04 using CodeLite 10.0.1.

A snippet from my project is as follows:

#include "llvm/Pass.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
#include <string>

.............

    for (Function::iterator bb = F.begin(), e = F.end(); bb != e; ++bb) {
        bb-> // NO AUTOCOMPLETE SUGGESTIONS
        // assign integer ids to BasicBlock's
        if (bb->hasName()) {
            bbNameToId[bb->getName()] = bbId++; 
        } else {
            bb->setName(Twine(bbName + std::to_string(bbId)));
            bbNameToId[bb->getName()] = bbId++;
        }

        for (BasicBlock::iterator i = bb->begin(), e = bb->end(); i != e; ++i) {
            if(opCounter.find(i->getOpcodeName()) == opCounter.end()) {
                opCounter[i->getOpcodeName()] = 1;
            } else {
                opCounter[i->getOpcodeName()] += 1;
            }
        }
    }

Now, CodeLite can easily do autocomplete suggestions for Functions like F in the code above. However, there are no suggestions for bb->, which is a Function::iterator. Also, code completion works for everything declared in the C++ standard library.

The code completion search path is set up as follows:

/usr/include
/usr/include/c++/5
/usr/include/c++/5/backward
/usr/include/x86_64-linux-gnu
/usr/include/x86_64-linux-gnu/c++/5
/usr/lib/gcc/x86_64-linux-gnu/5/include
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
/usr/local/include 

and the project builds fine. I've enabled both CTags and Clang completion.

How can I fix this?

Aucun commentaire:

Enregistrer un commentaire