summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Enhance static analyzer diagnostics by introducing a new 'EnhancedBugReporter'Ted Kremenek2009-08-185-12/+60
| | | | | | | | | which allows custom checks to register callback creator functions for creating BugReporterVisitor objects. This allows various checks to include diagnostics such as 'assuming value is null' with little extra work. Eventually this API should be refactored to be cleaner and more simple. llvm-svn: 79302
* Teach Sema how to pop out of friend function definitions in nested classes.John McCall2009-08-182-13/+23
| | | | llvm-svn: 79291
* Fixed typo in last commit pointed out by Anton.David Chisnall2009-08-171-2/+2
| | | | llvm-svn: 79290
* Changes to TargetABIInfo to (hopefully) select the correct calling ↵David Chisnall2009-08-171-7/+16
| | | | | | convention. This has been tested on FreeBSD, and now correctly generates GCC-compatible code for functions returning small structures. Please test it on other platforms! llvm-svn: 79288
* Support compilation for the blackfin back-endJakob Stoklund Olesen2009-08-171-0/+81
| | | | llvm-svn: 79271
* Patch to 1) synthesizing non-trivial default destructor whenFariborz Jahanian2009-08-174-13/+163
| | | | | | | | one is not provided by user. 2) More complete emission of ctor prologue when it has no initializer list or when it is synthesized. llvm-svn: 79269
* Remove an ErrorUnsupported call.Anders Carlsson2009-08-172-6/+1
| | | | llvm-svn: 79261
* XFAIL this test for now. David/Steve, please sort out the correct fix.Daniel Dunbar2009-08-171-0/+3
| | | | llvm-svn: 79259
* Initial patch to support definitions of id and Class from headers in ↵David Chisnall2009-08-177-16/+78
| | | | | | | | | | Objective-C code. This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa. Approved by snaroff. llvm-svn: 79248
* adjust indentation.Zhongxing Xu2009-08-171-15/+15
| | | | llvm-svn: 79236
* Remove unused variable.Zhongxing Xu2009-08-171-2/+0
| | | | llvm-svn: 79229
* To make the analysis independent on the locally stored liveness and cfgZhongxing Xu2009-08-1711-18/+26
| | | | | | | of GRStateManager and GRExprEngine, pass the initial location context to the getInitialState() method. llvm-svn: 79228
* Update lexer to work with the new APFloat string parsing.Erick Tryzelaar2009-08-161-2/+6
| | | | llvm-svn: 79211
* Improve handling of delete expressions.Anders Carlsson2009-08-164-0/+87
| | | | llvm-svn: 79205
* Whoops, did not mean to commit thisAnders Carlsson2009-08-161-1/+1
| | | | llvm-svn: 79201
* Store the delete operator for delete expressions.Anders Carlsson2009-08-162-11/+42
| | | | llvm-svn: 79200
* Patch toward synthesizing non-trivial destructors. WIPFariborz Jahanian2009-08-162-0/+39
| | | | llvm-svn: 79199
* Refine vbase offset calculations. WIP.Mike Stump2009-08-163-38/+55
| | | | llvm-svn: 79198
* Only do this for initializers of course.Anders Carlsson2009-08-161-8/+10
| | | | llvm-svn: 79197
* Destroy bound temporaries.Anders Carlsson2009-08-162-1/+16
| | | | llvm-svn: 79196
* Improve the diagnostic emitted when an unused ObjC property getterChris Lattner2009-08-163-3/+14
| | | | | | | | | | | | is found. Instead of complaining about a generic "unused expr", emit: t.m:7:3: warning: property access result unused - getters should not have side effects While objc property getters *could* have side effects, according to the language best practices, they *shouldn't*. Hopefully the diagnostic now gets this across. llvm-svn: 79192
* fix my previous commit.Chris Lattner2009-08-161-0/+3
| | | | llvm-svn: 79191
* This is an attempt to improve loc info for 'unused result' expressionChris Lattner2009-08-161-0/+12
| | | | | | | warnings, but it fails because we don't have the location of the . and I don't understand ObjCKVCRefExpr. I'll revisit this later. llvm-svn: 79190
* Add an IsInitializer flag to EmitAnyExpr. This is used to prevent ↵Anders Carlsson2009-08-165-29/+47
| | | | | | temporaries from being destroyed when they're bound to a reference variable. llvm-svn: 79179
* No need to append extra padding now that we don't create packed structs for ↵Anders Carlsson2009-08-161-50/+8
| | | | | | simple cases like the constant string. llvm-svn: 79178
* AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and ↵Anders Carlsson2009-08-168-19/+42
| | | | | | create the CXXExprWithTemporaries before setting the initializer on the VarDecl. llvm-svn: 79176
* Call MaybeBindToTemporary for overloaded binary and unary operators.Anders Carlsson2009-08-163-7/+25
| | | | llvm-svn: 79173
* Call MaybeBindToTemporary when constructing functino call operator calls.Anders Carlsson2009-08-162-2/+15
| | | | llvm-svn: 79172
* Add MaybeBindToTemporary calls for member call expressions.Anders Carlsson2009-08-163-4/+23
| | | | llvm-svn: 79171
* Make sure to call MaybeBindToTemporary when creating CallExprs.Anders Carlsson2009-08-162-5/+20
| | | | llvm-svn: 79168
* Use the -NEXT feature of FileCheck.Mike Stump2009-08-161-216/+216
| | | | llvm-svn: 79166
* Move builtin call checking out into a separate function, make ↵Anders Carlsson2009-08-165-52/+83
| | | | | | CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change. llvm-svn: 79157
* Cleanups and fixups for calculating the virtual base offsets. WIP.Mike Stump2009-08-165-133/+267
| | | | llvm-svn: 79156
* BuildCXXConstructExpr doesn't need to take an ASTContext.Anders Carlsson2009-08-155-17/+17
| | | | llvm-svn: 79149
* Add an explicit constructor to ActiveTemplateInstantiation which Eli Friedman2009-08-151-0/+3
| | | | | | | initializes all the members; this fixes a valgrind error in the regression tests. llvm-svn: 79148
* Add a simple test for temporaries.Anders Carlsson2009-08-151-0/+13
| | | | llvm-svn: 79147
* Fix test failure due to uninitialized member.Eli Friedman2009-08-151-4/+4
| | | | llvm-svn: 79145
* Implement __is_empty. Patch by Sean Hunt.Eli Friedman2009-08-158-22/+118
| | | | llvm-svn: 79143
* Ignore -Wno-import.Eli Friedman2009-08-151-0/+1
| | | | llvm-svn: 79128
* Don't perform integer promotions on the operand to a cast; this Eli Friedman2009-08-152-2/+2
| | | | | | | simplifies the AST, and can matter in some rare cases involving casts to vector types. Patch by Enea Zaffanella. llvm-svn: 79126
* Improved on ir-gen for synthesis of non-trivial defaultFariborz Jahanian2009-08-152-0/+47
| | | | | | | constructor body whose class has non-static data-members which required non-trivial construction. llvm-svn: 79125
* Add an additional C++ hardcoded search path.Eli Friedman2009-08-151-0/+3
| | | | llvm-svn: 79075
* Make test more precise.Eli Friedman2009-08-151-4/+2
| | | | llvm-svn: 79074
* Make test a bit more precise.Eli Friedman2009-08-151-1/+1
| | | | llvm-svn: 79073
* Extend the ProgramPoint to include the context information LocationContext,Zhongxing Xu2009-08-1510-98/+139
| | | | | | | which is either a stack frame context of the function or a local scope context. llvm-svn: 79072
* Fix for PR4721: adjust CodeGen and ASTContext so that we have a Eli Friedman2009-08-154-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | consistent model for handling size expressions for VLAs. The model is essentially as follows: VLA types own their associated expression. In some cases, we need to create multiple VLA types to represent a given VLA (for canonical types, or qualifiers on array types, or type merging). If we need to create multiple types based off of the same VLA declaration, we use the new refcounting functionality so they can all own the expression. The VLASizeMap in CodeGenFunction then uses the size expression to identify the group of VLA types based off of the same original declaration. I'm not particularly attached to the VLA types owning the expression, but we're stuck with at least until someone comes up with a way to walk the VLA expressions for a declaration. I did the parallel fix in ASTContext for DependentSizedArrayType, but I haven't really looked closely at it, so there might still be issues there. I'll clean up the code duplication in ASTContext in a followup commit. llvm-svn: 79071
* Disable all recognition of main() in -ffreestanding. Addresses bug #4720.John McCall2009-08-155-7/+17
| | | | llvm-svn: 79070
* Change handling of attribute 'malloc' to only accept the attribute on functionTed Kremenek2009-08-154-24/+18
| | | | | | | | | | declarations (and not function pointers). This is consistent with GCC. Accepting this attribute on function pointers means that the attribute should be treated as a type qualifier, which apparently is not what GCC does. We obviously can change this later should we desire to enhance the 'malloc' attribute in this way. llvm-svn: 79060
* minor cleanups for VLA stuff.Chris Lattner2009-08-151-13/+12
| | | | llvm-svn: 79059
* use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if Chris Lattner2009-08-141-1/+1
| | | | | | VLASize isn't populated for the type yet. llvm-svn: 79057
OpenPOWER on IntegriCloud