summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Put function templates instantiated from friend declarations in the correctJohn McCall2010-03-261-6/+15
| | | | | | lexical context. This is required for ADL to work properly; fixes PR6716. llvm-svn: 99665
* Compare namespaces properly when looking for redeclarations ofDouglas Gregor2010-03-261-1/+3
| | | | | | namespace aliases. Fixes PR6341. llvm-svn: 99664
* Fix NoReturnFunctionChecker to properly look at a function's typeTed Kremenek2010-03-261-41/+41
| | | | | | when determining if it returns. Fixes <rdar://problem/7796563>. llvm-svn: 99663
* Add comment indicating that we intentionally don't add the noreturnTed Kremenek2010-03-261-0/+3
| | | | | | attribute to a FunctionDecl. llvm-svn: 99662
* When adding initializers to a constructor, be sure that we are lookingDouglas Gregor2010-03-261-1/+5
| | | | | | | | through the bases and fields of the definition of the class in which the constructor is declared, rather than some other declaration of that class. llvm-svn: 99661
* Driver/Darwin: Support CCC_ENABLE_NEW_DARWIN_TOOLCHAIN as an environmentDaniel Dunbar2010-03-261-4/+6
| | | | | | | override to enable use of the DarwinClang tool chain on all platforms (not just ARM). llvm-svn: 99660
* Properly account for redeclarations when explicitly instantiating class ↵John McCall2010-03-261-4/+2
| | | | | | | | | | | | | templates. What happens here is that we actually turn the first declaration into a definition, regardless of whether it was actually originally a definition, and furthermore we do this all after we've instantiated all the declarations. This exposes a bug in my DefinitionData patch where it was only setting the DefinitionData for previous declarations, not future declarations. Fortunately, there's an iterator for that. llvm-svn: 99657
* When trying to determine whether one operand of a conditionalDouglas Gregor2010-03-261-7/+9
| | | | | | | | | expression can be converted to the type of another, only apply the lvalue-to-rvalue conversion to the type of the expression we're converting, *not* the array-to-pointer or function-to-pointer conversions. Fixes PR6595. llvm-svn: 99652
* Eliminate the non-InitializedEntity PerformCopyInitialization() andDouglas Gregor2010-03-263-44/+8
| | | | | | | | re-route its only caller to the newer PerformCopyInitialization(). We're down to one remaining caller of Sema::CheckReferenceInit. llvm-svn: 99650
* Fix 80 col violations.Daniel Dunbar2010-03-261-3/+6
| | | | llvm-svn: 99648
* Switch semantic analysis of the conditional operator from usingDouglas Gregor2010-03-263-88/+112
| | | | | | CheckReferenceInit to using the new initialization sequence code. llvm-svn: 99647
* Runtime: Install the new libcc_kext.a produced by the clang_darwin compiler-rtDaniel Dunbar2010-03-261-1/+1
| | | | | | configuration. llvm-svn: 99641
* fix a case where macro expansion should be disabled, patch by Chris Lattner2010-03-261-4/+7
| | | | | | Abramo Bagnara! llvm-svn: 99626
* fix a bug in paste avoidance which would cause us to accidentallyChris Lattner2010-03-261-1/+1
| | | | | | form a >>=. Patch by Abramo Bagnara, testcase by me. llvm-svn: 99624
* Implement new mangling for vectors.Nick Lewycky2010-03-261-2/+7
| | | | llvm-svn: 99616
* Do not mark the destructor of a function parameter's type. Fixes PR6709.Douglas Gregor2010-03-261-4/+0
| | | | llvm-svn: 99615
* Revert r99612 and see if it fixes self-host.Anders Carlsson2010-03-261-7/+0
| | | | llvm-svn: 99614
* Don't initialize virtual pointers for primary bases, they've already been ↵Anders Carlsson2010-03-261-0/+7
| | | | | | initialized. llvm-svn: 99612
* When deducing an integral template argument for a non-type templateDouglas Gregor2010-03-261-32/+35
| | | | | | | | | | parameter, keep the integral value exactly as it was in the source code rather than trying to convert it to the type of the non-type template parameter (which may still be dependent!). The value will then be converted to the appropriate type once we check the resulting template arguments. Fixes PR6707. llvm-svn: 99611
* Reapply r99596 with a fix: link an instantiated friend function to itsJohn McCall2010-03-262-15/+41
| | | | | | pattern if it has a body. llvm-svn: 99610
* Simplify InitializeVtablePtrs in preparation of making it work with ↵Anders Carlsson2010-03-262-57/+59
| | | | | | construction vtables. llvm-svn: 99609
* Add and implement CodeGenVTables::getSecondaryVirtualPointerIndex (not used ↵Anders Carlsson2010-03-262-11/+68
| | | | | | yet). llvm-svn: 99608
* Use the new vtable layout code for construction vtables.Anders Carlsson2010-03-261-10/+0
| | | | llvm-svn: 99606
* More cleanup.Anders Carlsson2010-03-261-178/+47
| | | | llvm-svn: 99605
* Way more VTT builder cleanup.Anders Carlsson2010-03-263-65/+206
| | | | llvm-svn: 99604
* Apparently that didn't work. Reverting for now.John McCall2010-03-262-30/+15
| | | | llvm-svn: 99601
* Reinstate change to non-type template arguments of integral type, soDouglas Gregor2010-03-261-19/+20
| | | | | | | | | that we extend/truncate then correct the sign to convert the non-type template argument to the template parameter's type. Previously, we reported an error when the non-type template argument was out of range; now we just warn. llvm-svn: 99600
* Properly instantiate and link in friend function templates.John McCall2010-03-262-15/+30
| | | | llvm-svn: 99596
* More VTT builder cleanup.Anders Carlsson2010-03-261-22/+31
| | | | llvm-svn: 99588
* This is just a simple v4si * v4si, make it so.Eric Christopher2010-03-261-1/+1
| | | | llvm-svn: 99587
* More VTT cleanup.Anders Carlsson2010-03-261-22/+43
| | | | llvm-svn: 99586
* Revert attempted fix for integral template arguments. It seems to have ↵Douglas Gregor2010-03-261-20/+19
| | | | | | broken tramp3d-v4. llvm-svn: 99583
* Mark virtual methods that are used in tables included in VTTs as used.Rafael Espindola2010-03-262-2/+19
| | | | | | Fixes PR6706. llvm-svn: 99582
* Start cleaning up the VTT builder to make it work more like the VTable builder.Anders Carlsson2010-03-262-52/+67
| | | | llvm-svn: 99581
* Remove some VTT builder arguments that were always zero.Anders Carlsson2010-03-261-20/+13
| | | | llvm-svn: 99576
* Warn when the conversion of an integral non-type template argument toDouglas Gregor2010-03-251-19/+20
| | | | | | | | | | | | | | | | | | the type of its corresponding non-type template parameter changes the value. Previously, we were diagnosing this as an error, which was wrong. We give reasonably nice warnings like: test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template argument value '256' truncated to '0' for template parameter of type 'unsigned char' Overflow<256> *overflow3; // expected-warning{{non-type template ... ^~~ test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is declared here template<unsigned char C> struct Overflow; ^ llvm-svn: 99561
* Teach the diagnostic engine to provide more detailed information aboutDouglas Gregor2010-03-253-17/+39
| | | | | | | | | how to handle a diagnostic during template argument deduction, which may be "substitution failure", "suppress", or "report". This keeps us from, e.g., emitting warnings while performing template argument deduction. llvm-svn: 99560
* When finishing a function definition, leave the function definition *after*John McCall2010-03-251-2/+3
| | | | | | | doing all the cleanup tasks and checks. This gives us the proper context for checking access to base and member destructors. llvm-svn: 99559
* Fix a code gen. bug involving generation of getter methodFariborz Jahanian2010-03-251-1/+6
| | | | | | from properties of _Complex type. (radar 7351147). llvm-svn: 99558
* Don't add address points for virtual primary bases that aren't primary bases ↵Anders Carlsson2010-03-251-13/+25
| | | | | | in the complete class. llvm-svn: 99555
* Fix a very minor oversight in privileges-elevation: we were only consideringJohn McCall2010-03-251-1/+1
| | | | | | | friendship for a derived class if the base class specifier was non-public, and thus not considering friendship for non-public members of public bases. llvm-svn: 99554
* Handle simple friend-class decls in class templates better by ensuring thatJohn McCall2010-03-252-61/+85
| | | | | | | we look for shadow friend decls in the appropriate scope before injecting a new declaration. llvm-svn: 99552
* Preserve type-source information in friend declarations.John McCall2010-03-254-12/+21
| | | | llvm-svn: 99525
* Remove support for nand atomic builtins. They are inconsistently implemented inDaniel Dunbar2010-03-252-32/+9
| | | | | | | gcc, and the common expectation seems to be that they are unused. If and when someone cares we can add them back with well documented demantics. llvm-svn: 99522
* Use the new vtable layout code for construction vtables.Anders Carlsson2010-03-251-3/+95
| | | | llvm-svn: 99516
* PS3 needs __PPC__. Should this be in the PPC target?John Thompson2010-03-251-0/+1
| | | | llvm-svn: 99513
* Improve our handling of local instantiation scopes in two related ways:Douglas Gregor2010-03-253-13/+33
| | | | | | | | | | | | | | | - When substituting template arguments as part of template argument deduction, introduce a new local instantiation scope. - When substituting into a function prototype type, introduce a new "temporary" local instantiation scope that merges with its outer scope but also keeps track of any additions it makes, removing them when we exit that scope. Fixes PR6700, where we were getting too much mixing of local instantiation scopes due to template argument deduction that substituted results into function types. llvm-svn: 99509
* When -fdump-vtable-layouts is specified, construction vtable initializers ↵Anders Carlsson2010-03-252-18/+145
| | | | | | will be generated using the new vtable layout code. (The code is still not completely in place but this is a huge step forward). llvm-svn: 99508
* Properly instantiate friend class template declarations and link them intoJohn McCall2010-03-252-26/+101
| | | | | | | the redeclaration chain. Recommitted from r99477 with a fix: we need to merge in default template arguments from previous declarations. llvm-svn: 99496
* Revert 99477 since it appears to be breaking the clang-x86_64-darwin10-fntBob Wilson2010-03-252-91/+26
| | | | | | | | | | | buildbot. The tramp3d test fails. --- Reverse-merging r99477 into '.': U test/SemaTemplate/friend-template.cpp U test/CXX/temp/temp.decls/temp.friend/p1.cpp U lib/Sema/SemaTemplateInstantiateDecl.cpp U lib/Sema/SemaAccess.cpp llvm-svn: 99481
OpenPOWER on IntegriCloud