No completion candidates for a template case

Liang Wang <[email protected]> Fri, 9 Oct 2015 16:22:09 -0700
Newsgroups gmane.emacs.semantic
Message-ID <CAO+NnCZDBrPy077bNJD0yuRT5bVpkqB1CDROJcHJ6VtA-QrPBg@mail.gmail.com>
Hi,

In the following c++ case, there is no completion candidates for local
variable b in the main function. I'm new to semantic. Can someone tell
me where I should start looking in the source code to debug this
problem?

template<typename T>
struct isPodLike {
  static const bool value = false;
};

template<>
struct isPodLike<int> {
  static const bool value = true;
};

template<typename T, bool isPod>
class A {
public:
  A();
  void foo() {}
};

template<typename T>
class B : public A<T, isPodLike<T>::value> { // A<T, true> works
public:
  void bar() {}
};

int main(int argc, char *argv[])
{
  B<int> b;
  b. // no completion candidates
  return 0;
}


I tried M-x semantic-analyze-current-context and here is the first
part of output. It seems that prefix types are not found for b.

Context Type: #<semantic-analyze-context semantic-analyze-context>
Bounds: (396 . 396)
Prefix: B b
        ""
Prefix Classes: 'function
                'variable
                'type
Prefix Types: 'nil
Encountered Errors: <none>


Btw, the real case is LLVM's SmallVector.


Thanks,
Liang

------------------------------------------------------------------------------