]>
granicus.if.org Git - clang/log
Steve Naroff [Mon, 20 Jul 2009 17:56:53 +0000 (17:56 +0000)]
5 cleanups to ObjCObjectPointerType work:
- Remove Sema::CheckPointeeTypesForAssignment(), a temporary API I added to ease migration to ObjCObjectPointerType. Convert Sema::CheckAssignmentConstraints() to no longer depend on the temporary API.
- Sema::ConvertDeclSpecToType(): Replace a couple FIXME's with an important comment/example.
- Sema::GetTypeForDeclarator(): Get the protocol's from the interface, NOT the declspec (to support the following C typedef idiom: "typedef C<P> T; T *obj").
- Sema::ObjCQualifiedIdTypesAreCompatible(): Removed some dead code.
- ASTContext::getObjCEncodingForTypeImpl(): Some minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76443
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 20 Jul 2009 17:43:15 +0000 (17:43 +0000)]
Issue a more descriptive diagnostics when mis-declaring
a destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 20 Jul 2009 08:28:49 +0000 (08:28 +0000)]
The children statements might be NULL. Check for this case in
isContainedInStatement().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76408
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 19 Jul 2009 20:38:24 +0000 (20:38 +0000)]
Implement FIXME in pretty-printing for StringRegions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76381
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 19 Jul 2009 20:36:24 +0000 (20:36 +0000)]
Improve debug pretty-printing for ObjCIVarRegions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76380
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Jul 2009 20:17:11 +0000 (20:17 +0000)]
enhance the goto checker to reject jumps across __block variable definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76376
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Jul 2009 08:24:34 +0000 (08:24 +0000)]
Catch another trivial case where we can avoid emitting a separate return blcok.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Jul 2009 08:23:12 +0000 (08:23 +0000)]
Detect when the current generation point is unreachable after emitting
expressions.
- This generally catches the important case of noreturn functions.
- With the last two changes, we are down to 152 unreachable blocks emitted on
403.gcc, vs the 1805 we started with.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Jul 2009 07:03:11 +0000 (07:03 +0000)]
Fix thinko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76362
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Jul 2009 06:58:07 +0000 (06:58 +0000)]
Avoid generation of dead code in a few more situations.
- Emit variable declarations as "simple", we want to avoid forcing the creation
of a dummy basic block, but still need to make the variable available for
later use.
- With that, we can now skip IRgen for other unreachable statements (which
don't define a label).
- Anders, I added two fixmes on calls to EmitVLASize, can you check them?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Jul 2009 02:17:34 +0000 (02:17 +0000)]
Add include needed for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76359
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Jul 2009 00:40:45 +0000 (00:40 +0000)]
Update CMake
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 19 Jul 2009 00:18:47 +0000 (00:18 +0000)]
Handle layout of non-virtual base classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76348
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 18 Jul 2009 21:48:39 +0000 (21:48 +0000)]
Refactor field layout into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76343
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 18 Jul 2009 21:26:44 +0000 (21:26 +0000)]
Rename NextOffset to DataSize, which better matches the Itanium C++ ABI
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76339
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 18 Jul 2009 21:19:52 +0000 (21:19 +0000)]
Migrate over to the record layout builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76338
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 21:18:10 +0000 (21:18 +0000)]
Re-enable 'test/SemaTemplate/temp_class_spec_neg.cpp', after commenting out the cause of the crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76337
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 21:17:58 +0000 (21:17 +0000)]
Introduce ASTLocation::getReferencedDecl(), for getting the declaration that the ASTLocation references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76336
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 21:17:43 +0000 (21:17 +0000)]
Handle invalid ASTLocations instead of asserting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 18 Jul 2009 20:50:59 +0000 (20:50 +0000)]
More layout builder work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76333
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 18 Jul 2009 20:20:21 +0000 (20:20 +0000)]
Add a new ASTRecordLayoutBuilder class. Not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 18 Jul 2009 19:55:20 +0000 (19:55 +0000)]
Disable this test for now, it has been crashing on linux for weeks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76328
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 18 Jul 2009 19:43:29 +0000 (19:43 +0000)]
Revert r75641.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 18 Jul 2009 15:38:31 +0000 (15:38 +0000)]
Fix typo from r76321.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76322
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 18 Jul 2009 15:33:26 +0000 (15:33 +0000)]
Remove ObjCQualifiedInterfaceType:-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76321
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 18 Jul 2009 15:13:36 +0000 (15:13 +0000)]
Fix RUN line to not litter the test directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76320
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 18 Jul 2009 15:09:16 +0000 (15:09 +0000)]
svn:ignore the build directories
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76319
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 18 Jul 2009 15:08:18 +0000 (15:08 +0000)]
Rename file in preparation of properly implementing C-style casts in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 18 Jul 2009 14:32:15 +0000 (14:32 +0000)]
Enhance testing of overriding exception specs for inaccessible base exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76317
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sat, 18 Jul 2009 09:26:51 +0000 (09:26 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:50:48 +0000 (08:50 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:50:35 +0000 (08:50 +0000)]
Introduce a redecl_iterator in Decl class, so that we can do a "iterate over all declarations of the same decl" without knowing the exact type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76298
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:50:13 +0000 (08:50 +0000)]
Introduce the Redeclarable template class, which serves as a base type defining the common interface for Decls that can be redeclared.
Make FunctionDecl and VarDecl use it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76297
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:49:56 +0000 (08:49 +0000)]
Remove StmtLocResolver::VisitObjCIvarRefExpr, it was only there to avoid returning an implicit 'self' instead of the ivar.
Since implicit 'self' no longer has a source location, it's not needed. (plus we also want to check for a 'self' that is visible in source code)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76296
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:49:37 +0000 (08:49 +0000)]
Don't add a SourceLocation for 'self' if it does not actually appears in the source code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76295
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sat, 18 Jul 2009 08:49:07 +0000 (08:49 +0000)]
Replace stmt visitors with the fall back method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76294
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 18 Jul 2009 06:27:51 +0000 (06:27 +0000)]
Fix crash in StoreManager::NewCastRegion() when handling casts from 'id' (or whatever) to a BlockPointerType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76288
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 18 Jul 2009 06:27:01 +0000 (06:27 +0000)]
Return CodeTextRegions for BlockPointerTypes in addition to FunctionPointerTypes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76287
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 18 Jul 2009 05:02:33 +0000 (05:02 +0000)]
Add test case for bug fix in r76262.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 18 Jul 2009 00:47:21 +0000 (00:47 +0000)]
Fix some fallout from CFGBuilder restructuring: all expressions that we explicitly handle have the possibility to be block-level expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76277
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:34:35 +0000 (00:34 +0000)]
Remove getFirstDeclaration/getLatestDeclaration from FunctionDecl and VarDecl.
Their usefulness is questionable since redecl_iterator was introduced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76275
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:34:25 +0000 (00:34 +0000)]
Remove ASTContext::getCanonicalDecl() and use Decl::getCanonicalDecl in its place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:34:07 +0000 (00:34 +0000)]
Move the functionality of ASTContext::getCanonicalDecl(), into a virtual method Decl::getCanonicalDecl().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76273
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:52 +0000 (00:33 +0000)]
Resolve a location that is inside an ObjCMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76272
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:46 +0000 (00:33 +0000)]
Make ASTLocation accept a Stmt that is inside an ObjCMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76271
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:40 +0000 (00:33 +0000)]
Search through all Decls that are DeclContexts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76270
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:33 +0000 (00:33 +0000)]
Set ObjCMethodDecl's EndLoc to the '}' when it's a definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76269
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:23 +0000 (00:33 +0000)]
Location should be passed to setLocEnd() not to setAtEndLoc() which belongs to ObjCContainerDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:08 +0000 (00:33 +0000)]
Add getSourceRange() methods for ObjC Decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Jul 2009 23:57:13 +0000 (23:57 +0000)]
fix objc codegen to not have its own list of things that eventually get into llvm.used, just
populate CGM's list directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76266
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Jul 2009 23:48:38 +0000 (23:48 +0000)]
This takes a long time to crash, just disable it for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 23:48:26 +0000 (23:48 +0000)]
Fix caching bug revealed by analyzing ClamAV using RegionStore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76262
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 22:57:50 +0000 (22:57 +0000)]
Fix possible null dereference in CFG construction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76261
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 22:45:54 +0000 (22:45 +0000)]
Remove bogus check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76259
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 22:38:26 +0000 (22:38 +0000)]
Add error message when clang-cc cannot be found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76256
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 22:18:43 +0000 (22:18 +0000)]
Restructure CFG builder to have just one visitor path instead of two. The result
is an algorithm that is much easier to understand and slightly more efficient.
Thanks to Mike Stump for our discussions on the CFGBuilder and his comments that
helped prompt this long needed cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76250
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 18:20:32 +0000 (18:20 +0000)]
Move WalkAST logic for 'ChooseExpr' to 'VisitChooseExpr'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 18:15:54 +0000 (18:15 +0000)]
Move WalkAST logic for 'ConditionalOperator' into 'VisitConditionalOperator'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76202
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 17 Jul 2009 18:10:27 +0000 (18:10 +0000)]
Fix indentation / trailing white space.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76200
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 18:04:55 +0000 (18:04 +0000)]
Remove stale comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 17:50:17 +0000 (17:50 +0000)]
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Jul 2009 15:50:19 +0000 (15:50 +0000)]
clean up this code, add the fixme back.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76180
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Jul 2009 15:46:27 +0000 (15:46 +0000)]
objc methods can't be an operand to callexpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 17 Jul 2009 07:49:44 +0000 (07:49 +0000)]
Rename Entity::getName() to Entity::getPrintableName() to make its purpose
more obvious.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76167
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 17 Jul 2009 07:36:20 +0000 (07:36 +0000)]
As suggested by Argyrios, revert r76159 and make "FindImmediateParent"
a public static method of ASTLocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 17 Jul 2009 07:29:51 +0000 (07:29 +0000)]
Refactor code into a new CallExpr::getDirectCallee() method. Simplify some
code with the new method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76164
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 17 Jul 2009 07:05:19 +0000 (07:05 +0000)]
CallGraph: add a bunch of stmt visitors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76161
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 17 Jul 2009 06:58:08 +0000 (06:58 +0000)]
Relax the assertion in ASTLocation's ctor: if the decl is not the immediate
parent of the stmt, find the immediate parent for the stmt.
This is because sometimes we cannot get the immediate decl of the stmt when
creating the ASTLocation. We can only get a parent of the stmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76159
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 17 Jul 2009 05:49:16 +0000 (05:49 +0000)]
CallGraph:
- add IfStmt visitor.
- print information only when a function has callee. Otherwise its ASTContext
map is NULL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76156
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 17 Jul 2009 01:31:16 +0000 (01:31 +0000)]
Fixup indentation of rest of switch statement to match llvm coding
conventions. Also reflowed comments and removed spaces at end of
lines and fixed up 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 01:20:38 +0000 (01:20 +0000)]
Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 17 Jul 2009 01:20:03 +0000 (01:20 +0000)]
If we are not doing a Debug build, no need for the debugging print methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 17 Jul 2009 01:19:49 +0000 (01:19 +0000)]
ObjCCategoryImplDecl and ObjCImplementation do not derive directly from DeclContext but from a new abstract ObjCImplDecl.
Reflect this change on the "DeclContext hierarchy".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 17 Jul 2009 01:19:03 +0000 (01:19 +0000)]
Check whether the IdentifierInfo is null, before using it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 17 Jul 2009 01:04:31 +0000 (01:04 +0000)]
Make noreturn functions alter the CFG.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 01:01:15 +0000 (01:01 +0000)]
Replace Type::getAsReferenceType() with Type::getAs<ReferenceType>().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 00:25:49 +0000 (00:25 +0000)]
Update cf_returns_retained/ns_returns_retained examples to use __has_feature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76130
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 17 Jul 2009 00:19:33 +0000 (00:19 +0000)]
Update test case to use '__has_feature' macro.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76129
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 16 Jul 2009 23:34:22 +0000 (23:34 +0000)]
Some more ?: for Obj-C tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76125
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 16 Jul 2009 22:10:11 +0000 (22:10 +0000)]
Fix unused variable warnings (with -Asserts)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 16 Jul 2009 22:04:59 +0000 (22:04 +0000)]
ir-gen for --/++ operators of objc object pointers
in 32bit abi.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76109
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 16 Jul 2009 21:55:48 +0000 (21:55 +0000)]
Add more testing of ?: for Obj-C object types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76108
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 16 Jul 2009 21:32:51 +0000 (21:32 +0000)]
[llvm up] Add support for '#' component of QA_OVERRIDE_GCC3_OPTIONS.
- This silences the output about how command line arguments are being changed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76107
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 16 Jul 2009 21:18:21 +0000 (21:18 +0000)]
Add extra print for --time-tests output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76104
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 16 Jul 2009 20:09:57 +0000 (20:09 +0000)]
Hook in s390x stuff into clang
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 16 Jul 2009 19:58:26 +0000 (19:58 +0000)]
Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.
The motivation behind this change is twofold:
1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.
2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.
Along with this patch:
a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 16 Jul 2009 18:13:04 +0000 (18:13 +0000)]
Move the source-level CFG from libAST to libAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 16 Jul 2009 18:10:20 +0000 (18:10 +0000)]
Add 'clang-wpa' to the CMake-based build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 16 Jul 2009 18:09:38 +0000 (18:09 +0000)]
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 16 Jul 2009 17:59:14 +0000 (17:59 +0000)]
Diagnose ++/-- op on objc pointers in
nonfragile abi, instead of crashing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 16 Jul 2009 16:48:25 +0000 (16:48 +0000)]
use CreateRuntimeVariable to get __CFConstantStringClassReference
instead of doing it manually (which might end up getting auto-renamed),
fixing a FIXME. rdar://
7065446
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 16 Jul 2009 16:21:02 +0000 (16:21 +0000)]
Cleanup a couple loops and improve a comment (based on feedback from Fariborz).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76078
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 16 Jul 2009 15:41:00 +0000 (15:41 +0000)]
Remove ASTContext::isObjCObjectPointerType().
Convert all clients to use the new predicate on Type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 16 Jul 2009 05:03:48 +0000 (05:03 +0000)]
codegen string literals using private linkage now like llvm-gcc, eliminating
some target hooks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75895
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 16 Jul 2009 02:02:48 +0000 (02:02 +0000)]
Unbreak build?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75887
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 16 Jul 2009 01:43:33 +0000 (01:43 +0000)]
Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75885
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 16 Jul 2009 01:33:37 +0000 (01:33 +0000)]
Move RegionStoreManager over to using new
ValueManager::makeArrayIndex()/convertArrayIndex() methods. This
handles yet another crash case when reasoning about array indices of
different bitwidth and signedness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75884
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 16 Jul 2009 01:32:00 +0000 (01:32 +0000)]
Two changes:
(1) Moved the SValuator object from GRExprEngine to ValueManager. This
allows ValueManager to use the SValuator when creating SVals.
(2) Added ValueManager::makeArrayIndex() and
ValueManager::convertToArrayIndex(), two SVal creation methods
that will help RegionStoreManager always have a consistent set of
SVals with the same integer size and type when reasoning about
array indices.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75882
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 16 Jul 2009 01:12:24 +0000 (01:12 +0000)]
Generate error on declaration containing 'static' and '__attribute__((weak))'
Patch by Ryan Flynn
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75879
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 16 Jul 2009 01:05:34 +0000 (01:05 +0000)]
update makefile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75878
91177308 -0d34-0410-b5e6-
96231b3b80d8