summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* rearrange preprocessor macro definitions into language-specificChris Lattner2008-10-051-44/+51
| | | | | | then target specific. llvm-svn: 57128
* Implement PR2773, support for __USER_LABEL_PREFIX__Chris Lattner2008-10-052-0/+8
| | | | llvm-svn: 57127
* Found a subtle bug caused by an implicit enum-to-bool conversion (of the ↵Argyrios Kyrtzidis2008-10-051-91/+95
| | | | | | | | | | | | TentativeParsingResult enum). This was the motivation of the following changes: -'TentativeParsingResult' enum is replaced by a 'TPResult' class that basically encapsulates the enum. -TPR_true, TPR_false, TPR_ambiguous, and TPR_error enum constants are replaced by TPResult::True(), TPResult::False(), etc. calls that return a TPResult object. -Also fixed the subtle bug in Parser::isCXXFunctionDeclarator (caught by the above changes as a compilation error). llvm-svn: 57125
* Add parsing of the sentinel attribute. Still need to create the attribute.Anders Carlsson2008-10-052-0/+67
| | | | llvm-svn: 57121
* Wrap long lines and other minor cleanups, no functionality change.Chris Lattner2008-10-051-22/+31
| | | | llvm-svn: 57119
* Remove copyright notice, we decided not to have them.Anders Carlsson2008-10-051-2/+0
| | | | llvm-svn: 57118
* Disambiguate between a declaration or an expression, in the ↵Argyrios Kyrtzidis2008-10-051-1/+1
| | | | | | 'for-init-statement' part of a 'for' statement. llvm-svn: 57112
* Fix Parser::isCXXConditionDeclaration to properly resolve declarations.Argyrios Kyrtzidis2008-10-051-3/+3
| | | | llvm-svn: 57111
* Disambiguate between a declaration or expression for the 'condition' part of ↵Argyrios Kyrtzidis2008-10-052-1/+55
| | | | | | a if/switch/while/for statement. llvm-svn: 57109
* Consider GNU attributes when doing ambiguity resolution.Argyrios Kyrtzidis2008-10-051-6/+15
| | | | llvm-svn: 57108
* Remove redundant parameter and rename StMgr to StateMgr.Zhongxing Xu2008-10-052-17/+17
| | | | llvm-svn: 57107
* Make VectorType printing less broken.Daniel Dunbar2008-10-051-4/+4
| | | | | | | - Print size as number of elements times "sizeof(elt type)", not perfect but better than just printing the completely wrong type. llvm-svn: 57100
* Resolve ambiguous C++ statements (C++ 6.8p1).Argyrios Kyrtzidis2008-10-052-2/+722
| | | | | | 'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them. llvm-svn: 57084
* Bug fix, CPATH="" does not add '.' to search path.Daniel Dunbar2008-10-041-1/+1
| | | | llvm-svn: 57072
* Add Parser support for #pragma packDaniel Dunbar2008-10-043-0/+153
| | | | | | | - Uses Action::ActOnPragmaPack - Test case is XFAIL pending verifier fixes. llvm-svn: 57066
* Add Preprocessor::RemovePragmaHandler.Daniel Dunbar2008-10-041-0/+37
| | | | | | - No functionality change. llvm-svn: 57065
* This is a big patch, but the functionality change is small and the rest of ↵Ted Kremenek2008-10-0413-291/+443
| | | | | | | | | | | | | | the patch consists of deltas due to API changes. This patch overhauls the "memory region" abstraction that was prototyped (but never really used) as part of the Store.h. This patch adds MemRegion.h and MemRegion.cpp, which defines the class MemRegion and its subclasses. This classes serve to define an abstract representation of memory, with regions being layered on other regions to to capture the relationships between fields and variables, variables and the address space they are allocated in, and so on. The main motivation of this patch is that key parts of the analyzer assumed that all value bindings were to VarDecls. In the future this won't be the case, and this patch removes lval::DeclVal and replaces it with lval::MemRegionVal. Now all pieces of the analyzer must reason about abstract memory blocks instead of just variables. There should be no functionality change from this patch, but it opens the door for significant improvements to the analyzer such as field-sensitivity and object-sensitivity, both which were on hold until the memory abstraction got generalized. The memory region abstraction also allows type-information to literally be affixed to a memory region. This will allow the some now redundant logic to be removed from the retain/release checker. llvm-svn: 57042
* Reverse the RHSBlock of LogicalOp && and ||Zhongxing Xu2008-10-041-0/+1
| | | | llvm-svn: 57041
* add a new Rewriter::getRewritenText method that returns the text for a rangeChris Lattner2008-10-031-0/+49
| | | | | | that includes any edits in the range. llvm-svn: 57037
* Merge postfix attributes on record decls.Daniel Dunbar2008-10-031-1/+4
| | | | llvm-svn: 57019
* Remove a FIXME.Daniel Dunbar2008-10-031-1/+1
| | | | llvm-svn: 57015
* Pass postfix attributes to ActOnFields (mismarked a file).Daniel Dunbar2008-10-031-2/+0
| | | | llvm-svn: 56993
* Pass postfix attributes to ActOnFields.Daniel Dunbar2008-10-036-8/+13
| | | | llvm-svn: 56992
* Add getTypeSpecStartLoc() to VarDecls and FunctionDecls.Steve Naroff2008-10-032-7/+13
| | | | | | | This is a temporary solution to help with the block rewriter (though it certainly has general utility). Once DeclGroup's are implemented, this SourceLocation should be stored with it (since it applies to all the decls). llvm-svn: 56985
* Add Builtins.def attribute for "can be a constant expression".Daniel Dunbar2008-10-022-8/+5
| | | | | | | | | | | | | | - Enabled for builtins which are always constant expressions (__builtin_huge_val*, __builtin_inf*, __builtin_constant_p, __builtin_classify_type, __builtin___CFStringMakeConstantString). Added Builtin::Context::isConstantExpr. - Currently overly simply interface which only works for builtins whose constantexprness does not depend on their arguments. CallExpr::isBuiltinConstantExpr now takes an ASTContext argument. llvm-svn: 56983
* Add support for format string checking of object-size checkingDaniel Dunbar2008-10-023-29/+46
| | | | | | | versions of sprintf and friends. - Added FIXME that this mechanism should be generalized. llvm-svn: 56962
* Emit error unsupported for break/continue/goto inside Obj-C exceptionDaniel Dunbar2008-10-021-2/+30
| | | | | | | handling blocks. - This has false positives, but at least prevents miscompiles. llvm-svn: 56958
* Changed Sema::CheckForConstantInitializer to allow global block literals.Steve Naroff2008-10-021-0/+4
| | | | | | This commit also includes some name changes in the blocks rewriter (no functionality change). llvm-svn: 56955
* (LLVM up) Rename IRBuilder::IsNonNull -> IsNotNull.Daniel Dunbar2008-10-021-3/+3
| | | | llvm-svn: 56954
* Enhance NSError** checking with analogous checking for CFErrorRef*.Ted Kremenek2008-10-011-38/+137
| | | | | | Expand checking to include functions, not just methods. llvm-svn: 56938
* Use LVal::IsLValType(T) instead of checking to see if the type is an ↵Ted Kremenek2008-10-011-1/+1
| | | | | | "lvalue" type directly. llvm-svn: 56912
* NeXT: Update to use CreateRuntimeFunction for the routines it imports.Daniel Dunbar2008-10-011-80/+54
| | | | llvm-svn: 56902
* Add simple interface for protecting runtime functions from nameDaniel Dunbar2008-10-012-0/+56
| | | | | | | | | | | | | | | | | collisions. - Provide CodeGenModule::CreateRuntimeFunction which guarantees that the function it creates will have the provided name in the final module. This allows the runtime to have its functions protected from declarations of the same name in the source code. - One could argue that this is a reason to abuse the llvm::Module namespace for dealing with function redeclarations. However, that approach seems conceptually flawed to me. This one also happens to be somewhat more efficient. No functionality change. llvm-svn: 56899
* Add a QualType to ConjuredSymbol to represent the type and size of the symbol.Ted Kremenek2008-10-013-5/+9
| | | | | | Use this updated interface when invalidating arguments passed by reference; the type of symbol is of the object passed by reference, not the reference itself. llvm-svn: 56894
* simplify padding, just fold it into the earlier resize.Chris Lattner2008-09-301-7/+2
| | | | llvm-svn: 56880
* fix a potential buffer overrun that Eli noticedChris Lattner2008-09-301-0/+7
| | | | llvm-svn: 56879
* Document assumptions that NumericLiteralParser makes with an assertion.Chris Lattner2008-09-301-1/+10
| | | | llvm-svn: 56876
* Handle minor version numbers in __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__Chris Lattner2008-09-301-7/+19
| | | | | | like "10.3.9" llvm-svn: 56873
* Add diagnostic for .{lo,hi,e,o} on odd-sized extended vectors.Daniel Dunbar2008-09-301-0/+2
| | | | llvm-svn: 56859
* Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global ↵Steve Naroff2008-09-303-6/+28
| | | | | | | | scope) fails to handle overloaded selectors properly. Long standing bug in Sema::ActOnInstanceMessage(). We now warn when messaging an "id" with multiple method signatures in scope. The diags are a little verbose, however they can be streamlined if necessary. llvm-svn: 56843
* Improved fix for <rdar://problem/6247781> Parser rejecting properly ↵Steve Naroff2008-09-301-6/+11
| | | | | | | | mismatched properties. Needed to make sure the relaxed type checking only applies to "readonly" properties. llvm-svn: 56838
* Add missing include for use of atoi.Nick Lewycky2008-09-301-0/+1
| | | | llvm-svn: 56836
* Revert last patch, but add a fixmeTed Kremenek2008-09-301-1/+3
| | | | llvm-svn: 56832
* Within the transfer function of UnaryOperatorExpr, handle implicit promotionsTed Kremenek2008-09-301-0/+5
| | | | | | from the subexpression type to the expression type. llvm-svn: 56831
* Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128Mon P Wang2008-09-301-0/+7
| | | | llvm-svn: 56830
* Add infrastructure for proper @finally support.Daniel Dunbar2008-09-303-60/+145
| | | | | | | | | | | | - Provides a basic primitive to jump to an arbitrary basic block, through the finally code. - Only used for return statements and rethrow currently. Still need to handle break, continue and goto. - Code still needs to be shuffled around to live elsewhere. llvm-svn: 56827
* The definition of __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ followsChris Lattner2008-09-301-7/+21
| | | | | | | the target triple on darwin. For example i386-apple-darwin9 -> 1050 because darwin9 is "10.5". llvm-svn: 56826
* define __PASCAL_STRINGS__ whenever -fpascal-strings is enabled.Chris Lattner2008-09-302-4/+5
| | | | llvm-svn: 56824
* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ is a darwin-specific #defineChris Lattner2008-09-302-2/+3
| | | | llvm-svn: 56822
* Fix <rdar://problem/6247781> Parser rejecting properly mismatched properties.Steve Naroff2008-09-301-4/+4
| | | | llvm-svn: 56821
OpenPOWER on IntegriCloud