[cfe-commits] r39722 - /cfe/cfe/trunk/Parse/ParseStmt.cpp
clattner at cs.uiuc.edu
clattner at cs.uiuc.edu
Wed Jul 11 09:47:32 PDT 2007
Author: clattner
Date: Wed Jul 11 11:47:32 2007
New Revision: 39722
URL: http://llvm.org/viewvc/llvm-project?rev=39722&view=rev
Log:
In code like this:
typedef float float4 __attribute__((vector_size (16)));
void addFloat4(float4 a, float4 b) {
float4 temp;
}
make sure to add 'temp' to the stmt tree as a declstmt.
Modified:
cfe/cfe/trunk/Parse/ParseStmt.cpp
Modified: cfe/cfe/trunk/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Parse/ParseStmt.cpp?rev=39722&r1=39721&r2=39722&view=diff
==============================================================================
--- cfe/cfe/trunk/Parse/ParseStmt.cpp (original)
+++ cfe/cfe/trunk/Parse/ParseStmt.cpp Wed Jul 11 11:47:32 2007
@@ -233,9 +233,8 @@
Declarator DeclaratorInfo(DS, Declarator::BlockContext);
ParseDeclarator(DeclaratorInfo);
- ParseInitDeclaratorListAfterFirstDeclarator(DeclaratorInfo);
- // FIXME: Return this as a declstmt.
- return 0;
+ DeclTy *Decl = ParseInitDeclaratorListAfterFirstDeclarator(DeclaratorInfo);
+ return Decl ? Actions.ParseDeclStmt(Decl) : 0;
}
// Otherwise, this is an expression. Seed it with II and parse it.
More information about the cfe-commits
mailing list