summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Place constructors and destructors into the DeclContext of the class,Douglas Gregor2008-12-159-213/+190
| | | | | | | | | | | | just like all other members, and remove the special variables in CXXRecordDecl to store them. This eliminates a lot of special-case code for constructors and destructors, including ActOnConstructor/ActOnDeclarator and special lookup rules in LookupDecl. The result is far more uniform and manageable. Diagnose the redeclaration of member functions. llvm-svn: 61048
* And a test case for my previous patch.Fariborz Jahanian2008-12-151-0/+79
| | | | llvm-svn: 61044
* Code gen. for ivar references; including bitfieldFariborz Jahanian2008-12-159-73/+66
| | | | | | ivars. llvm-svn: 61043
* Preprocessor: Allocate MacroInfo objects using a BumpPtrAllocator instead ↵Ted Kremenek2008-12-154-11/+42
| | | | | | using new/delete. This speeds up -Eonly on Cocoa.h using the regular lexer by 1.8% and the PTHLexer by 3%. llvm-svn: 61042
* Fix regression in handling sizeof(void) in the static analyzer.Ted Kremenek2008-12-152-13/+40
| | | | llvm-svn: 61039
* Removed setRecordForDecl. Added a FIXME.Fariborz Jahanian2008-12-152-1/+3
| | | | llvm-svn: 61038
* Don't double-destroy constructors defined out-of-line. This is aDouglas Gregor2008-12-152-9/+12
| | | | | | | half-solution; the real solution is coming when constructors and destructors are treated like all other functions by ActOnDeclarator. llvm-svn: 61037
* Create new EnumDecl nodes for redeclarations of enums, linking themDouglas Gregor2008-12-156-222/+89
| | | | | | | | | | together in the same way that we link RecordDecl/CXXRecordDecl nodes. Unify ActOnTag and ActOnTagStruct. Fixes PR clang/2753. llvm-svn: 61034
* dont call iterator::end() on every cycle and dont read already-deleted memoryNuno Lopes2008-12-141-3/+4
| | | | llvm-svn: 61015
* minor WS fix for the previous commitNuno Lopes2008-12-141-3/+2
| | | | llvm-svn: 61008
* fix leakage of CXXSpecialName objects in DeclarationNameTableNuno Lopes2008-12-141-1/+10
| | | | llvm-svn: 61007
* I think we should getRValueType here. The lvaluetype of an array region is ↵Zhongxing Xu2008-12-141-1/+1
| | | | | | 'pointer to array'. llvm-svn: 61003
* Updated checker build.Ted Kremenek2008-12-141-1/+1
| | | | llvm-svn: 61002
* Store the size of the EH stack inside each BreakContinue struct so we know ↵Anders Carlsson2008-12-133-10/+16
| | | | | | when a break/continue won't cross a try block. llvm-svn: 60998
* Patch for ObjCIvarRefExpr containing the fieldFariborz Jahanian2008-12-136-10/+35
| | | | | | matching the storage layout for this ivar llvm-svn: 60996
* MemRegion:Ted Kremenek2008-12-1312-148/+154
| | | | | | | | | | | | | | | | | | | | | | - Overhauled the notion of "types" for TypedRegions. We now distinguish between the "lvalue" of a region (via getLValueRegion()) and the "rvalue" of a region (va getRValueRegion()). Since a region represents a chunk of memory it has both, but we were conflating these concepts in some cases, leading to some insidious bugs. - Removed AnonPointeeType, partially because it is unused and because it doesn't have a clear notion of lvalue vs rvalue type. We can add it back once there is a need for it and we can resolve its role with these concepts. StoreManager: - Overhauled StoreManager::CastRegion. It expects an *lvalue* type for a region. This is actually what motivated the overhaul to the MemRegion type mechanism. It also no longer returns an SVal; we can just return a MemRegion*. - BasicStoreManager::CastRegion now overlays an "AnonTypedRegion" for pointer-pointer casts. This matches with the MemRegion changes. - Similar changes to RegionStore, except I've added a bunch of FIXMEs where it wasn't 100% clear where we should use TypedRegion::getRValueRegion() or TypedRegion::getLValueRegion(). AuditCFNumberCreate check: - Now blasts through AnonTypedRegions that may layer the original memory region, thus checking if the actually memory block is of the appropriate type. This change was needed to work with the changes to StoreManager::CastRegion. GRExprEngine::VisitCast: - Conform to the new interface of StoreManager::CastRegion. Tests: - None of the analysis tests fail now for using the "basic store". - Disabled the tests 'array-struct.c' and 'rdar-6442306-1.m' pending further testing and bug fixing. llvm-svn: 60995
* Add storage layout to ObjC classes.Fariborz Jahanian2008-12-134-2/+47
| | | | llvm-svn: 60993
* eliminate the isCXXNamedOperator function and some string compares andChris Lattner2008-12-131-8/+2
| | | | | | use identifierinfo instead. Patch by Chris Goller! llvm-svn: 60992
* Temporarily XFAIL these tests.Ted Kremenek2008-12-133-0/+3
| | | | llvm-svn: 60991
* A series of cleanups/fixes motivated by <rdar://problem/6442306>:Ted Kremenek2008-12-136-25/+79
| | | | | | | | | | | | | | | | | | GRExprEngine (VisitCast): - When using StoreManager::CastRegion, always use the state and value it returns to generate the next node. Failure to do so means that region values returned that don't require the state to be modified will get ignored. MemRegion: - Tighten the interface for ElementRegion. Now ElementRegion can only be created with a super region that is a 'TypedRegion' instead of any MemRegion. Code in BasicStoreManager/RegionStoreManager already assumed this, but it would result in a dynamic assertion check (and crash) rather than just having the compiler forbid the construction of such regions. - Added ElementRegion::getArrayRegion() to return the 'typed version' of an ElementRegion's super region. - Removed bogus assertion in ElementRegion::getType() that assumed that the super region was an AnonTypedRegion. All that matters is that it is a TypedRegion, which is now true all the time by design. BasicStore: - Modified getLValueElement() to check if the 'array' region is a TypedRegion before creating an ElementRegion. This conforms to the updated interface for ElementRegion. RegionStore: - In ArrayToPointer() gracefully handle things we don't reason about, and only create an ElementRegion if the array region is indeed a TypedRegion. llvm-svn: 60990
* disable Anders' recent VLA patch, this fixes PR3209.Chris Lattner2008-12-132-2/+11
| | | | llvm-svn: 60989
* Some utilities for using the smart pointers in Actions, especially Sema. ↵Sebastian Redl2008-12-1310-26/+43
| | | | | | Convert a few functions. llvm-svn: 60983
* Convert remaining expression parsers to smart pointers. Now on to the Action ↵Sebastian Redl2008-12-135-123/+136
| | | | | | connection. llvm-svn: 60982
* stdlib.h is the wrong header for printf, and introduces test-breaking ↵Sebastian Redl2008-12-131-1/+1
| | | | | | definitions of inlines on Linux llvm-svn: 60981
* Add /Za to all MSVC build of a clang libraries.Cedric Venet2008-12-131-0/+8
| | | | | | This allow to use the new move emulation for smart pointer by disabling language extension. llvm-svn: 60979
* PTH: Added minor 'sibling jumping' optimization for iterating over the side ↵Ted Kremenek2008-12-121-9/+37
| | | | | | table used for fast preprocessor block skipping. This has a minor performance improvement when preprocessing Cocoa.h, but can have some wins in pathologic cases. llvm-svn: 60966
* Fix <rdar://problem/6435837> clang ObjC rewriter: use Block_release instead ↵Steve Naroff2008-12-121-2/+2
| | | | | | of Block_destroy. llvm-svn: 60962
* fix a buggy fall through that caused a crash-on-invalid. rdar://6248081Chris Lattner2008-12-122-6/+12
| | | | llvm-svn: 60961
* Add test case for using mmintrin (and making sure that inlining isDaniel Dunbar2008-12-121-0/+26
| | | | | | working with and without debug info). llvm-svn: 60960
* Force i[0-9]86 to i386 when using LLVM_HOSTTRIPLE.Daniel Dunbar2008-12-121-1/+8
| | | | | | | Only use major part of OS version when on darwin and modifying OS part of target triple. llvm-svn: 60957
* Added PTH optimization to not process entire blocks of tokens that appear in ↵Ted Kremenek2008-12-124-24/+194
| | | | | | skipped preprocessor blocks. This improves PTH speed by 6%. The code for this optimization itself is not very optimized, and will get cleaned up. llvm-svn: 60956
* Enhance PTH preprocessor-condition-block side table to track ↵Ted Kremenek2008-12-121-16/+29
| | | | | | #elseinformation as well. llvm-svn: 60955
* Implement the final (hopefully) wrinkle to i-c-e + builtin_constant_p Chris Lattner2008-12-123-8/+26
| | | | | | | processing: it allows arbitrary foldable constants as the operand of ?: when builtin_constant_p is the condition. llvm-svn: 60954
* Enable out-of-line definitions of C++ constructors and destructorsDouglas Gregor2008-12-125-17/+65
| | | | llvm-svn: 60947
* Implement allocation and sizeof VLAs. This is very basic for now.Anders Carlsson2008-12-122-6/+38
| | | | llvm-svn: 60943
* rdar://6060752 - don't warn about trigraphs in bcpl-style commentsChris Lattner2008-12-122-1/+14
| | | | llvm-svn: 60942
* fix breakage I introduced in r60938Chris Lattner2008-12-121-2/+2
| | | | llvm-svn: 60941
* Add test of enumerator typesDouglas Gregor2008-12-121-0/+14
| | | | llvm-svn: 60940
* Add map of VLA types and their sizesAnders Carlsson2008-12-122-0/+36
| | | | llvm-svn: 60939
* silence warning in release-asserts mode about unused variable, alsoChris Lattner2008-12-121-3/+3
| | | | | | move comment into assert message. llvm-svn: 60938
* fix thought-oChris Lattner2008-12-121-1/+1
| | | | llvm-svn: 60937
* merge these testcases into one file.Chris Lattner2008-12-124-35/+35
| | | | llvm-svn: 60936
* add a fixme.Chris Lattner2008-12-121-0/+4
| | | | llvm-svn: 60935
* implement rdar://6091492 - ?: with __builtin_constant_p as the operand is an ↵Chris Lattner2008-12-123-3/+20
| | | | | | i-c-e. llvm-svn: 60934
* use smarter error recovery for do/while.Chris Lattner2008-12-122-5/+9
| | | | llvm-svn: 60933
* apply the new error recovery smarts we have for if's to while's and switch's.Chris Lattner2008-12-122-42/+51
| | | | llvm-svn: 60932
* rename recovery-3 to recovery.cChris Lattner2008-12-121-0/+0
| | | | llvm-svn: 60931
* merge recovery-1 into recovery-3.Chris Lattner2008-12-122-16/+15
| | | | llvm-svn: 60930
* merge recovery-2.c into recovery-3.c.Chris Lattner2008-12-123-17/+54
| | | | | | | | | | Substantially improve error recovery after broken if conditions by parsing the full if when we have a semantic error instead of using parser recovery techniques to recover from a semantic error. This fixes rdar://6094870 - spurious error after invalid 'if' condition llvm-svn: 60929
* minor refactoring of ParseParenExpressionChris Lattner2008-12-121-13/+16
| | | | llvm-svn: 60928
OpenPOWER on IntegriCloud