Commit Graph

3 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 89709ac2cc Fix this:
With this snippet:
  void f(a::b);

An assert is hit:
Assertion failed: CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token", file ..\..\lib\Lex\PPCaching.cpp, line 98

Introduce Preprocessor::RevertCachedTokens that reverts a specific number of tokens when backtracking is enabled.

llvm-svn: 59636
2008-11-19 15:22:16 +00:00
Argyrios Kyrtzidis 9e59b577d8 Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names.
e.g.:
  namespace A {
    void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A'
  }
  void A::f(); // SemanticDC == namespace 'A'
               // LexicalDC == global namespace

llvm-svn: 58948
2008-11-09 23:41:00 +00:00
Argyrios Kyrtzidis 16ac9be7f0 Implement Sema support for C++ nested-name-specifiers.
llvm-svn: 58916
2008-11-08 17:17:31 +00:00