summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Implement codegen for __builtin_isnormal.Benjamin Kramer2010-05-192-5/+27
| | | | llvm-svn: 104118
* Provide a naming class for UnresolvedLookupExprs, even when occuring onChandler Carruth2010-05-193-12/+23
| | | | | | | | | | | template names. We were completely missing naming classes for many unqualified lookups, but this didn't trigger code paths that need it. This removes part of an optimization that re-uses the template name lookup done by the parser to determine if explicit template arguments actually form a template-id. Unfortunately the technique for avoiding the duplicate lookup lost needed data such as the class context in which the lookup succeeded. llvm-svn: 104117
* Profile type-dependent uses of overloaded operators in C++ the sameDouglas Gregor2010-05-192-0/+224
| | | | | | | way regardless of whether some overloaded operator functions were found by name lookup within the template. Fixes PR6851. llvm-svn: 104107
* Teach clang to instantiate attributes on more declarations. Fixes PR7102.Douglas Gregor2010-05-193-9/+60
| | | | llvm-svn: 104106
* Implement C++ builtin operator candidates for vector types.Douglas Gregor2010-05-193-22/+161
| | | | llvm-svn: 104105
* Fix a GCC warning about inline functions not being defined. Until r104081, onlyChandler Carruth2010-05-191-3/+3
| | | | | | | | | the same .cpp file as provided the definitions referenced these functions, hiding the issue. However, they are clearly no longer inline. Let me know if there is a reason to move their definitions to the header and make them truly inline. llvm-svn: 104104
* Fix an obvious goof that rjmccall found by inspection. No testcase, suggestionsChandler Carruth2010-05-191-1/+1
| | | | | | welcome for one. llvm-svn: 104101
* Basic test for user-defined conversions involving vector typesDouglas Gregor2010-05-181-3/+23
| | | | llvm-svn: 104085
* Misc. fixes to bring Objetive-C++'s handling ofFariborz Jahanian2010-05-183-4/+15
| | | | | | | gc attributes to be inline with Objective-C (for radar 7925141). llvm-svn: 104084
* Protect isIntegerConstantExpr from seeing type- or value-dependentDouglas Gregor2010-05-184-16/+40
| | | | | | expressions in attributes, pragmas. llvm-svn: 104083
* Implement C++ support for vector and extended vector types. ThisDouglas Gregor2010-05-184-8/+181
| | | | | | | | | | involves extending implicit conversion sequences to model vector conversions and vector splats, along with teaching the C++ conditional operator-checking code about vector types. Fixes <rdar://problem/7983501>. llvm-svn: 104081
* Add function 'clang_isTagDeclDefinition()' to allow clients of libclang to ↵Ted Kremenek2010-05-184-0/+18
| | | | | | | | distinguish between forward declarations and definitions of structs/classes/enums. llvm-svn: 104075
* Teach CursorVisitor about duplicate ObjCPropertyDecls that can arise because ↵Ted Kremenek2010-05-184-7/+94
| | | | | | | | | | of a current design limitation in how we handle Objective-C class extensions. This was causing the CursorVisitor to essentially visit an @property twice (once in the @interface, the other in the class extension). Fixes <rdar://problem/7410145>. llvm-svn: 104055
* These test now run in objective-c++ mode we well.Fariborz Jahanian2010-05-184-0/+4
| | | | llvm-svn: 104041
* Add missing test case, provided by Steven Watanabe.Douglas Gregor2010-05-181-0/+50
| | | | llvm-svn: 104037
* Fix typo test caseDouglas Gregor2010-05-181-1/+1
| | | | llvm-svn: 104027
* Add support for Microsoft's __thiscall, from Steven Watanabe!Douglas Gregor2010-05-1815-20/+63
| | | | llvm-svn: 104026
* Correctly initialize bases with member pointers. This should fix PR6441 but ↵Anders Carlsson2010-05-183-14/+155
| | | | | | that test case is a bit weird and I'd like to investigate further before closing that bug. llvm-svn: 104025
* Give a slight edge to the context-sensitive keyword 'super' overDouglas Gregor2010-05-182-5/+22
| | | | | | | | | non-function-local declarations with names similar to what the user typed. For example, this allows us to correct 'supper' to 'super' in an Objective-C message send, even though the C function 'isupper' has the same edit distance. llvm-svn: 104023
* Tweak typo-correction logic a bit regarding "super", so that weDouglas Gregor2010-05-185-6/+28
| | | | | | | | | consider "super" as a candidate whenever we're parsing an expression within an Objective-C method in an interface that has a superclass. At some point, we'd like to give "super" a little edge over non-local names; that will come later. llvm-svn: 104022
* Permit Objective C object pointers to be const_casted.John McCall2010-05-183-1/+26
| | | | llvm-svn: 104019
* Switch over the tablegen to use much prettier range technologyAlexis Hunt2010-05-185-24/+13
| | | | | | | Also rename ABSTRACT to ABSTRACT_STMT, in keeping with the other .def files llvm-svn: 104017
* "The attached patch allows clang to find the headersDouglas Gregor2010-05-181-9/+33
| | | | | | | for Visual Studio 2010. It also adds a registry search for the Express edition,", from Steven Watanabe! llvm-svn: 104015
* I hate this commit.Douglas Gregor2010-05-183-116/+37
| | | | | | | | | | | | | | | | | | | | | Revert much of the implementation of C++98/03 [temp.friend]p5 in r103943 and its follow-ons r103948 and r103952. While our implementation was technically correct, other compilers don't seem to implement this paragraph (which forces the instantiation of friend functions defined in a class template when a class template specialization is instantiated), and doing so broke a bunch of Boost libraries. Since this behavior has changed in C++0x (which instantiates the friend function definitions when they are used), we're going to skip the nowhere-implemented C++98/03 semantics and go straight to the C++0x semantics. This commit is a band-aid to get Boost up and running again. It doesn't really fix PR6952 (which this commit un-fixes), but it does deal with the way Boost.Units abuses this particular paragraph. llvm-svn: 104014
* Keep track of the LLVM field numbers for non-virtual bases.Anders Carlsson2010-05-182-4/+25
| | | | llvm-svn: 104013
* Start laying out bases as individual fields. We still use ugly i8 arrays but ↵Anders Carlsson2010-05-181-14/+61
| | | | | | this is a step in the right direction. llvm-svn: 104012
* Add CodeGenTypes::ContainsPointerToDataMember overload that takes a ↵Anders Carlsson2010-05-182-6/+15
| | | | | | CXXRecordDecl. llvm-svn: 104011
* If a switch condition is constant, don't warn about missing enum cases.John McCall2010-05-186-30/+116
| | | | | | | | If a switch condition is constant, warn if there's no case for it. Constant switch conditions do come up in reasonable template code. llvm-svn: 104010
* Add option '-analyzer-max-loop', which specifies the maximum Zhongxing Xu2010-05-186-4/+14
| | | | | | number of times the analyzer will go through a loop. llvm-svn: 104007
* Teach the ObjC mangler to ignore member pointers just like gcc does.John McCall2010-05-172-1/+18
| | | | llvm-svn: 104001
* Add a hack to silence warnings about failing to return from functions afterChandler Carruth2010-05-172-0/+30
| | | | | | a temporary with a noreturn destructor has been created. Fixes PR6884 for now. llvm-svn: 104000
* Instantiate attributes on typedefs. This is a quick fix for PR7148,Douglas Gregor2010-05-172-0/+7
| | | | | | | when we really need a proper audit of our handling of attributes in templates. llvm-svn: 103999
* Add a 'Base' type to RecursiveASTVisitor to make recursing easier and documentNick Lewycky2010-05-171-4/+7
| | | | | | how you're supposed to use it. llvm-svn: 103993
* Clean up test case and remove XFAIL. This test can now distinguish betweenTed Kremenek2010-05-171-21/+16
| | | | | | | cases where Clang can suggest and fix and suggest and not auto-fix (because of current limitations). llvm-svn: 103987
* Comments and assorted cleanups for the Objective C type AST.John McCall2010-05-172-33/+102
| | | | llvm-svn: 103986
* Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointedJohn McCall2010-05-176-28/+28
| | | | | | out. The remaining ones are okay. llvm-svn: 103973
* Fix an ambiguous else warning from GCC by adding some much needed curlies.Chandler Carruth2010-05-171-2/+3
| | | | llvm-svn: 103972
* robustify the conflict marker stuff. Don't add 7 twice, which wouldChris Lattner2010-05-172-3/+5
| | | | | | | | | | | | | | | | | | | | | make it miss (invalid) things like: <<<<<<< >>>>>>> and crash if <<<<<<< was at the end of the line. When we find a >>>>>>> that is not at the end of the line, make sure to reset Pos so we don't crash on something like: <<<<<<< >>>>>>> This isn't worth making testcases for, since each would require a new file. rdar://7987078 - signal 11 compiling "<<<<<<<<<<" llvm-svn: 103968
* Fix missing '}'.Ted Kremenek2010-05-171-0/+1
| | | | llvm-svn: 103966
* Correctly generate IR for ObjC messages sends to protocol-qualified types.John McCall2010-05-172-5/+13
| | | | | | Fixes rdar://problem/7992749 llvm-svn: 103965
* Add libclang function 'clang_CXXMethod_isStatic' to query of a C++ methodTed Kremenek2010-05-174-2/+35
| | | | | | is declared static. llvm-svn: 103963
* Test that mutability of class members that involve class definitions ↵Douglas Gregor2010-05-171-0/+5
| | | | | | actually works llvm-svn: 103959
* Teach ASTContext::getUnqualifiedArrayType() how to look throughDouglas Gregor2010-05-172-5/+29
| | | | | | | typedefs. As a drive-by, teach hit how to build VLA types, since those will eventually be supported in C++. llvm-svn: 103958
* mutable is a storage class that can follow a class/struct/union definition. ↵Douglas Gregor2010-05-172-0/+7
| | | | | | Fixes PR7153 llvm-svn: 103954
* Don't attempt to poke into an invalid field's class typeFariborz Jahanian2010-05-172-1/+37
| | | | | | | to mark its destructors as referenced which may cause a crash. Fixes radar 7896920 llvm-svn: 103953
* Diagnose a redefinition error when there are two instantiations of friendDouglas Gregor2010-05-172-6/+46
| | | | | | | functions defined inside a class template. Fixes PR6952, the last Boost.Units failure. llvm-svn: 103952
* Determine when the instantiation of a friend function defined inside aDouglas Gregor2010-05-174-8/+55
| | | | | | | class template conflicts with an existing (non-template) definition. This is another part of PR6952. llvm-svn: 103948
* IRgen: Remove dead function.Daniel Dunbar2010-05-171-17/+0
| | | | llvm-svn: 103945
* C++/Darwin/i386 ABI: Fix some problems with empty record handling.Daniel Dunbar2010-05-172-3/+38
| | | | | | | | - Check bases as part of isEmptyRecord(). - C++ record fields are never empty in the Itanium ABI. llvm-svn: 103944
* C++98/03 [temp.friend]p4 requires that inline function definitionsDouglas Gregor2010-05-173-2/+34
| | | | | | | | within class templates be instantiated along with each class template specialization, even if the functions are not used. Do so, as a baby step toward PR6952. llvm-svn: 103943
OpenPOWER on IntegriCloud