summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* move library-specific diagnostic headers into library private dirs. ReduceChris Lattner2009-01-2941-41/+26
| | | | | | redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
* fix an absolutely inscrutible gcc 4.0 error:Chris Lattner2009-01-291-1/+5
| | | | | | | | | | | | llvm[0]: Compiling SemaInit.cpp for Debug build SemaInit.cpp:171: error: ‘InitListChecker’ has not been declared SemaInit.cpp:171: error: ISO C++ forbids declaration of ‘InitListChecker’ with no type SemaInit.cpp: In function ‘int InitListChecker(clang::Sema*, clang::InitListExpr*, clang::QualType&)’: SemaInit.cpp:172: error: ‘hadError’ was not declared in this scope SemaInit.cpp:173: error: ‘SemaRef’ was not declared in this scope SemaInit.cpp:177: error: ‘FullyStructuredList’ was not declared in this scope llvm-svn: 63270
* Add folding for complex mul and fix some major bugs in complex floatDaniel Dunbar2009-01-291-2/+37
| | | | | | | | evaluation (alternate part of real/imag init was being set to 3 not 0 because the wrong APFloat constructor was being called). - Test cases coming once some more support is in. llvm-svn: 63264
* Better documentation for our initialization checkerDouglas Gregor2009-01-291-19/+48
| | | | llvm-svn: 63261
* Move InitListChecker out of Sema.hDouglas Gregor2009-01-293-74/+80
| | | | llvm-svn: 63258
* Eliminate infinite looping in a wacky case with designated initializers. ↵Douglas Gregor2009-01-292-19/+26
| | | | | | Simplifies (somewhat) the actually checking of the initializer expression following the designators llvm-svn: 63257
* Refactor Sema::LookupDecl() into 2 functions: LookupDeclInScope() and ↵Steve Naroff2009-01-298-53/+73
| | | | | | | | | | LookupDeclInContext(). The previous interface was very confusing. This is much more explicit, which will be easier to understand/optimize/convert. The plan is to eventually deprecate both of these functions. For now, I'm focused on performance. llvm-svn: 63256
* Remove Expr::hasSideEffects. It doesn't work anywayDouglas Gregor2009-01-282-8/+2
| | | | llvm-svn: 63254
* Improvements to code-generation and semantic analysis of designatedDouglas Gregor2009-01-285-44/+99
| | | | | | | | | | | | initializers. - We now initialize unions properly when a member other than the first is named by a designated initializer. - We now provide proper semantic analysis and code generation for GNU array-range designators *except* that side effects will occur more than once. We warn about this. llvm-svn: 63253
* Add setter/getter methods to the list of methodsFariborz Jahanian2009-01-281-0/+15
| | | | | | of class's meta-data (related to objc2 nonfragile abi). llvm-svn: 63251
* Remove '#if 0' code.Ted Kremenek2009-01-281-5/+0
| | | | llvm-svn: 63250
* Remove method 'AddNE' from the public interface of ConstraintManager.Ted Kremenek2009-01-282-3/+6
| | | | llvm-svn: 63249
* Implement basic _Complex integer constant folding.Daniel Dunbar2009-01-282-34/+78
| | | | | | | - Merged into single ComplexEvaluator, these share too much logic to be worth splitting for float/int (IMHO). Will split on request. llvm-svn: 63248
* property metadata for objc2's nonfragile abiFariborz Jahanian2009-01-281-15/+30
| | | | llvm-svn: 63246
* Code generation support for C99 designated initializers.Douglas Gregor2009-01-289-139/+459
| | | | | | | | | | | | | | | | | | | | The approach I've taken in this patch is relatively straightforward, although the code itself is non-trivial. Essentially, as we process an initializer list we build up a fully-explicit representation of the initializer list, where each of the subobject initializations occurs in order. Designators serve to "fill in" subobject initializations in a non-linear way. The fully-explicit representation makes initializer lists (both with and without designators) easy to grok for codegen and later semantic analyses. We keep the syntactic form of the initializer list linked into the AST for those clients interested in exactly what the user wrote. Known limitations: - Designating a member of a union that isn't the first member may result in bogus initialization (we warn about this) - GNU array-range designators are not supported (we warn about this) llvm-svn: 63242
* retain/release checker: Always generate an "autorelease" summary for an ↵Ted Kremenek2009-01-281-9/+9
| | | | | | "autorelease" message, and have the summary processing logic treat it as a no-op in GC mode. This change is motivated to encode more of the semantics in the summaries themselves for eventual better diagnostics. llvm-svn: 63241
* Handle complex types in ASTContext::mergeTypesDaniel Dunbar2009-01-281-0/+3
| | | | llvm-svn: 63238
* Add more PTH diagnostics for invalid PTH files, etc.Ted Kremenek2009-01-281-11/+29
| | | | llvm-svn: 63232
* Enhance PTHManager::Create() to take an optional Diagnostic* argument that ↵Ted Kremenek2009-01-281-2/+9
| | | | | | can be used to report issues such as a missing PTH file. llvm-svn: 63231
* Fix TextDiagnosticPrinter::HandleDiagnostic to handle invalid FullSourceLocs ↵Ted Kremenek2009-01-281-15/+7
| | | | | | that do not have a SourceManager. llvm-svn: 63230
* Add method FullSourceLoc::getBufferData().Ted Kremenek2009-01-281-0/+6
| | | | llvm-svn: 63229
* Name change (isTypeName->getTypeName).Steve Naroff2009-01-287-18/+18
| | | | | | Since it doesn't return a bool, is shouldn't be prefixed with 'is'. llvm-svn: 63226
* Change Parser::ParseFunctionDeclarator() to annotate typename tokens.Steve Naroff2009-01-281-9/+21
| | | | | | This removes ~10% of the calls to Sema::isTypeName(), which amount to a little less than a 1% reduction in usertime (for Cocoa.h). llvm-svn: 63219
* Some refactoring of common code. No change in functionality.Fariborz Jahanian2009-01-281-34/+47
| | | | llvm-svn: 63218
* Implement pointer to member handling in static_cast.Sebastian Redl2009-01-284-51/+114
| | | | | | | Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same. Make a few style corrections as suggested by Chris. llvm-svn: 63215
* Complete semantic checking for typedef redeclarations in C++. TheDouglas Gregor2009-01-281-12/+45
| | | | | | | rules are slightly different than in C, and now we handle both dialects properly. llvm-svn: 63211
* Remove 'NamespaceNameOnly' argument to Sema::LookupDecl(). It is unused.Steve Naroff2009-01-285-17/+11
| | | | | | Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert. llvm-svn: 63210
* Remove 'enableLazyBuiltinCreation' argument to Sema::LookupDecl(). It is unused.Steve Naroff2009-01-283-9/+5
| | | | | | Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert. llvm-svn: 63208
* long long and double have 64-bit alignment on x86-64.Chris Lattner2009-01-281-0/+1
| | | | llvm-svn: 63191
* retain/release checker: Improve diagnostics to indicate that CF objects are ↵Ted Kremenek2009-01-281-2/+9
| | | | | | not automatically garbage collected. llvm-svn: 63187
* retain/release checker: Indicate whether a tracked object is a Core ↵Ted Kremenek2009-01-281-1/+7
| | | | | | Foundation or Objective-C object. llvm-svn: 63186
* retain/release checker: More diagnostic refactoring.Ted Kremenek2009-01-281-6/+4
| | | | llvm-svn: 63184
* retain/release checker: Embed an "object type" into the RetEffect/RetVal ↵Ted Kremenek2009-01-281-42/+53
| | | | | | objects to help distinguish between Objective-C and Core Foundation objects (for better diagnostics). llvm-svn: 63183
* retain/release checker: More cleanups (no real functionality change).Ted Kremenek2009-01-281-15/+10
| | | | llvm-svn: 63181
* Fix diagnostic truncated by my last patch.Ted Kremenek2009-01-281-0/+2
| | | | llvm-svn: 63180
* retain/release checker: More diagnostic refactoring.Ted Kremenek2009-01-281-27/+15
| | | | llvm-svn: 63179
* retain/release checker: Output the name of the function that allocates an ↵Ted Kremenek2009-01-281-14/+15
| | | | | | object. llvm-svn: 63178
* Refactor some diagnostic code to use raw_string_ostream. No functionality ↵Ted Kremenek2009-01-281-20/+17
| | | | | | change. llvm-svn: 63177
* Remove '#if 0' code.Ted Kremenek2009-01-281-5/+0
| | | | llvm-svn: 63176
* Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to ↵Ted Kremenek2009-01-281-18/+22
| | | | | | pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST. llvm-svn: 63175
* Set visibility of ivar offset symbols according to Fariborz Jahanian2009-01-281-4/+13
| | | | | | | accessibility of the ivar (related to objc2's non-fragile abi). llvm-svn: 63166
* Generation of ivar-offset symbols in objc2's non-fragile abi.Fariborz Jahanian2009-01-281-13/+59
| | | | | | Changed section names for meta-data (to match current gcc). llvm-svn: 63163
* On Windows use a BumpPtrAllocator for the UniqueFileContainer's StringMap.Ted Kremenek2009-01-281-1/+1
| | | | llvm-svn: 63162
* FileManager: Use a BumpPtrAllocator for the StringMaps DirEntries and ↵Ted Kremenek2009-01-281-1/+0
| | | | | | | | | | FileEntries. Performance impact (clang -fsyntax-only INPUTS/Cocoa_h.m): non-PTH: 0.4% improvement PTH: 0.8% improvement llvm-svn: 63159
* fix PR3427: fix debuginfo for incomplete array typesNuno Lopes2009-01-281-2/+5
| | | | llvm-svn: 63158
* Add a some comments to designate Windows-specific/Unix-specific code. No ↵Ted Kremenek2009-01-281-0/+12
| | | | | | functionality change. llvm-svn: 63157
* Finish making AST BumpPtrAllocation runtime configurable (based on ↵Steve Naroff2009-01-276-15/+14
| | | | | | | | | | | -disable-free). snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m 0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free 0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w llvm-svn: 63153
* Add handling of member pointers to reinterpret_cast.Sebastian Redl2009-01-271-15/+40
| | | | llvm-svn: 63150
* After talking to our runtime guru, I added a comment.Fariborz Jahanian2009-01-271-0/+5
| | | | llvm-svn: 63141
* Convert types over to placement new() that takes an ASTContext.Steve Naroff2009-01-271-57/+30
| | | | | | Also changed FunctionTypeProto to be allocated with 8-byte alignment (noticed by Doug). I couldn't think of any reason to allocate on 16-byte boundaries. If anyone remembers why we were doing this, let me know! llvm-svn: 63137
OpenPOWER on IntegriCloud