Commit Graph

4356 Commits

Author SHA1 Message Date
Gabor Greif d36afd7d65 tracking API changes arising from r49277
llvm-svn: 49279
2008-04-06 20:42:52 +00:00
Chris Lattner 784903e4c1 move a semantic check out of the parser into sema.
llvm-svn: 49273
2008-04-06 07:49:57 +00:00
Chris Lattner 371ed4e7a9 now that identifier list parsing is split out, simplify handling of
normal typed argument lists.

llvm-svn: 49272
2008-04-06 06:57:35 +00:00
Chris Lattner 285a3e47be reject 'int test(x, x) int x; {}'
llvm-svn: 49271
2008-04-06 06:50:56 +00:00
Chris Lattner 67b450cb48 reject 'typedef int y; int test(x, y)'.
llvm-svn: 49270
2008-04-06 06:47:48 +00:00
Chris Lattner 9186f556cc simplify Parser::ParseFunctionDeclaratorIdentifierList
llvm-svn: 49269
2008-04-06 06:39:19 +00:00
Chris Lattner 6c940e6e6a split parsing of identifier lists in function declarators out into
their own method.

llvm-svn: 49268
2008-04-06 06:34:08 +00:00
Chris Lattner 69740a60b6 minor simplification
llvm-svn: 49267
2008-04-06 06:03:03 +00:00
Chris Lattner 65dd843cb4 finish up throw parsing.
llvm-svn: 49266
2008-04-06 06:02:23 +00:00
Chris Lattner c0a1c7d387 split code for handling grouping parens in declarators from code that
handles function argument parens in declarators.

llvm-svn: 49265
2008-04-06 05:45:57 +00:00
Chris Lattner c439f0de6d another minor simplification
llvm-svn: 49264
2008-04-06 05:27:21 +00:00
Chris Lattner 521ff2b430 Use token lookahead to simplify some code that is rarely executed.
Since it is rare, the cost is not significant and we enjoy the 
simplification.

llvm-svn: 49263
2008-04-06 05:26:30 +00:00
Chris Lattner 713e6592be Fix a bug I introduced in my const'ification patch.
llvm-svn: 49262
2008-04-06 05:25:03 +00:00
Chris Lattner 0a5ff0d34a This patch contains these changes:
-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl

Patch by Argiris Kirtzidis!

llvm-svn: 49261
2008-04-06 04:47:34 +00:00
Chris Lattner e8e1e1131d fix css font name, patch by Cédric Venet
llvm-svn: 49260
2008-04-06 04:37:21 +00:00
Chris Lattner 53adca6610 don't dereference hte end iterator when inserting at end of buffer.
Patch by Cédric Venet!

llvm-svn: 49259
2008-04-06 04:36:15 +00:00
Chris Lattner 1e830c07a2 templates can't be static.
llvm-svn: 49258
2008-04-06 04:22:39 +00:00
Chris Lattner 157dd0811e fix a number of const qualification bugs.
llvm-svn: 49257
2008-04-06 04:11:27 +00:00
Chris Lattner c4f02b6bed add a missing #include
llvm-svn: 49256
2008-04-06 04:02:29 +00:00
Chris Lattner 9d51f2b9d4 Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999.

llvm-svn: 49251
2008-04-05 06:32:51 +00:00
Chris Lattner 94fc8063b4 Step #1 to fixing PR2012: c89 allows declspecs to be completely
missing from function definitions only.  If we see a function 
definiton with missing declspecs, just fudge in an int.

llvm-svn: 49250
2008-04-05 05:52:15 +00:00
Steve Naroff 4dbab8a49d Avoid implicitly including any header files (requested by ckane).
llvm-svn: 49241
2008-04-04 22:58:22 +00:00
Steve Naroff af91b9ae13 Rewrite @package (an ObjC 2.0 idiom).
llvm-svn: 49238
2008-04-04 22:34:24 +00:00
Steve Naroff eae91700de Fix MS-specific bug in RewriteTest::RewriteObjCMethodDecl().
llvm-svn: 49237
2008-04-04 22:23:44 +00:00
Steve Naroff e421e97f1b Add BugReporter.cpp to VC++ project file.
llvm-svn: 49233
2008-04-04 21:24:02 +00:00
Steve Naroff a1f414517c Support MS-specific integer suffixes (i8, i16, i32, i64, i128).
llvm-svn: 49229
2008-04-04 21:02:54 +00:00
Chris Lattner 579a05d767 Fix PR2049, updating Eli's patch that fixes to mainline. This produces incorrect
code, but the codegen doesn't crash.  I'll file a bugzilla for the AST being wrong.

