summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix this bug:Argyrios Kyrtzidis2008-10-151-1/+3
| | | | | | | | | typedef int f(); struct S { f *x; // incorrectly assuming this is function decl, leading to failed assertions. }; llvm-svn: 57598
* Use BatchEmitOwnedPtrs for writing multiple child exprs, per review.Daniel Dunbar2008-10-151-12/+28
| | | | | | Also added serialization support to OverloadExpr. llvm-svn: 57588
* Added pinsrd, pinsrq, and some other vector intrinsicsMon P Wang2008-10-151-0/+4
| | | | llvm-svn: 57563
* Enhance dead store checker to not flag preincrements to dead variables where ↵Ted Kremenek2008-10-151-0/+7
| | | | | | the preincrement is a subexpression, e.g. foo(++x); This can cause false negatives, but will remove a whole class of false positives. llvm-svn: 57554
* Simplify handling of struct/union/class tags.Argyrios Kyrtzidis2008-10-156-45/+19
| | | | | | | Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl. Cleans up the code a bit and better reflects that Decl class structure. llvm-svn: 57541
* Downgrade incompatibilities with objc qualified types (e.g. id <P>) to warnings.Steve Naroff2008-10-142-1/+18
| | | | | | Note: One day, we should consider moving the actual diags to ObjCQualifiedIdTypesAreCompatible(), since it has more information on the actual problem. GCC currently emits slightly more instructive errors for some cases involving protocols. I added a FIXME to the code. llvm-svn: 57529
* Revert my previous change, got stupidly confused with my local changes.Argyrios Kyrtzidis2008-10-141-1/+1
| | | | llvm-svn: 57514
* Fix a call to Sema::LookupDecl that had incorrect parameters.Argyrios Kyrtzidis2008-10-141-1/+1
| | | | llvm-svn: 57511
* Add serialization support in several missing places.Daniel Dunbar2008-10-141-0/+105
| | | | llvm-svn: 57502
* Move Type::EmitImpl into header, add FIXME to make abstract.Daniel Dunbar2008-10-141-4/+0
| | | | llvm-svn: 57501
* Fix test suite regression, getFloatTypeSemantics shouldn't be calledDaniel Dunbar2008-10-141-4/+6
| | | | | | on non-float types. llvm-svn: 57477
* Add Sema implementation of #pragma pack stack. Daniel Dunbar2008-10-143-1/+140
| | | | | | | | | | | - Follows the MSVC (original) implementation, including support of pack(show) (useful for testing). - Implements support for named pack records which gcc seems to ignore (or implements incorrectly). - Not currently wired to anything, only functionality change is the type checking of the pragma. llvm-svn: 57476
* Lift out ABIInfo abstract base class.Daniel Dunbar2008-10-133-21/+102
| | | | | | | | - Currently still lives in CGCall.cpp but is intended to be the target specific place for hooking ABI information. - Select ABIInfo to use based on Target's prefix and pointer width. llvm-svn: 57445
* Improve the const-ness of a few methods.Argyrios Kyrtzidis2008-10-122-4/+5
| | | | | | No functionality change. llvm-svn: 57417
* Implement more efficient Decl <-> DeclContext conversions.Argyrios Kyrtzidis2008-10-121-10/+10
| | | | | | | | When the static type on the Decl side is a subclass of DeclContext the compiler will use a "inlinable" static_cast, instead of always using an out-of-line function call. Note, though, that the isa<> check still uses an out-of-line function call. llvm-svn: 57415
* make the -rewrite-test a bit more interesting: it now Chris Lattner2008-10-121-3/+50
| | | | | | | wraps comments in <i> tags. Extend rewrite tokens to support this minimal functionality. llvm-svn: 57409
* start implementing a token rewriter. At this point, it just reads in a fileChris Lattner2008-10-121-0/+53
| | | | | | and lets a client iterate over it. llvm-svn: 57407
* Change FormTokenWithChars to take the token kind to form, since all clientsChris Lattner2008-10-122-128/+108
| | | | | | | were setting a kind and then forming it. This is just a minor API cleanup, no functionality change. llvm-svn: 57404
* When in keep whitespace mode, make sure to return block comments that areChris Lattner2008-10-121-2/+22
| | | | | | unterminated. llvm-svn: 57403
* Change SkipBlockComment and SkipBCPLComment to return true when inChris Lattner2008-10-121-18/+22
| | | | | | keep comment mode, instead of returning false. This matches SkipWhitespace. llvm-svn: 57402
* Add a new mode to the lexer which enables it to return all characters,Chris Lattner2008-10-121-15/+49
| | | | | | | | | | | | | | | | | | | | | | | | even whitespace, as tokens from the file. This is enabled with L->SetKeepWhitespaceMode(true) on a raw lexer. In this mode, you too can use clang as a really complex version of 'cat' with code like this: Lexer RawLex(SourceLocation::getFileLoc(SM.getMainFileID(), 0), PP.getLangOptions(), File.first, File.second); RawLex.SetKeepWhitespaceMode(true); Token RawTok; RawLex.LexFromRawLexer(RawTok); while (RawTok.isNot(tok::eof)) { std::cout << PP.getSpelling(RawTok); RawLex.LexFromRawLexer(RawTok); } This will emit exactly the input file, with no canonicalization or other translation. Realistic clients actually do something with the tokens of course :) llvm-svn: 57401
* Stop the preprocessor from poking the lexer's private parts.Chris Lattner2008-10-121-6/+6
| | | | llvm-svn: 57399
* Fix a couple more places that poke KeepCommentMode unnecesarily. Chris Lattner2008-10-121-3/+4
| | | | llvm-svn: 57398
* add a new inKeepCommentMode() accessor to abstract the KeepCommentModeChris Lattner2008-10-121-4/+4
| | | | | | ivar. llvm-svn: 57397
* fix misleading comment.Chris Lattner2008-10-121-1/+1
| | | | llvm-svn: 57396
* Simplify raw mode lexing by treating an unterminate /**/ comment theChris Lattner2008-10-122-8/+5
| | | | | | | | same we we do an unterminated string or character literal. This makes it so we can guarantee that the lexer never calls into the preprocessor (which would be suicide for a raw lexer). llvm-svn: 57395
* add a comment.Chris Lattner2008-10-121-0/+2
| | | | llvm-svn: 57394
* Change how raw lexers are handled: instead of creating them and thenChris Lattner2008-10-123-15/+16
| | | | | | | | | | | using LexRawToken, create one and use LexFromRawLexer. This avoids twiddling the RawLexer flag around and simplifies some code (even speeding raw lexing up a tiny bit). This change also improves the token paster to use a Lexer on the stack instead of new/deleting it. llvm-svn: 57393
* silence release-assert warnings.Chris Lattner2008-10-124-11/+12
| | | | llvm-svn: 57392
* silence some release-assert warnings.Chris Lattner2008-10-123-10/+8
| | | | llvm-svn: 57391
* silence a bunch of warnings in a release-assert build.Chris Lattner2008-10-121-13/+11
| | | | llvm-svn: 57390
* improve a comment.Chris Lattner2008-10-121-1/+2
| | | | llvm-svn: 57389
* Final phase of converting BlockDecls over to DeclContext. This is ↵Steve Naroff2008-10-105-70/+48
| | | | | | unfortunately a largish/complex diff, however it was necessry to pass all the current block tests. llvm-svn: 57337
* Lift EmitTargetBuiltinExpr out of EmitBuiltinExpr.Daniel Dunbar2008-10-102-8/+15
| | | | llvm-svn: 57335
* Adjust calls to APFloat conversion for new interface.Dale Johannesen2008-10-093-6/+13
| | | | llvm-svn: 57332
* Check some cases for previous patch. Make the code more robust.Zhongxing Xu2008-10-091-3/+7
| | | | llvm-svn: 57317
* Fix a bug that crashed clang when parsing this:Argyrios Kyrtzidis2008-10-081-10/+20
| | | | | | | | | | | | | | | | class C { static const int number = 50; static int arr[number]; }; Here's how it worked: -GetTypeForDeclarator was called from both Sema::ActOnCXXMemberDeclarator and Sema::ActOnDeclarator. -VariableArrayTypes are not uniqued so two VariableArrayTypes were created with the same DeclRefExpr. -On exit they both tried to destroy that one DeclRefExpr. The fix is not to use GetTypeForDeclarator from the Sema::ActOnCXXMemberDeclarator. llvm-svn: 57313
* Instantiate the BlockDecl in ActOnBlockStart() so we can use it as a ↵Steve Naroff2008-10-083-7/+8
| | | | | | | | DeclContext. This required changes to attach the compound statement later on (like we do for functions). llvm-svn: 57304
* - Add BlockDecl AST node.Steve Naroff2008-10-087-19/+67
| | | | | | | | | | - Modify BlockExpr to reference the BlockDecl. This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?). Still some follow-up work to finish this (forthcoming). llvm-svn: 57298
* This is the first step to implement a field-sensitive store model. Other ↵Zhongxing Xu2008-10-082-0/+130
| | | | | | things are simplified: no heap shape assumption, no parameter alias assumption, etc. llvm-svn: 57285
* A little more tweaking with StmtIterator and SizeOfAlignofExpr. A recent ↵Ted Kremenek2008-10-072-18/+21
| | | | | | commit actually introduced a regression, not fixed a bug. llvm-svn: 57282
* Migrate DeclStmt over to using a DeclGroup instead of a pointer to a ↵Ted Kremenek2008-10-075-48/+49
| | | | | | | | ScopedDecl*. This also removes the ugly hack needed in CFG.cpp for subclassing DeclStmt to create a DeclStmt with one Decl*. llvm-svn: 57275
* Add #include (introduced by dependence on DeclGroup)Ted Kremenek2008-10-071-0/+1
| | | | llvm-svn: 57274
* Fixed a masked bug when iterating over the child expressions of ↵Ted Kremenek2008-10-071-2/+2
| | | | | | SizeOfAlignOfTypeExpr. This bug was unmasked by recent changes to StmtIterator. llvm-svn: 57273
* Add const_iterator to DeclGroup.Ted Kremenek2008-10-071-9/+12
| | | | | | Serialization for OwningDeclGroupRefs now works. llvm-svn: 57272
* Add StmtIterator support for DeclGroups.Ted Kremenek2008-10-071-38/+73
| | | | llvm-svn: 57271
* In ParseParenDeclarator match "D.setGroupingParens(true);" with another ↵Argyrios Kyrtzidis2008-10-071-0/+3
| | | | | | | | | setGroupingParens call after the ')' is parsed. Fixes this bug: int (x)(0); // error, expected function declarator where the '(0)' initializer is llvm-svn: 57241
* Added a function call case that generates sink nodes.Zhongxing Xu2008-10-071-0/+6
| | | | llvm-svn: 57240
* Migrate MemRegionManager from StateManager to StoreManager.Zhongxing Xu2008-10-071-10/+18
| | | | llvm-svn: 57225
* Added prototype serialization code for DeclGroup.Ted Kremenek2008-10-061-0/+62
| | | | llvm-svn: 57222
OpenPOWER on IntegriCloud