aboutsummaryrefslogtreecommitdiff
path: root/Parse/Parser.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2007-09-12 14:07:44 +0000
committerSteve Naroff <snaroff@apple.com>2007-09-12 14:07:44 +0000
commitbb204693855fe87a6e4b23dfd053722026dbe87c (patch)
treedf19766a862976819cb17a5cdcb6ec24b7d482a1 /Parse/Parser.cpp
parent155383b0fcd0a12a103310010f8c0d084b90b090 (diff)
Fix the following bug submitted by Ted Kremenek:
void func() { int xx = xx; // incorrectly diagnosed 'xx' as an undeclared identifier. } This smallish bug resulted in a largish fix. Here are some highlights: - Needed to make sure ParseDeclarator is called *before* parsing any initializer. Removed the "Init" argument to ParseDeclarator. - Added AddInitializerToDecl() to the Action & Sema classes. In Sema, this hook is responsible for validating the initializer and installing it into the respective decl. - Moved several semantic checks from ParseDeclarator() to FinalizeDeclaratorGroup(). Previously, this hook was only responsible for reversing a list. Now it plays a much larger semantic role. All of the above changes ended up simplifying ParseDeclarator(), which is goodness... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Parse/Parser.cpp')
-rw-r--r--Parse/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parse/Parser.cpp b/Parse/Parser.cpp
index da1bb527d9..21ef54da0f 100644
--- a/Parse/Parser.cpp
+++ b/Parse/Parser.cpp
@@ -242,7 +242,7 @@ void Parser::Initialize() {
Declarator D(DS, Declarator::FileContext);
D.SetIdentifier(PP.getIdentifierInfo("__builtin_va_list"),SourceLocation());
- Actions.ParseDeclarator(CurScope, D, 0, 0);
+ Actions.ParseDeclarator(CurScope, D, 0);
}
if (Tok.getKind() == tok::eof &&