start creating proper ast nodes for variables and functions
llvm-svn: 38991
diff --git a/clang/Parse/ParseDecl.cpp b/clang/Parse/ParseDecl.cpp
index da1e455a..121963a 100644
--- a/clang/Parse/ParseDecl.cpp
+++ b/clang/Parse/ParseDecl.cpp
@@ -136,6 +136,7 @@
}
// Inform the current actions module that we just parsed a declarator.
+ // TODO: pass asm & attributes.
Actions.ParseDeclarator(Tok.getLocation(), CurScope, D, Init.Val);
// If we don't have a comma, it is either the end of the list (a ';') or an
diff --git a/clang/Parse/Parser.cpp b/clang/Parse/Parser.cpp
index 2ba5015..d4710fb 100644
--- a/clang/Parse/Parser.cpp
+++ b/clang/Parse/Parser.cpp
@@ -338,13 +338,13 @@
Tok.getKind() == tok::kw_asm || // int X() __asm__ -> not a fn def
Tok.getKind() == tok::kw___attribute) {// int X() __attr__ -> not a fn def
// FALL THROUGH.
- } else if (DeclaratorInfo.isInnermostFunctionType() &&
+ } else if (DeclaratorInfo.isFunctionDeclarator() &&
(Tok.getKind() == tok::l_brace || // int X() {}
isDeclarationSpecifier())) { // int X(f) int f; {}
ParseFunctionDefinition(DeclaratorInfo);
return;
} else {
- if (DeclaratorInfo.isInnermostFunctionType())
+ if (DeclaratorInfo.isFunctionDeclarator())
Diag(Tok, diag::err_expected_fn_body);
else
Diag(Tok, diag::err_expected_after_declarator);