summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Produce good looking diagnostics on ambiguous built-in operators.Fariborz Jahanian2009-10-091-8/+6
| | | | | | | | | | | | | | Now we produce things like: bug1.cpp:21:11: error: use of overloaded operator '->*' is ambiguous int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \ ~^ ~~~ bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int const struct A::*') bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int restrict struct A::*') ... Still need to look at an issue (indicated as FIXME in the test case). llvm-svn: 83650
* Use the new API for applying the qualifiers on built-in '->*' Fariborz Jahanian2009-10-091-5/+3
| | | | | | operator's types. llvm-svn: 83648
* Make the behavior explicit by not using the method call.Zhongxing Xu2009-10-091-2/+2
| | | | llvm-svn: 83611
* Remove unused code.Zhongxing Xu2009-10-091-7/+0
| | | | llvm-svn: 83610
* Avoid warning.Mike Stump2009-10-091-1/+1
| | | | llvm-svn: 83609
* Improve on reporting ambiguity involving built-in candidates.Fariborz Jahanian2009-10-092-11/+12
| | | | | | I still don't like it but it is improvement over what we had. llvm-svn: 83603
* Add a refactor pointer...Mike Stump2009-10-081-0/+2
| | | | llvm-svn: 83599
* - Fixup SortCodeCompleteResult() to properly sort keywords on Mac OS ↵Steve Naroff2009-10-081-1/+1
| | | | | | | | (compare was system dependent). Worked on Linux, failed on Mac OS (which caused the recently added testcase to fail on Linux). - Sort results in testcase. llvm-svn: 83597
* Set up include paths for VC++ and Cygwin headers, along with theMike Stump2009-10-081-80/+249
| | | | | | | existing MinGW headers, plus the newer 4.4.0 version. Patch by John Thompson. llvm-svn: 83594
* "Someone pointed out that in my previous Targets.cpp patch I didn'tMike Stump2009-10-081-0/+1
| | | | | | | handle the long size difference for one of the Windows targets." Patch by John Thompson. llvm-svn: 83592
* This fixes support for complex literals, reworked to avoid a goto, andMike Stump2009-10-081-24/+44
| | | | | | | to add a flag noting the presence of a Microsoft extension suffix (i8, i16, i32, i64). Patch by John Thompson. llvm-svn: 83591
* Fix up error reporting when object cannot be constructed Fariborz Jahanian2009-10-081-2/+3
| | | | | | | because of missing default constructor of a member. Fixes pr5154. llvm-svn: 83583
* Installation of Clang libraries and headers, from Axel Naumann!Douglas Gregor2009-10-0811-33/+0
| | | | llvm-svn: 83582
* Add code completion support for ObjC property declarations/attributes.Steve Naroff2009-10-083-0/+33
| | | | llvm-svn: 83579
* Implement support for -Wunused-variable, from Oscar Bonilla!Douglas Gregor2009-10-082-3/+12
| | | | llvm-svn: 83577
* Record location info before emiting alloca for arguments. This allows ↵Devang Patel2009-10-081-3/+6
| | | | | | arguments to have proper location info. llvm-svn: 83567
* Implement [expr.mptr.oper]p6 for '->*' operator.Fariborz Jahanian2009-10-081-2/+12
| | | | llvm-svn: 83562
* Remove use of std::ofstream in HTMLDiagnostics.cpp.Ted Kremenek2009-10-081-20/+17
| | | | llvm-svn: 83560
* If a global initializer has a non-trivial constructor or destructor, we ↵Anders Carlsson2009-10-081-0/+11
| | | | | | | | | | | | | | | | | | | never want to defer generation of it, even if it is declared static. With this change we're finally able to compile and run the (infamous) #include <string> #include <iostream> int main(int argc, char **argv) { std::cout << "Hello, World" << std::endl; } $ clang hello.cpp -lstdc++ -o hello $ ./hello Hello, World llvm-svn: 83559
* Mangle std::basic_ostream<char, std::char_traits<char>> as So.Anders Carlsson2009-10-081-0/+18
| | | | llvm-svn: 83557
* Add more testing for the properties of explicit specialization. Douglas Gregor2009-10-081-0/+2
| | | | | | | Also, eliminate a redundant diagnostic by marking a variable declared with incomplete type as an invalid declaration. llvm-svn: 83553
* Refactoring to further simplify collection of visible conversionFariborz Jahanian2009-10-081-22/+16
| | | | | | functions. llvm-svn: 83552
* Don't complain about out-of-line explicit specializations of memberDouglas Gregor2009-10-081-2/+4
| | | | | | | | function and member function templates that are not definitions. Add more tests to ensure that explicit specializations of member function templates prevent instantiation. llvm-svn: 83550
* Improve checking for specializations of member classes of classDouglas Gregor2009-10-086-22/+114
| | | | | | | | | | | templates, and keep track of how those member classes were instantiated or specialized. Make sure that we don't try to instantiate an explicitly-specialized member class of a class template, when that explicit specialization was a declaration rather than a definition. llvm-svn: 83547
* For instantiations of static data members of class templates, keepDouglas Gregor2009-10-088-54/+135
| | | | | | | | track of the kind of specialization or instantiation. Also, check the scope of the specialization and ensure that a specialization declaration without an initializer is not a definition. llvm-svn: 83533
* Make sure to set the template specialization kind of an explicitDouglas Gregor2009-10-082-8/+3
| | | | | | | template instantiation of a member function of a class template. FIXME -= 2; llvm-svn: 83520
* Only perform an implicit instantiation of a function if its templateDouglas Gregor2009-10-081-9/+3
| | | | | | | | | specialization kind is TSK_ImplicitInstantiation. Previously, we would end up implicitly instantiating functions that had explicit specialization declarations or explicit instantiation declarations (with no corresponding definitions). llvm-svn: 83511
* Keep track of whether a member function instantiated from a memberDouglas Gregor2009-10-074-29/+65
| | | | | | | | | function of a class template was implicitly instantiated, explicitly instantiated (declaration or definition), or explicitly specialized. The same MemberSpecializationInfo structure will be used for static data members and member classes as well. llvm-svn: 83509
* Refactoring around friend class templates. Better error message for friend ↵John McCall2009-10-072-74/+19
| | | | | | | | enums. Don't create a new declaration for friend classes if a declaration already exists. llvm-svn: 83505
* Type checking for specializations of member functions of classDouglas Gregor2009-10-073-21/+119
| | | | | | | | templates. Previously, these weren't handled as specializations at all. The AST for representing these as specializations is still a work in progress. llvm-svn: 83498
* Handle MemberExprs in ResolveAddressOfOverloadedFunction.Anders Carlsson2009-10-071-0/+3
| | | | llvm-svn: 83495
* Dead code elimination.John McCall2009-10-071-20/+1
| | | | llvm-svn: 83492
* Fixes problem in finding visible convertion functions of a classFariborz Jahanian2009-10-071-29/+63
| | | | | | | | where matching conversion types in base classes were still visible. Plus refactoring and cleanup. Added a test case. llvm-svn: 83485
* Diagnose explicit instantiations and specializations that occur in class scopeDouglas Gregor2009-10-071-4/+6
| | | | llvm-svn: 83473
* When building candidate set for built-ins; when looking forFariborz Jahanian2009-10-071-2/+1
| | | | | | | convesion functions, look in base classes to. (Removes a FIXME). llvm-svn: 83472
* Class template partial specializations can be declared anywhere thatDouglas Gregor2009-10-072-4/+21
| | | | | | | | | | its definition may be defined, including in a class. Also, put in an assertion when trying to instantiate a class template partial specialization of a member template, which is not yet implemented. llvm-svn: 83469
* Removed couple of unnecessary canonicalizationFariborz Jahanian2009-10-071-2/+2
| | | | | | per Doug's obsevation. llvm-svn: 83464
* Revert r83443.Ted Kremenek2009-10-074-14/+7
| | | | llvm-svn: 83451
* Mangle anonymous structs/unions correctly. Fixes PR5139.Anders Carlsson2009-10-072-3/+45
| | | | llvm-svn: 83448
* Fixup pathnames.Mike Stump2009-10-074-7/+14
| | | | llvm-svn: 83443
* Add a MangleContext and pass it to all mangle functions. It will be used for ↵Anders Carlsson2009-10-075-42/+58
| | | | | | keeping state, such as identifiers assigned to anonymous structs as well as scope encoding. llvm-svn: 83442
* Change ExplodedNode to have its NodeGroups all BumpPtrAllocated, avoiding ↵Ted Kremenek2009-10-073-44/+35
| | | | | | | | malloc() traffic when adding successors/predecessors to a node. This was done by introducing BumpVector, which is essentially SmallVector with all memory being BumpPtrAllocated (this can certainly be cleaned up or moved into llvm/ADT). This change yields a 1.8% speed increase when running the analyzer (with -analyzer-store=region) on a small benchmark file. llvm-svn: 83439
* Refactor checking of the scope of explicit template specializationDouglas Gregor2009-10-072-93/+147
| | | | | | | | | declarations and explicit template instantiations, improving diagnostics and making the code usable for function template specializations (as well as class template specializations and partial specializations). llvm-svn: 83436
* Fix eof.Mike Stump2009-10-061-1/+1
| | | | llvm-svn: 83433
* Patch to implement C++ [over.built]p11 of overload resolution.Fariborz Jahanian2009-10-061-1/+39
| | | | | | | | Doug, please review. There is a FIXME in the test case with a question which is unrelated to this patch (that is, error is issued before set of builtins are added to the candidate list). llvm-svn: 83429
* Uncomment some commented out code.Anders Carlsson2009-10-061-4/+4
| | | | llvm-svn: 83428
* Change GetAddressCXXOfBaseClass to use CXXBasePaths for calculating base ↵Anders Carlsson2009-10-063-66/+135
| | | | | | class offsets. Fix the code to handle virtual bases as well. llvm-svn: 83426
* When mangling names, always use the canonical decl. Fixes PR5144.Anders Carlsson2009-10-061-1/+1
| | | | llvm-svn: 83420
* InsertSubprogramStart if ATTACH_DEBUG_INFO_TO_AN_INSN is not defined.Devang Patel2009-10-061-1/+3
| | | | llvm-svn: 83419
* Test explicit specialization for all of the various cases whereDouglas Gregor2009-10-061-1/+1
| | | | | | | explicit specializations can occur. Also, fix a minor recovery bug where we should allow declarations coming from the parser to be NULL. llvm-svn: 83416
OpenPOWER on IntegriCloud