summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Separate the parsing of type-specifiers from other declaration specifiers, ↵Douglas Gregor2008-11-071-112/+182
| | | | | | so that we can parse a C++ type-specifier-seq llvm-svn: 58854
* Properly deserialize ParamInfo of FunctionDecl.Argyrios Kyrtzidis2008-11-071-2/+6
| | | | | | | When allocating an array for ParamInfo, the "decl->getNumParams()" call was used, but this will return 0 since it checks ParamInfo (which isn't yet defined and is null). The result was that ParamInfo got an array of zero length to hold the ParmVarDecls. llvm-svn: 58850
* Fix crash caused by this:Argyrios Kyrtzidis2008-11-071-0/+4
| | | | | | | | void f() { int +; // crash here } llvm-svn: 58846
* Finish the implementation of VisitCompoundLiteralExpr. As VisitInitListExpr is Zhongxing Xu2008-11-074-35/+43
| | | | | | | | | available, things get much simplified. One addition is that CompoundLiteralExpr can appear both in rvalue and lvalue context. llvm-svn: 58837
* Make the assertion real.Zhongxing Xu2008-11-071-1/+1
| | | | llvm-svn: 58833
* Initial, rudimentary implementation of operator overloading for binaryDouglas Gregor2008-11-063-39/+151
| | | | | | | | | | | | | | | | | | operators. For example, one can now write "x + y" where x or y is a class or enumeration type, and Clang will perform overload resolution for "+" based on the overloaded operators it finds. The other kinds of overloadable operators in C++ will follow this same approach. Three major issues remain: 1) We don't find member operators 2) Since we don't have user-defined conversion operators, we can't call any of the built-in overloaded operators in C++ [over.built]. 3) Once we've done the semantic checks, we drop the overloaded operator on the floor; it doesn't get into the AST at all. llvm-svn: 58821
* Parsing, ASTs, and semantic analysis for the declaration of overloadedDouglas Gregor2008-11-068-1/+378
| | | | | | | | | operators in C++. Overloaded operators can be called directly via their operator-function-ids, e.g., "operator+(foo, bar)", but we don't yet implement the semantics of operator overloading to handle, e.g., "foo + bar". llvm-svn: 58817
* Reclaim some bits in IdentifierInfo, for later use as overloaded operator names.Douglas Gregor2008-11-061-2/+1
| | | | llvm-svn: 58806
* Sema-check virtual declarations. Complete dynamic_cast checking.Sebastian Redl2008-11-062-3/+25
| | | | llvm-svn: 58804
* Add the remaining C++0x keywordsDouglas Gregor2008-11-061-1/+6
| | | | llvm-svn: 58802
* Fix regression with handling of CFMakeCollectable.Ted Kremenek2008-11-051-1/+6
| | | | llvm-svn: 58771
* Improve assert messages.Sebastian Redl2008-11-051-2/+2
| | | | llvm-svn: 58770
* Move named cast sema functions to their own file.Sebastian Redl2008-11-052-660/+677
| | | | llvm-svn: 58769
* Parsing, representation, and preliminary semantic analysis of destructors.Douglas Gregor2008-11-057-98/+359
| | | | | | | | | | | Implicit declaration of destructors (when necessary). Extended Declarator to store information about parsed constructors and destructors; this will be extended to deal with declarators that name overloaded operators (e.g., "operator +") and user-defined conversion operators (e.g., "operator int"). llvm-svn: 58767
* A small error message improvement and some comment cleanup for static_cast.Sebastian Redl2008-11-051-13/+27
| | | | llvm-svn: 58762
* initXXX methods can return owned objectsTed Kremenek2008-11-051-2/+7
| | | | llvm-svn: 58758
* Keep track of whether a C++ class is an aggregate. Don't allow ↵Douglas Gregor2008-11-053-7/+42
| | | | | | initialization of non-aggregates with initializer lists. llvm-svn: 58757
* Implement C++ copy-initialization for declarations. There is now someDouglas Gregor2008-11-055-43/+123
| | | | | | | | duplication in the handling of copy-initialization by constructor, which occurs both for initialization of a declaration and for overloading. The initialization code is due for some refactoring. llvm-svn: 58756
* Initial implementation of parsing, semantic analysis, and AST-buildingDouglas Gregor2008-11-057-11/+279
| | | | | | | | | | | | | for constructor initializations, e.g., class A { }; class B : public A { int m; public: B() : A(), m(17) { }; }; llvm-svn: 58749
* Update CMakeLists.txtCedric Venet2008-11-041-0/+1
| | | | llvm-svn: 58716
* Make it an error if an Objective-C declaration is not in the global scope.Anders Carlsson2008-11-042-6/+44
| | | | llvm-svn: 58705
* LinkageSpecDecl is c++ specific, move it to DeclCXXChris Lattner2008-11-043-7/+9
| | | | llvm-svn: 58704
* Some cleanup of the cast checkers. Don't canonicalize types when not needed. ↵Sebastian Redl2008-11-044-54/+29
| | | | | | Use distinct diagnostics for distinct errors. llvm-svn: 58700
* Add a new expression class, ObjCSuperExpr, to handle the Objective-C ↵Douglas Gregor2008-11-0410-17/+48
| | | | | | 'super'. Remove ObjCThis from PredefinedExpr llvm-svn: 58698
* Create a new expression class, CXXThisExpr, to handle the C++ 'this' primary ↵Douglas Gregor2008-11-046-19/+36
| | | | | | expression. Remove CXXThis from PredefinedExpr llvm-svn: 58695
* Now that we have copy initialization support, use it for checking the ↵Douglas Gregor2008-11-041-11/+3
| | | | | | default arguments llvm-svn: 58692
* Diagnose use of 'this' in a C++ default argument. Thanks to Eli for ↵Douglas Gregor2008-11-041-7/+14
| | | | | | correcting my bogus assertion about it already being handled llvm-svn: 58691
* Trivial style fix.Sebastian Redl2008-11-041-1/+1
| | | | llvm-svn: 58689
* #define NULL as 0 when compiling as C++. This fixes the carbon.cpp and ↵Anders Carlsson2008-11-041-0/+5
| | | | | | cocoa.mm test failures. llvm-svn: 58685
* Implement lowering of va_arg in clang directly. (This is 32-bit X86 only for ↵Anders Carlsson2008-11-044-4/+55
| | | | | | now). llvm-svn: 58681
* Fix bug in va_copyAnders Carlsson2008-11-041-1/+1
| | | | llvm-svn: 58680
* Handle prefix '_' that may appear in front of the name of 'Release' functionsTed Kremenek2008-11-041-6/+3
| | | | llvm-svn: 58666
* Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 ↵Steve Naroff2008-11-032-4/+6
| | | | | | < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513 llvm-svn: 58654
* Hook up the Plist diagnostic client to the driver.Ted Kremenek2008-11-031-5/+12
| | | | | | Fix Plist output. llvm-svn: 58652
* Check that this cannot be used in a default argument. Happily, it was ↵Douglas Gregor2008-11-031-2/+7
| | | | | | already implemented llvm-svn: 58649
* Add path diagnostics client for emitting path reports using Plists.Ted Kremenek2008-11-031-0/+230
| | | | llvm-svn: 58647
* Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'Ted Kremenek2008-11-031-1/+1
| | | | llvm-svn: 58646
* Implicit support for direct initialization of objects of class type, e.g.,Douglas Gregor2008-11-034-10/+115
| | | | | | X x(5, 7); llvm-svn: 58641
* Standard conversion sequences now have a CopyConstructor field, toDouglas Gregor2008-11-035-44/+94
| | | | | | | | | | | | | | | cope with the case where a user-defined conversion is actually a copy construction, and therefore can be compared against other standard conversion sequences. While I called this a hack before, now I'm convinced that it's the right way to go. Compare overloads based on derived-to-base conversions that invoke copy constructors. Suppress user-defined conversions when attempting to call a user-defined conversion. llvm-svn: 58629
* Add implicitly-declared default and copy constructors to C++ classes,Douglas Gregor2008-11-035-15/+152
| | | | | | | | | | | when appropriate. Conversions for class types now make use of copy constructors. I've replaced the egregious hack allowing class-to-class conversions with a slightly less egregious hack calling these conversions standard conversions (for overloading reasons). llvm-svn: 58622
* Eliminate header dependency ASTContext -> TargetInfoDouglas Gregor2008-11-031-2/+3
| | | | llvm-svn: 58613
* Implement C++ DR 106 and C++ DR 540, both of which deal withDouglas Gregor2008-11-032-7/+53
| | | | | | | | | | | reference-collapsing. Implement diagnostic for formation of a reference to cv void. Drop cv-qualifiers added to a reference type when the reference type comes from a typedef. llvm-svn: 58612
* Connect ASTContext to TargetInfo when determining the size_t, ptrdiff_t, and ↵Douglas Gregor2008-11-031-9/+22
| | | | | | wchar_t types. Fixes recent breakage on Linux. llvm-svn: 58609
* Fix PR3001: if we have an error parsing an initializer, make sure to removeChris Lattner2008-11-031-2/+10
| | | | | | | the designator corresponding to it, otherwise Sema and later parsing will get confused. llvm-svn: 58603
* privatize some methods.Chris Lattner2008-11-031-0/+3
| | | | llvm-svn: 58602
* Add some notes for SCA.Zhongxing Xu2008-11-031-0/+31
| | | | llvm-svn: 58597
* Fix 80-col violations.Zhongxing Xu2008-11-031-2/+2
| | | | llvm-svn: 58596
* - Remove AnonTypedRegion, which is not to be used.Zhongxing Xu2008-11-031-15/+9
| | | | | | - Prepare AnonPointeeRegioin for later use. llvm-svn: 58595
* Source ranges for named cast diagnostics.Sebastian Redl2008-11-022-49/+63
| | | | llvm-svn: 58570
* 1. When a pointer to struct is used as an argument, GRSimpleVals::EvalCall()Zhongxing Xu2008-11-021-18/+23
| | | | | | | | | | | sets the whole struct to Unknown. Then we cannot assume the V passed to BindStruct() is always a CompoundVal. When it is an UnknownVal, we call BindStructToVal(UnknownVal). 2. Change the signature of InitializeStructToUndefined() to BindStructToVal() to reuse the code. llvm-svn: 58564
OpenPOWER on IntegriCloud