blob: cc89a90c220658505b0455faa8e02076837761c6 [file] [log] [blame]
Chris Lattnercc67ec12006-11-09 06:54:47 +00001//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
Chris Lattner7cee11f2006-11-03 06:42:29 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by Chris Lattner and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
Chris Lattnercc67ec12006-11-09 06:54:47 +000010// This file defines the Sema class, which performs semantic analysis and
11// builds ASTs.
Chris Lattner7cee11f2006-11-03 06:42:29 +000012//
13//===----------------------------------------------------------------------===//
14
Chris Lattnercc67ec12006-11-09 06:54:47 +000015#ifndef LLVM_CLANG_AST_SEMA_H
16#define LLVM_CLANG_AST_SEMA_H
Chris Lattner7cee11f2006-11-03 06:42:29 +000017
18#include "clang/Parse/Action.h"
Chris Lattnere2473062007-05-28 06:28:18 +000019#include "llvm/ADT/DenseMap.h"
Chris Lattner7cee11f2006-11-03 06:42:29 +000020#include <vector>
Chris Lattnereaafe1222006-11-10 05:17:58 +000021#include <string>
Chris Lattner7cee11f2006-11-03 06:42:29 +000022
23namespace llvm {
24namespace clang {
Chris Lattnercb6a3822006-11-10 06:20:45 +000025 class ASTContext;
Chris Lattner7cee11f2006-11-03 06:42:29 +000026 class Preprocessor;
27 class Decl;
Steve Naroff78403362007-04-02 22:55:05 +000028 class Expr;
Chris Lattnerc5cdf4d2007-01-21 07:42:07 +000029 class VarDecl;
Chris Lattner01564d92007-01-27 19:27:06 +000030 class TypedefDecl;
31 class FunctionDecl;
Steve Naroffe5aa9be2007-04-05 22:36:20 +000032 class QualType;
Chris Lattnerac18be92006-11-20 06:49:47 +000033 class LangOptions;
Chris Lattnerc5cdf4d2007-01-21 07:42:07 +000034 class DeclaratorChunk;
Steve Naroff8160ea22007-03-06 01:09:46 +000035 class LexerToken;
Steve Naroff35d85152007-05-07 00:24:15 +000036 class IntegerLiteral;
Steve Naroff8eeeb132007-05-08 21:09:37 +000037 class ArrayType;
Chris Lattnere2473062007-05-28 06:28:18 +000038 class LabelStmt;
Chris Lattner7cee11f2006-11-03 06:42:29 +000039
Chris Lattnercc67ec12006-11-09 06:54:47 +000040/// Sema - This implements semantic analysis and AST building for C.
41class Sema : public Action {
Steve Naroff38d31b42007-02-28 01:22:02 +000042 Preprocessor &PP;
43
Chris Lattnercb6a3822006-11-10 06:20:45 +000044 ASTContext &Context;
Chris Lattner7cee11f2006-11-03 06:42:29 +000045
Chris Lattner229ce602006-11-21 01:21:07 +000046 /// CurFunctionDecl - If inside of a function body, this contains a pointer to
47 /// the function decl for the function being parsed.
48 FunctionDecl *CurFunctionDecl;
49
Chris Lattner7cee11f2006-11-03 06:42:29 +000050 /// LastInGroupList - This vector is populated when there are multiple
51 /// declarators in a single decl group (e.g. "int A, B, C"). In this case,
52 /// all but the last decl will be entered into this. This is used by the
53 /// ASTStreamer.
54 std::vector<Decl*> &LastInGroupList;
Chris Lattnere2473062007-05-28 06:28:18 +000055
56 /// LabelMap - This is a mapping from label identifiers to the LabelStmt for
57 /// it (which acts like the label decl in some ways). Forward referenced
58 /// labels have a LabelStmt created for them with a null location & SubStmt.
59 DenseMap<IdentifierInfo*, LabelStmt*> LabelMap;
Chris Lattner7cee11f2006-11-03 06:42:29 +000060public:
Steve Naroff2c055d22007-02-28 19:32:13 +000061 Sema(Preprocessor &pp, ASTContext &ctxt, std::vector<Decl*> &prevInGroup);
Chris Lattner7cee11f2006-11-03 06:42:29 +000062
Chris Lattnerac18be92006-11-20 06:49:47 +000063 const LangOptions &getLangOptions() const;
64
Steve Naroff71ce2e02007-05-18 22:53:50 +000065 /// The primitive diagnostic helpers - always returns true, which simplifies
66 /// error handling (i.e. less code).
Chris Lattnerd6647d32007-05-16 17:56:50 +000067 bool Diag(SourceLocation Loc, unsigned DiagID);
68 bool Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg);
69 bool Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg1,
70 const std::string &Msg2);
Steve Naroff71ce2e02007-05-18 22:53:50 +000071
72 /// More expressive diagnostic helpers for expressions (say that 6 times:-)
73 bool Diag(SourceLocation Loc, unsigned DiagID, SourceRange R1);
74 bool Diag(SourceLocation Loc, unsigned DiagID,
75 SourceRange R1, SourceRange R2);
76 bool Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg,
77 SourceRange R1);
78 bool Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg,
79 SourceRange R1, SourceRange R2);
80 bool Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg1,
81 const std::string &Msg2, SourceRange R1);
82 bool Diag(SourceLocation Loc, unsigned DiagID,
83 const std::string &Msg1, const std::string &Msg2,
84 SourceRange R1, SourceRange R2);
85
Chris Lattner7cee11f2006-11-03 06:42:29 +000086 //===--------------------------------------------------------------------===//
Chris Lattnerf84a79c2006-11-11 22:59:23 +000087 // Type Analysis / Processing: SemaType.cpp.
88 //
Steve Naroffe5aa9be2007-04-05 22:36:20 +000089 QualType GetTypeForDeclarator(Declarator &D, Scope *S);
Chris Lattnerf84a79c2006-11-11 22:59:23 +000090
Chris Lattner33e8a552006-11-19 01:48:02 +000091 virtual TypeResult ParseTypeName(Scope *S, Declarator &D);
Chris Lattnerf84a79c2006-11-11 22:59:23 +000092
Chris Lattner216d8652006-12-02 06:47:41 +000093 virtual TypeResult ParseParamDeclaratorType(Scope *S, Declarator &D);
Steve Naroff26c8ea52007-03-21 21:08:52 +000094private:
Chris Lattnerf84a79c2006-11-11 22:59:23 +000095 //===--------------------------------------------------------------------===//
Chris Lattnere168f762006-11-10 05:29:30 +000096 // Symbol table / Decl tracking callbacks: SemaDecl.cpp.
Chris Lattner7cee11f2006-11-03 06:42:29 +000097 //
Chris Lattner2ebe4bb2006-11-20 01:29:42 +000098 virtual DeclTy *isTypeName(const IdentifierInfo &II, Scope *S) const;
Chris Lattner7cee11f2006-11-03 06:42:29 +000099 virtual DeclTy *ParseDeclarator(Scope *S, Declarator &D, ExprTy *Init,
100 DeclTy *LastInGroup);
Chris Lattnerc5cdf4d2007-01-21 07:42:07 +0000101 virtual DeclTy *ParseStartOfFunctionDef(Scope *S, Declarator &D);
Chris Lattner229ce602006-11-21 01:21:07 +0000102 virtual DeclTy *ParseFunctionDefBody(DeclTy *Decl, StmtTy *Body);
Chris Lattner7cee11f2006-11-03 06:42:29 +0000103 virtual void PopScope(SourceLocation Loc, Scope *S);
Chris Lattner01564d92007-01-27 19:27:06 +0000104
Chris Lattner200bdc32006-11-19 02:43:37 +0000105 /// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with
106 /// no declarator (e.g. "struct foo;") is parsed.
107 virtual DeclTy *ParsedFreeStandingDeclSpec(Scope *S, DeclSpec &DS);
108
Chris Lattner7b9ace62007-01-23 20:11:08 +0000109 virtual DeclTy *ParseTag(Scope *S, unsigned TagType, TagKind TK,
Chris Lattnerf34c4da2007-01-23 04:08:05 +0000110 SourceLocation KWLoc, IdentifierInfo *Name,
111 SourceLocation NameLoc);
Chris Lattner1300fb92007-01-23 23:42:53 +0000112 virtual DeclTy *ParseField(Scope *S, DeclTy *TagDecl,SourceLocation DeclStart,
113 Declarator &D, ExprTy *BitfieldWidth);
114 virtual void ParseRecordBody(SourceLocation RecLoc, DeclTy *TagDecl,
115 DeclTy **Fields, unsigned NumFields);
Chris Lattnerc1915e22007-01-25 07:29:02 +0000116 virtual DeclTy *ParseEnumConstant(Scope *S, DeclTy *EnumDecl,
117 SourceLocation IdLoc, IdentifierInfo *Id,
118 SourceLocation EqualLoc, ExprTy *Val);
119 virtual void ParseEnumBody(SourceLocation EnumLoc, DeclTy *EnumDecl,
120 DeclTy **Elements, unsigned NumElements);
Steve Naroff3273c222007-03-14 21:52:03 +0000121private:
122 /// Subroutines of ParseDeclarator()...
123 TypedefDecl *ParseTypedefDecl(Scope *S, Declarator &D);
124 TypedefDecl *MergeTypeDefDecl(TypedefDecl *New, Decl *Old);
125 FunctionDecl *MergeFunctionDecl(FunctionDecl *New, Decl *Old);
126 VarDecl *MergeVarDecl(VarDecl *New, Decl *Old);
Steve Naroff26c8ea52007-03-21 21:08:52 +0000127 /// AddTopLevelDecl - called after the decl has been fully processed.
128 /// Allows for bookkeeping and post-processing of each declaration.
129 void AddTopLevelDecl(Decl *current, Decl *last);
Steve Naroff6fbf0dc2007-03-16 00:33:25 +0000130
Steve Naroff3273c222007-03-14 21:52:03 +0000131 /// More parsing and symbol table subroutines...
132 VarDecl *ParseParamDeclarator(DeclaratorChunk &FI, unsigned ArgNo,
133 Scope *FnBodyScope);
134 Decl *LookupScopedDecl(IdentifierInfo *II, unsigned NSI, SourceLocation IdLoc,
135 Scope *S);
136 Decl *LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S);
137 Decl *ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II,
138 Scope *S);
Chris Lattner1300fb92007-01-23 23:42:53 +0000139
Chris Lattner7cee11f2006-11-03 06:42:29 +0000140 //===--------------------------------------------------------------------===//
Chris Lattnere168f762006-11-10 05:29:30 +0000141 // Statement Parsing Callbacks: SemaStmt.cpp.
Steve Naroff3273c222007-03-14 21:52:03 +0000142public:
Chris Lattner0f203a72007-05-28 01:45:28 +0000143 virtual StmtResult ParseNullStmt(SourceLocation SemiLoc);
Chris Lattner7cee11f2006-11-03 06:42:29 +0000144 virtual StmtResult ParseCompoundStmt(SourceLocation L, SourceLocation R,
145 StmtTy **Elts, unsigned NumElts);
146 virtual StmtResult ParseExprStmt(ExprTy *Expr) {
Chris Lattner7cee11f2006-11-03 06:42:29 +0000147 return Expr; // Exprs are Stmts.
148 }
Chris Lattner6c0ff132006-11-05 00:19:50 +0000149 virtual StmtResult ParseCaseStmt(SourceLocation CaseLoc, ExprTy *LHSVal,
150 SourceLocation DotDotDotLoc, ExprTy *RHSVal,
151 SourceLocation ColonLoc, StmtTy *SubStmt);
152 virtual StmtResult ParseDefaultStmt(SourceLocation DefaultLoc,
153 SourceLocation ColonLoc, StmtTy *SubStmt);
154 virtual StmtResult ParseLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
155 SourceLocation ColonLoc, StmtTy *SubStmt);
Chris Lattner7cee11f2006-11-03 06:42:29 +0000156 virtual StmtResult ParseIfStmt(SourceLocation IfLoc, ExprTy *CondVal,
157 StmtTy *ThenVal, SourceLocation ElseLoc,
158 StmtTy *ElseVal);
Chris Lattnerf2174b62006-11-04 20:59:27 +0000159 virtual StmtResult ParseSwitchStmt(SourceLocation SwitchLoc, ExprTy *Cond,
160 StmtTy *Body);
Chris Lattner85ed8732006-11-04 20:40:44 +0000161 virtual StmtResult ParseWhileStmt(SourceLocation WhileLoc, ExprTy *Cond,
162 StmtTy *Body);
163 virtual StmtResult ParseDoStmt(SourceLocation DoLoc, StmtTy *Body,
164 SourceLocation WhileLoc, ExprTy *Cond);
165
Chris Lattner71e23ce2006-11-04 20:18:38 +0000166 virtual StmtResult ParseForStmt(SourceLocation ForLoc,
167 SourceLocation LParenLoc,
168 StmtTy *First, ExprTy *Second, ExprTy *Third,
169 SourceLocation RParenLoc, StmtTy *Body);
Chris Lattner16976d32006-11-05 01:46:01 +0000170 virtual StmtResult ParseGotoStmt(SourceLocation GotoLoc,
171 SourceLocation LabelLoc,
172 IdentifierInfo *LabelII);
173 virtual StmtResult ParseIndirectGotoStmt(SourceLocation GotoLoc,
174 SourceLocation StarLoc,
175 ExprTy *DestExp);
Chris Lattnereaafe1222006-11-10 05:17:58 +0000176 virtual StmtResult ParseContinueStmt(SourceLocation ContinueLoc,
177 Scope *CurScope);
178 virtual StmtResult ParseBreakStmt(SourceLocation GotoLoc, Scope *CurScope);
Chris Lattner71e23ce2006-11-04 20:18:38 +0000179
Chris Lattner7cee11f2006-11-03 06:42:29 +0000180 virtual StmtResult ParseReturnStmt(SourceLocation ReturnLoc,
181 ExprTy *RetValExp);
182
183 //===--------------------------------------------------------------------===//
Chris Lattnere168f762006-11-10 05:29:30 +0000184 // Expression Parsing Callbacks: SemaExpr.cpp.
Chris Lattner7cee11f2006-11-03 06:42:29 +0000185
186 // Primary Expressions.
Chris Lattnerac18be92006-11-20 06:49:47 +0000187 virtual ExprResult ParseIdentifierExpr(Scope *S, SourceLocation Loc,
188 IdentifierInfo &II,
189 bool HasTrailingLParen);
Chris Lattner7cee11f2006-11-03 06:42:29 +0000190 virtual ExprResult ParseSimplePrimaryExpr(SourceLocation Loc,
191 tok::TokenKind Kind);
Steve Naroff8160ea22007-03-06 01:09:46 +0000192 virtual ExprResult ParseNumericConstant(const LexerToken &);
Steve Naroffae4143e2007-04-26 20:39:23 +0000193 virtual ExprResult ParseCharacterConstant(const LexerToken &);
Chris Lattner7cee11f2006-11-03 06:42:29 +0000194 virtual ExprResult ParseParenExpr(SourceLocation L, SourceLocation R,
195 ExprTy *Val);
Chris Lattner697e5d62006-11-09 06:32:27 +0000196
Steve Naroffdf7855b2007-02-21 23:46:25 +0000197 /// ParseStringLiteral - The specified tokens were lexed as pasted string
Chris Lattner697e5d62006-11-09 06:32:27 +0000198 /// fragments (e.g. "foo" "bar" L"baz").
Steve Naroffdf7855b2007-02-21 23:46:25 +0000199 virtual ExprResult ParseStringLiteral(const LexerToken *Toks, unsigned NumToks);
Chris Lattner697e5d62006-11-09 06:32:27 +0000200
Chris Lattner7cee11f2006-11-03 06:42:29 +0000201 // Binary/Unary Operators. 'Tok' is the token for the operator.
202 virtual ExprResult ParseUnaryOp(SourceLocation OpLoc, tok::TokenKind Op,
203 ExprTy *Input);
204 virtual ExprResult
205 ParseSizeOfAlignOfTypeExpr(SourceLocation OpLoc, bool isSizeof,
206 SourceLocation LParenLoc, TypeTy *Ty,
207 SourceLocation RParenLoc);
208
209 virtual ExprResult ParsePostfixUnaryOp(SourceLocation OpLoc,
210 tok::TokenKind Kind, ExprTy *Input);
211
212 virtual ExprResult ParseArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
213 ExprTy *Idx, SourceLocation RLoc);
214 virtual ExprResult ParseMemberReferenceExpr(ExprTy *Base,SourceLocation OpLoc,
215 tok::TokenKind OpKind,
216 SourceLocation MemberLoc,
217 IdentifierInfo &Member);
218
219 /// ParseCallExpr - Handle a call to Fn with the specified array of arguments.
220 /// This provides the location of the left/right parens and a list of comma
221 /// locations.
222 virtual ExprResult ParseCallExpr(ExprTy *Fn, SourceLocation LParenLoc,
223 ExprTy **Args, unsigned NumArgs,
224 SourceLocation *CommaLocs,
225 SourceLocation RParenLoc);
226
227 virtual ExprResult ParseCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
228 SourceLocation RParenLoc, ExprTy *Op);
229
230 virtual ExprResult ParseBinOp(SourceLocation TokLoc, tok::TokenKind Kind,
231 ExprTy *LHS,ExprTy *RHS);
232
233 /// ParseConditionalOp - Parse a ?: operation. Note that 'LHS' may be null
234 /// in the case of a the GNU conditional expr extension.
235 virtual ExprResult ParseConditionalOp(SourceLocation QuestionLoc,
236 SourceLocation ColonLoc,
237 ExprTy *Cond, ExprTy *LHS, ExprTy *RHS);
Chris Lattner29375652006-12-04 18:06:35 +0000238
Chris Lattnereefa10e2007-05-28 06:56:27 +0000239 /// ParseAddrLabel - Parse the GNU address of label extension: "&&foo".
240 virtual ExprResult ParseAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc,
241 IdentifierInfo *LabelII);
242
Chris Lattner29375652006-12-04 18:06:35 +0000243 /// ParseCXXCasts - Parse {dynamic,static,reinterpret,const}_cast's.
244 virtual ExprResult ParseCXXCasts(SourceLocation OpLoc, tok::TokenKind Kind,
245 SourceLocation LAngleBracketLoc, TypeTy *Ty,
246 SourceLocation RAngleBracketLoc,
247 SourceLocation LParenLoc, ExprTy *E,
248 SourceLocation RParenLoc);
Bill Wendling4073ed52007-02-13 01:51:42 +0000249
250 /// ParseCXXBoolLiteral - Parse {true,false} literals.
251 virtual ExprResult ParseCXXBoolLiteral(SourceLocation OpLoc,
Bill Wendlingbf313b02007-02-13 20:09:46 +0000252 tok::TokenKind Kind);
Steve Naroff26c8ea52007-03-21 21:08:52 +0000253private:
Steve Naroff1926c832007-04-24 00:23:05 +0000254 QualType UsualUnaryConversion(QualType t); // C99 6.3
255 QualType UsualArithmeticConversions(QualType t1, QualType t2); // C99 6.3.1.8
256
Steve Naroff17f76e02007-05-03 21:03:48 +0000257 enum AssignmentConversionResult {
258 Compatible,
259 Incompatible,
260 PointerFromInt,
261 IntFromPointer,
Steve Naroff1f4d7272007-05-11 04:00:31 +0000262 IncompatiblePointer,
263 CompatiblePointerDiscardsQualifiers
Steve Naroff17f76e02007-05-03 21:03:48 +0000264 };
Steve Naroff218bc2b2007-05-04 21:54:46 +0000265 // Conversions for assignment, argument passing, initialization, and
266 // function return values. UsualAssignmentConversions is currently used by
267 // CheckSimpleAssignment, CheckCompoundAssignment and ParseCallExpr.
268 QualType UsualAssignmentConversions(QualType lhs, QualType rhs, // C99 6.5.16
Steve Naroff1f4d7272007-05-11 04:00:31 +0000269 AssignmentConversionResult &r);
Steve Naroff3f597292007-05-11 22:18:03 +0000270 // Helper function for UsualAssignmentConversions (C99 6.5.16.1p1)
271 QualType CheckPointerTypesForAssignment(QualType lhsType, QualType rhsType,
272 AssignmentConversionResult &r);
Steve Naroff9eb24652007-05-02 21:58:15 +0000273
Steve Naroff8eeeb132007-05-08 21:09:37 +0000274 /// the following "Check" methods will return a valid/converted QualType
275 /// or a null QualType (indicating an error diagnostic was issued).
276
Steve Naroff47500512007-04-19 23:00:49 +0000277 /// type checking binary operators (subroutines of ParseBinOp).
Steve Naroff6f49f5d2007-05-29 14:23:36 +0000278 inline void InvalidOperands(SourceLocation l, Expr *lex, Expr *rex);
Steve Naroff218bc2b2007-05-04 21:54:46 +0000279 inline QualType CheckMultiplyDivideOperands( // C99 6.5.5
280 Expr *lex, Expr *rex, SourceLocation OpLoc);
281 inline QualType CheckRemainderOperands( // C99 6.5.5
282 Expr *lex, Expr *rex, SourceLocation OpLoc);
283 inline QualType CheckAdditionOperands( // C99 6.5.6
284 Expr *lex, Expr *rex, SourceLocation OpLoc);
285 inline QualType CheckSubtractionOperands( // C99 6.5.6
286 Expr *lex, Expr *rex, SourceLocation OpLoc);
287 inline QualType CheckShiftOperands( // C99 6.5.7
288 Expr *lex, Expr *rex, SourceLocation OpLoc);
289 inline QualType CheckRelationalOperands( // C99 6.5.8
290 Expr *lex, Expr *rex, SourceLocation OpLoc);
291 inline QualType CheckEqualityOperands( // C99 6.5.9
292 Expr *lex, Expr *rex, SourceLocation OpLoc);
293 inline QualType CheckBitwiseOperands( // C99 6.5.[10...12]
294 Expr *lex, Expr *rex, SourceLocation OpLoc);
295 inline QualType CheckLogicalOperands( // C99 6.5.[13,14]
296 Expr *lex, Expr *rex, SourceLocation OpLoc);
Steve Naroff35d85152007-05-07 00:24:15 +0000297 // CheckAssignmentOperands is used for both simple and compound assignment.
298 // For simple assignment, pass both expressions and a null converted type.
299 // For compound assignment, pass both expressions and the converted type.
300 inline QualType CheckAssignmentOperands( // C99 6.5.16.[1,2]
301 Expr *lex, Expr *rex, SourceLocation OpLoc, QualType convertedType);
Steve Naroff218bc2b2007-05-04 21:54:46 +0000302 inline QualType CheckCommaOperands( // C99 6.5.17
Steve Naroffae4143e2007-04-26 20:39:23 +0000303 Expr *lex, Expr *rex, SourceLocation OpLoc);
Steve Narofff8a28c52007-05-15 20:29:32 +0000304 inline QualType CheckConditionalOperands( // C99 6.5.15
305 Expr *cond, Expr *lhs, Expr *rhs, SourceLocation questionLoc);
Steve Naroff95af0132007-03-30 23:47:58 +0000306
Steve Naroff47500512007-04-19 23:00:49 +0000307 /// type checking unary operators (subroutines of ParseUnaryOp).
Steve Naroff9358c712007-05-27 23:58:33 +0000308 /// C99 6.5.3.1, 6.5.3.2, 6.5.3.4
Steve Naroff71ce2e02007-05-18 22:53:50 +0000309 QualType CheckIncrementDecrementOperand(Expr *op, SourceLocation OpLoc);
310 QualType CheckAddressOfOperand(Expr *op, SourceLocation OpLoc);
311 QualType CheckIndirectionOperand(Expr *op, SourceLocation OpLoc);
312 QualType CheckSizeOfAlignOfOperand(QualType type, SourceLocation loc,
313 bool isSizeof);
Steve Naroff8eeeb132007-05-08 21:09:37 +0000314
315 // C99: 6.7.5p3: Used by ParseDeclarator/ParseField to make sure we have
316 // a constant expression of type int with a value greater than zero.
317 bool isConstantArrayType(ArrayType *ary, SourceLocation loc);
Chris Lattner7cee11f2006-11-03 06:42:29 +0000318};
319
320
321} // end namespace clang
322} // end namespace llvm
323
324#endif