summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Initialize an otherwise-wild pointer. Fixes a crashy analyzerDouglas Gregor2009-07-301-1/+1
| | | | llvm-svn: 77599
* simple fixes.Zhongxing Xu2009-07-301-4/+2
| | | | llvm-svn: 77587
* Make AnalysisManager into its own source file and a pure data management class. Zhongxing Xu2009-07-301-169/+57
| | | | | | Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions(). llvm-svn: 77585
* This patch collects all analysis context data into a new class Zhongxing Xu2009-07-301-31/+17
| | | | | | AnalysisContext. llvm-svn: 77563
* Make tag declarations redeclarable. This change has three purposes:Douglas Gregor2009-07-292-0/+3
| | | | | | | | | | | | | | | | 1) Allow the Index library (and any other interested client) to walk the set of declarations for a given tag (enum, union, class, whatever). At the moment, this information is not readily available. 2) Reduce our dependence on TagDecl::TypeForDecl being mapped down to a TagType (for which getDecl() will return the tag definition, if one exists). This property won't exist for class template partial specializations. 3) Make the canonical declaration of a TagDecl actually canonical, e.g., so that it does not change when the tag is defined. llvm-svn: 77523
* Change uses of:Ted Kremenek2009-07-293-25/+25
| | | | | | | | | | | | | | | | | | | | Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
* Don't use a formatted ostream when writing .ll either.Daniel Dunbar2009-07-291-1/+1
| | | | llvm-svn: 77474
* Don't use a formatted ostream when writing .bc files. I don't really understandDaniel Dunbar2009-07-291-1/+1
| | | | | | this interface design, Chris please check. llvm-svn: 77473
* Add missing '"'Daniel Dunbar2009-07-291-1/+1
| | | | llvm-svn: 77416
* Make longjmp a real builtin.Mike Stump2009-07-282-0/+24
| | | | llvm-svn: 77291
* (1) Enable PlistDiagnostics to take an option "PathDiagnosticClientFactory"Ted Kremenek2009-07-273-16/+105
| | | | | | | | | | | | | | | object that it can use to forward PathDiagnostics for further processing. Along with this feature, the PlistDiagnostics object logs which files are created by the forwarding of the PathDiagnostics. (2) Create a new PathDiagnosticClientFactory object for HTMLDiagnostics, allowing other PathDiagnosticClients to forward PathDiagnostics through an opaque interface. (3) Create a "plist-html" diagnostics option in AnalysisConsumer to allow the logging of HTML files created in a hybrid Plist+HTML diagnostic client. llvm-svn: 77264
* Make ObjCImplDecl inherit from ObjCContainerDecl.Argyrios Kyrtzidis2009-07-272-4/+2
| | | | | | ObjCContainerDecl now is the root class for objc decls that contain methods. llvm-svn: 77235
* add gentoo 2009.0 g++ header locationsNuno Lopes2009-07-261-1/+9
| | | | llvm-svn: 77158
* Update for API change.Daniel Dunbar2009-07-261-1/+1
| | | | llvm-svn: 77112
* Lookup targets by Triple instead of Module.Daniel Dunbar2009-07-261-1/+2
| | | | llvm-svn: 77108
* Allow front-end 'isa' access on object's of type 'id'.Steve Naroff2009-07-242-0/+21
| | | | | | | | Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning). Still need back-end CodeGen for ObjCIsaExpr. llvm-svn: 76979
* Clean up the ActOnTag action, so that there is only a single entryDouglas Gregor2009-07-231-0/+1
| | | | | | | | | point that covers templates and non-templates. This should eliminate the flood of warnings I introduced yesterday. Removed the ActOnClassTemplate action, which is no longer used. llvm-svn: 76881
* Add initial implementation of checking for uses of floating point as a loop ↵Ted Kremenek2009-07-231-0/+5
| | | | | | counter. llvm-svn: 76833
* Add the location of the tag keyword into TagDecl. From EneaDouglas Gregor2009-07-212-2/+4
| | | | | | Zaffanella, with tweaks from Abramo Bagnara. llvm-svn: 76576
* define __STDC_VERSION__ processor token for c94Ryan Flynn2009-07-211-4/+7
| | | | llvm-svn: 76514
* Remove the ObjCCategoryImpls vector from Sema class.Argyrios Kyrtzidis2009-07-212-26/+0
| | | | | | Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality. llvm-svn: 76510
* Add yet more analysis for CFGs involving conditionals that are actually ↵Mike Stump2009-07-201-1/+1
| | | | | | constant. llvm-svn: 76500
* Reuse VarDecl::Init to store the default argument of a ParmVarDecl,Douglas Gregor2009-07-202-4/+0
| | | | | | | reducing the size of ParmVarDecl by one pointer. Also means that we'll properly (de-)serialize default arguments in C++ PCH files. llvm-svn: 76487
* Remove ObjCQualifiedInterfaceType:-)Steve Naroff2009-07-183-39/+17
| | | | llvm-svn: 76321
* Fix a comment.Zhongxing Xu2009-07-181-1/+1
| | | | llvm-svn: 76303
* Location should be passed to setLocEnd() not to setAtEndLoc() which belongs ↵Argyrios Kyrtzidis2009-07-181-1/+1
| | | | | | to ObjCContainerDecl. llvm-svn: 76268
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-173-24/+24
| | | | | | | | | 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. llvm-svn: 76193
* Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek2009-07-171-1/+1
| | | | | | Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
* Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek2009-07-162-23/+23
| | | | | | | | | | | | | | | | | | | | | 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>. llvm-svn: 76098
* Move the source-level CFG from libAST to libAnalysis.Ted Kremenek2009-07-161-1/+1
| | | | llvm-svn: 76092
* Lexically order files in CMakeLists.txt files.Ted Kremenek2009-07-151-1/+1
| | | | llvm-svn: 75832
* Reapply r75764: [llvm up] Switch to using the new TargetRegistryDaniel Dunbar2009-07-151-5/+5
| | | | llvm-svn: 75821
* Revert r75764 "[llvm up] Switch to using the new TargetRegistry" to fix build.Argyrios Kyrtzidis2009-07-151-5/+5
| | | | llvm-svn: 75814
* Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say ↵Steve Naroff2009-07-152-0/+4
| | | | | | | | | | | | pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective). This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-). This patch also adds Type::isObjCBuiltinType(). This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small. llvm-svn: 75808
* Update for raw_fd_ostream API changes. raw_fd_ostream now has aDan Gohman2009-07-153-2/+5
| | | | | | | Force flag to control whether the case of opening an existing file is considered an error. llvm-svn: 75802
* [llvm up] Switch to using the new TargetRegistry.Daniel Dunbar2009-07-151-5/+5
| | | | llvm-svn: 75764
* fix fallout of the LLVM codegen switching to formatted_raw_ostream.Chris Lattner2009-07-141-6/+11
| | | | llvm-svn: 75675
* Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella.Steve Naroff2009-07-142-1/+3
| | | | | Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary). llvm-svn: 75635
* Basic support for C++0x unicode types. Support for literals will follow in ↵Alisdair Meredith2009-07-142-0/+4
| | | | | | an incremental patch llvm-svn: 75622
* Read/write a CXXOperatorCallExpr from/to PCH files.Argyrios Kyrtzidis2009-07-142-1/+29
| | | | llvm-svn: 75598
* Read/write TagDecl's RBraceLoc from/to PCH files.Argyrios Kyrtzidis2009-07-142-0/+2
| | | | llvm-svn: 75592
* This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff2009-07-103-7/+8
| | | | | | | | | | | | The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
* Patch adds test to my previous patch for assigning toFariborz Jahanian2009-07-082-0/+2
| | | | | | | gc'able structs in the Next runtime and adds missing PCH info. llvm-svn: 75014
* Make ASTContext explicitly keep track of the declaration for the CDouglas Gregor2009-07-072-0/+12
| | | | | | | | | | | | | | | | | FILE type, rather than using name lookup to find FILE within the translation unit. Within precompiled headers, FILE is treated as yet another "special type" (like __builtin_va_list). This change should provide a performance improvement (not verified), since the lookup into the translation unit declaration forces the (otherwise unneeded) construction of a large hash table. More importantly, with precompiled headers, the construction of that table requires deserializing most of the top-level declarations from the precompiled header, which are then unused. Fixes PR 4509. llvm-svn: 74911
* Introduce the notion of "Relocatable" precompiled headers, which are builtDouglas Gregor2009-07-073-54/+156
| | | | | | | | | | | | with a particular system root directory and can be used with a different system root directory when the headers it depends on have been installed. Relocatable precompiled headers rewrite the file names of the headers used when generating the PCH file into the corresponding file names of the headers available when using the PCH file. Addresses <rdar://problem/7001604>. llvm-svn: 74885
* Update CMake files.Argyrios Kyrtzidis2009-07-061-1/+0
| | | | llvm-svn: 74864
* Move the 'ResolveLocationInAST' function from the Frontend library to the ↵Argyrios Kyrtzidis2009-07-061-332/+0
| | | | | | | | Index library. Also, cut down its comments; more comments will be added to ASTLocation. llvm-svn: 74860
* Move ASTLocation and DeclReferenceMap from the AST library to the Index library.Argyrios Kyrtzidis2009-07-061-1/+2
| | | | llvm-svn: 74859
* Rename 'ASTNode' -> 'ASTLocation'.Argyrios Kyrtzidis2009-07-061-4/+4
| | | | | | ASTLocation is a much better name for its intended purpose which to represent a "point" into the AST. llvm-svn: 74858
* Fix PR 4489, a crash in PCH loading that occurs when loading the nameDouglas Gregor2009-07-062-20/+81
| | | | | | | | | | of a top-level declaration loads another top-level declaration of the same name whose type depends on the first declaration having been completed. This commit breaks the circular dependency by delaying loads of top-level declarations triggered by loading a name until we are no longer recursively loading types or declarations. llvm-svn: 74847
OpenPOWER on IntegriCloud