summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Support local namespace aliases and permit them to be instantiated.John McCall2010-02-162-1/+17
| | | | llvm-svn: 96335
* Emit vbase offsets.Anders Carlsson2010-02-161-4/+38
| | | | llvm-svn: 96329
* More work on the new layout code.Anders Carlsson2010-02-161-11/+66
| | | | llvm-svn: 96328
* When emitting complete destructors for classes with virtual bases, computeJohn McCall2010-02-162-36/+64
| | | | | | | | | | | | the offset to the virtual bases statically inside of relying on the virtual base offsets in the object's vtable(s). This is both more efficient and sound against the destructor's manipulation of the vtables. Also extract a few helper routines. Oh and we seem to pass all tests with an optimized clang now. llvm-svn: 96327
* White-list comma expressions with the literal 0 as their RHS againstJohn McCall2010-02-161-1/+9
| | | | | | unused-value warnings. This is a common macro idiom. llvm-svn: 96326
* Make the various type-decl Types (and their associated ASTContext routines)John McCall2010-02-162-9/+11
| | | | | | accept const decls. llvm-svn: 96325
* Re-applying 96173. Looks like finally I got the test case right.Sanjiv Gupta2010-02-161-5/+7
| | | | llvm-svn: 96321
* ASTUnit: Constant fold UseBumpAllocator to true, we don't care to support ↵Daniel Dunbar2010-02-162-6/+4
| | | | | | this as an argument. llvm-svn: 96316
* ASTUnit::LoadFromCompilerInvocation - Take ownership of the provided invocation.Daniel Dunbar2010-02-161-7/+4
| | | | llvm-svn: 96315
* CompilerInstance: Move LLVMContext member out of constructor.Daniel Dunbar2010-02-161-7/+6
| | | | llvm-svn: 96314
* Refactor the logic for printf argument type-checking into ↵Ted Kremenek2010-02-162-132/+202
| | | | | | | | | | analyze_printf::ArgTypeResult. Implement printf argument type checking for '%s'. Fixes <rdar://problem/3065808>. llvm-svn: 96310
* Skeleton for importing Objective-C classesDouglas Gregor2010-02-161-1/+97
| | | | llvm-svn: 96306
* Don't import __va_list_tag or __builtin_va_list when mergingDouglas Gregor2010-02-161-0/+6
| | | | llvm-svn: 96299
* Cope with anonymous tags defined within declarators by structurallyDouglas Gregor2010-02-151-82/+142
| | | | | | | | | | | | | | | | | | | | comparing their types under the assumption that they are equivalent, rather than importing the types and then checking for compatibility. A few minor tweaks here: - Teach structural matching to handle compatibility between function types with prototypes and those without prototypes. - Teach structural matching that an incomplete record decl is the same as any other record decl with the same name. - Keep track of pairs of declarations that we have already checked (but failed to find as structurally matching), so we don't emit diagnostics repeatedly. - When importing a typedef of an anonymous tag, be sure to link the imported tag type to its typedef. With these changes, we survive a repeated import of <stdlib.h> and <stdio.h>. Alas, the ASTNodeImporter is getting a little grotty. llvm-svn: 96298
* Convert GRExprEngine's handling of ObjCMessageExprs to use a worklistTed Kremenek2010-02-151-202/+208
| | | | | | to evaluate arguments. llvm-svn: 96293
* Add Sema support for __builtin_fpclassify by extending the existing check ↵Benjamin Kramer2010-02-152-10/+15
| | | | | | for __builtin_isinf and friends. Part of PR6083. llvm-svn: 96291
* Issue a bettter diagnostics for incorrect property setter name.Fariborz Jahanian2010-02-151-1/+2
| | | | | | (radar 7647953). llvm-svn: 96284
* Fix instantiation of template functions with local classes that contain virtualChandler Carruth2010-02-151-1/+10
| | | | | | methods. llvm-svn: 96283
* Tell ASTMerge to merge every declaration it sees, rather than cherry-picking ↵Douglas Gregor2010-02-151-15/+1
| | | | | | those declarations that we know will work. llvm-svn: 96280
* Reimplement the structural-equality checks used to determine whetherDouglas Gregor2010-02-151-272/+874
| | | | | | | | | | | | | | two types in different AST contexts are equivalent. Rather than transforming the type from one context into the other context, we perform a deep structural comparison of the types. This change addresses a serious problem with recursive data types like struct ListNode { int value; struct ListNode *Next; } xList; llvm-svn: 96278
* Class continuation now has its own property ast forFariborz Jahanian2010-02-152-59/+95
| | | | | | | | those declared in it. This is to allow duplicate property diagnostics for properties declared in class extensions multiple times (radar 7629420) and for future use. llvm-svn: 96276
* Fix a broken rewritin of @implementation keyword.Fariborz Jahanian2010-02-151-1/+1
| | | | | | (fixes radar 7649577). llvm-svn: 96270
* Optimize the implementation of IdDeclInfo pooling in the IdentifierResolver.John McCall2010-02-151-13/+25
| | | | llvm-svn: 96253
* Use getLocStart(), instead of getLocEnd(), to record starting location of ↵Devang Patel2010-02-151-1/+1
| | | | | | objc method. :) llvm-svn: 96245
* reverting back 96242 as it still causes a test failure.Sanjiv Gupta2010-02-151-7/+5
| | | | llvm-svn: 96244
* Re-applying 96173 with corresponding changes in test.Sanjiv Gupta2010-02-151-5/+7
| | | | llvm-svn: 96242
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-154-19/+19
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96224
* Defer covariance checks for dependent types. Add test cases that also ensureChandler Carruth2010-02-151-1/+2
| | | | | | they are re-checked on instantiation. llvm-svn: 96217
* Simplify code. If we can reach here, the base must be virtual.Zhongxing Xu2010-02-151-5/+4
| | | | llvm-svn: 96211
* When emitting an aggregate into a temporary, make sure we set the alignmentJohn McCall2010-02-151-1/+1
| | | | | | | | | on the alloca. The fact that codegen makes this class of bug so wonderfully easy to make is embarrassing. llvm-svn: 96204
* clang::Attr objects should be treated as AST nodes as well byTed Kremenek2010-02-141-1/+5
| | | | | | the LLVMConventionsChecker. llvm-svn: 96202
* Add LLVM conventions check that scans for AST elements (types, stmts, decls)Ted Kremenek2010-02-141-13/+194
| | | | | | that allocate heap memory. llvm-svn: 96184
* Change LLVMConventionsChecker to accept an entire translation unit insteadTed Kremenek2010-02-142-7/+22
| | | | | | | | | | | | | | | | of operating on each code decl. This exposes two flaws in AnalysisConsumer that should eventually be fixed: (1) It is not possible to associate multiple "actions" with a single command line argument. This will require the notion of an "analysis" group, and possibly tablegen support. (although eventually we want to support dynamically loading analyses as well) (2) AnalysisConsumer may not actually be scanning the declarations in namespaces. We'll experiment first in LLVMConventionsChecker before changing the behavior in AnalysisConsumer. llvm-svn: 96183
* Rework translation unit actions to actually take an entire translation unitTed Kremenek2010-02-141-43/+50
| | | | | | as imput. llvm-svn: 96182
* For the StringRef check, also visit the children of DeclStmts.Ted Kremenek2010-02-141-0/+3
| | | | llvm-svn: 96181
* Place type-checking static methods at type of file (where they will congregate).Ted Kremenek2010-02-141-33/+37
| | | | | | No functionality change. llvm-svn: 96180
* temporarily revert 96173, it is causing test failures.Chris Lattner2010-02-141-7/+5
| | | | llvm-svn: 96176
* renamed pic16 specifiic macros.Sanjiv Gupta2010-02-141-5/+7
| | | | llvm-svn: 96173
* Don't compute final overriders or build vtables for bases that don't need a ↵Anders Carlsson2010-02-141-3/+17
| | | | | | vtable. llvm-svn: 96171
* Pass StringRefs to InsertText/ReplaceText in RewriteObjC and remove a ton of ↵Benjamin Kramer2010-02-141-120/+91
| | | | | | unnecessary length arguments. llvm-svn: 96164
* Fix pr6293. If ptr is NULL, no operation is preformed.Zhongxing Xu2010-02-141-0/+5
| | | | llvm-svn: 96154
* Add new static analyzer for checking LLVM coding conventions: ↵Ted Kremenek2010-02-143-0/+136
| | | | | | | | | | | | | -analyzer-check-llvm-conventions Currently these checks are intended to be largely syntactical, but may get more sophisticated over time. As an initial foray into this brave new world, emit a static analyzer warning when binding a temporary 'std::string' to an 'llvm::StringRef' where the lifetime of the 'std::string' does not outlive the 'llvm::StringRef'. llvm-svn: 96147
* Two changes to AnalysisConsumer::HandleTopLevelSingleDecl():Ted Kremenek2010-02-141-23/+11
| | | | | | | | | | | | (1) Since CXXMethodDecl subclasses FunctionDecl (and CXXDestructorDecl and CXXConversion subclass CXXMethodDecl), refactor switch statement to handle them all in one spot. (2) Use 'DeclarationName::getAsString()' to handle all functions that don't have simple identifiers (fixing a null dereference when scanning for specific functions). llvm-svn: 96146
* Improve the diagnostic given when referring to a tag type without a tag (in C)John McCall2010-02-141-1/+1
| | | | | | | | | or that's been hidden by a non-type (in C++). The ideal C++ diagnostic here would note the hiding declaration, but this is a good start. llvm-svn: 96141
* Build fix.Anders Carlsson2010-02-141-1/+1
| | | | llvm-svn: 96140
* Baby steps towards teaching FinalOverriders about virtual bases.Anders Carlsson2010-02-141-14/+31
| | | | llvm-svn: 96139
* Don't try to layout construction vtables for now.Anders Carlsson2010-02-141-1/+2
| | | | llvm-svn: 96138
* Improve support for non-virtual 'this' pointer adjustments. With this, it ↵Anders Carlsson2010-02-141-27/+41
| | | | | | should be possible to use the new vtable layout code for all class hierarchies that do not involve virtual bases. llvm-svn: 96137
* Add basic support for simple non-virtual 'this' pointer adjustments.Anders Carlsson2010-02-131-5/+85
| | | | llvm-svn: 96136
* Add support for very simple non-virtual this adjustments in the ↵Anders Carlsson2010-02-131-17/+68
| | | | | | FinalOverriders class. llvm-svn: 96133
OpenPOWER on IntegriCloud