Clang import; forward class declaration
This commit is contained in:
parent
00e017722f
commit
05a34142aa
|
@ -533,7 +533,8 @@ Token *clangimport::AstNode::createTokens(TokenList *tokenList)
|
|||
if (nodeType == CXXOperatorCallExpr)
|
||||
return createTokensCall(tokenList);
|
||||
if (nodeType == CXXRecordDecl) {
|
||||
createTokensForCXXRecord(tokenList);
|
||||
if (!children.empty())
|
||||
createTokensForCXXRecord(tokenList);
|
||||
return nullptr;
|
||||
}
|
||||
if (nodeType == CXXStaticCastExpr) {
|
||||
|
|
|
@ -43,6 +43,7 @@ private:
|
|||
TEST_CASE(cxxMemberCall);
|
||||
TEST_CASE(cxxNullPtrLiteralExpr);
|
||||
TEST_CASE(cxxOperatorCallExpr);
|
||||
TEST_CASE(cxxRecordDecl1);
|
||||
TEST_CASE(cxxStaticCastExpr1);
|
||||
TEST_CASE(cxxStaticCastExpr2);
|
||||
TEST_CASE(forStmt);
|
||||
|
@ -255,6 +256,11 @@ private:
|
|||
ASSERT_EQUALS("void foo ( ) { C c@1 ; c@1 . operator= ( 4 ) ; }", parse(clang));
|
||||
}
|
||||
|
||||
void cxxRecordDecl1() {
|
||||
const char clang[] = "`-CXXRecordDecl 0x34cc5f8 <1.cpp:2:1, col:7> col:7 class Foo";
|
||||
ASSERT_EQUALS("", parse(clang));
|
||||
}
|
||||
|
||||
void cxxStaticCastExpr1() {
|
||||
const char clang[] = "`-VarDecl 0x2e0e650 <a.cpp:2:1, col:27> col:5 a 'int' cinit\n"
|
||||
" `-CXXStaticCastExpr 0x2e0e728 <col:9, col:27> 'int' static_cast<int> <NoOp>\n"
|
||||
|
|
Loading…
Reference in New Issue