llvm-svn: 49226
2008-04-04 18:42:16 +00:00
Steve Naroff c7d38433cd Rename ScopedDecl::getContext() -> getContextDecl(). Two motivations:
#1: To be consistent with FieldDecl::getContextDecl(), which serves the same purpose.
#2: From my perspective, getContext() is too general (and used by several other classes for different purposes).

llvm-svn: 49224
2008-04-04 18:15:49 +00:00
Steve Naroff 8164ca61b1 Add DeclBase.h to Xcode project.
llvm-svn: 49223
2008-04-04 18:04:30 +00:00
Chris Lattner f3bc75afcf Since isComplexType() no longer returns true for _Complex integers, the code
generator needs to call isAnyComplexType().  This fixes PR1960.

llvm-svn: 49220
2008-04-04 16:54:41 +00:00
Chris Lattner 50ad37b6d9 add an isAnyComplexType() method, which returns true for both
integer and FP complexes.

llvm-svn: 49219
2008-04-04 16:51:46 +00:00
Chris Lattner 019193acea updates from David.
llvm-svn: 49217
2008-04-04 15:59:59 +00:00
Chris Lattner 15c6b7c948 various bug fixes, add to xcode project.
llvm-svn: 49216
2008-04-04 15:47:22 +00:00
Chris Lattner 6175bbbee2 initial checkin of Étoilé runtime support, patch by David Chisnall
llvm-svn: 49215
2008-04-04 15:45:52 +00:00
Steve Naroff 3913ea4bfb Add explicit support for diagnosing implicit function decls.
Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well.

llvm-svn: 49214
2008-04-04 14:32:09 +00:00
Seo Sanghyeon b7bf0f3e1e - ccc: print generated command line to stdout instead of stderr
- ccc: quote shell metacharacters in command line to ease copy-and-paste

llvm-svn: 49213
2008-04-04 11:02:21 +00:00
Seo Sanghyeon 055c94f2f8 PR1963: Address of function is a constant expression
llvm-svn: 49212
2008-04-04 09:45:30 +00:00
Torok Edwin 602647aa70 fix build error: add missing braces.
llvm-svn: 49209
2008-04-04 06:16:25 +00:00
Chris Lattner c5ffed4a66 Introduce ContextDecl, patch by Argiris Kirtzidis!
-Added ContextDecl (no TranslationUnitDecl)
-ScopedDecl class has a ContextDecl member
-FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily
-FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context.
-Moved Decl class to a "DeclBase.h" along with ContextDecl class
-CurContext is handled by Sema

llvm-svn: 49208
2008-04-04 06:12:32 +00:00
Chris Lattner 5506f8cf4c Codegen assignment to self correctly, patch by David Chisnall!
llvm-svn: 49201
2008-04-04 04:07:35 +00:00
Nate Begeman 002e4bd158 Ignore qualifiers when checking vector operands, just like scalar operands.
This prevents things like 
a += b[0]; where a is a float4 and b is a float4 * (address_space 1)

llvm-svn: 49199
2008-04-04 01:30:25 +00:00
Ted Kremenek d1a2efadba Added investigate patch for an occasionally failing assertion (heisenbug?)
llvm-svn: 49193
2008-04-03 21:44:24 +00:00
Ted Kremenek bf191c76bd Remove bogus check to prune out analyzing files.
llvm-svn: 49191
2008-04-03 21:29:11 +00:00
Ted Kremenek 4c32d1fcce More reliably remove '\n' from queries of the location of ccc-analyzer
llvm-svn: 49189
2008-04-03 21:17:14 +00:00
Ted Kremenek 0dcd309044 Use full path to ccc-analyzer.
llvm-svn: 49187
2008-04-03 20:08:18 +00:00
Nate Begeman 11b6bb408e Teach clang how to codegen punpcklbw and punpcklwd
llvm-svn: 49186
2008-04-03 19:58:06 +00:00
Ted Kremenek d068813464 Make typedefs public.
llvm-svn: 49185
2008-04-03 19:52:45 +00:00
Ted Kremenek 10569cdd87 Better range highlight for undefined-argument checks.
llvm-svn: 49184
2008-04-03 18:52:25 +00:00
Ted Kremenek 5f5592062b When reporting "bad receiver" warnings, highlight the receiver.
llvm-svn: 49183
2008-04-03 18:46:16 +00:00
Ted Kremenek 89575b7bcb Use "getRanges" in default implementation of "getEndPath" to determine
the ranges of highlighted elements in the source code.

llvm-svn: 49181
2008-04-03 18:00:37 +00:00