summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Keep track of the Expr used to describe the size of an array type,Douglas Gregor2009-07-062-2/+49
| | | | | | from Enea Zaffanella! llvm-svn: 74831
* Avoid re-checking the parameters of a function, when trying to resolve a ↵Argyrios Kyrtzidis2009-07-051-5/+12
| | | | | | location. llvm-svn: 74799
* Make use of ASTNode for return value of clang::ResolveLocationInAST() and in ↵Argyrios Kyrtzidis2009-07-051-4/+4
| | | | | | the index-test tool. llvm-svn: 74798
* Do an early check for function definition.Argyrios Kyrtzidis2009-07-051-10/+12
| | | | llvm-svn: 74796
* Add support for retrieving the Doxygen comment associated with a givenDouglas Gregor2009-07-022-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | declaration in the AST. The new ASTContext::getCommentForDecl function searches for a comment that is attached to the given declaration, and returns that comment, which may be composed of several comment blocks. Comments are always available in an AST. However, to avoid harming performance, we don't actually parse the comments. Rather, we keep the source ranges of all of the comments within a large, sorted vector, then lazily extract comments via a binary search in that vector only when needed (which never occurs in a "normal" compile). Comments are written to a precompiled header/AST file as a blob of source ranges. That blob is only lazily loaded when one requests a comment for a declaration (this never occurs in a "normal" compile). The indexer testbed now supports comment extraction. When the -point-at location points to a declaration with a Doxygen-style comment, the indexer testbed prints the associated comment block(s). See test/Index/comments.c for an example. Some notes: - We don't actually attempt to parse the comment blocks themselves, beyond identifying them as Doxygen comment blocks to associate them with a declaration. - We won't find comment blocks that aren't adjacent to the declaration, because we start our search based on the location of the declaration. - We don't go through the necessary hops to find, for example, whether some redeclaration of a declaration has comments when our current declaration does not. Similarly, we don't attempt to associate a \param Foo marker in a function body comment with the parameter named Foo (although that is certainly possible). - Verification of my "no performance impact" claims is still "to be done". llvm-svn: 74704
* Fix PR 4489, a PCH crash during de-serialization.Douglas Gregor2009-07-012-2/+0
| | | | llvm-svn: 74664
* Update for changes in LLVM. Hopefully this is the last one for a while.Owen Anderson2009-07-011-2/+2
| | | | llvm-svn: 74657
* Hold the LLVMContext by reference instead of by pointer.Owen Anderson2009-07-011-2/+2
| | | | llvm-svn: 74642
* Add header search path for Gentoo stable, x86_64 version.Sebastian Redl2009-07-011-0/+8
| | | | llvm-svn: 74626
* Update for LLVMContext+Module change.Owen Anderson2009-07-011-4/+7
| | | | llvm-svn: 74615
* Fix for PR4192: fix the definition of int64_t on x86_64 Linux.Eli Friedman2009-07-011-1/+1
| | | | | | | | | | | | | Note that I'm guessing that *BSD and Solaris do the same thing as Linux here, but it's quite possible I'm wrong; if the following testcase gives an error on x86-64 with gcc for any of those operating systems, please tell me: #include <stdint.h> int64_t x; long x; llvm-svn: 74583
* remove dead code.Zhongxing Xu2009-06-301-2/+0
| | | | llvm-svn: 74517
OpenPOWER on IntegriCloud