aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-03-26Return translation units from clang_createTranslationUnitFromSource()Ted Kremenek
if even they contain errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99594 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26More VTT builder cleanup.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99588 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26This is just a simple v4si * v4si, make it so.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99587 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26More VTT cleanup.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99586 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26Revert attempted fix for integral template arguments. It seems to have ↵Douglas Gregor
broken tramp3d-v4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26Mark virtual methods that are used in tables included in VTTs as used.Rafael Espindola
Fixes PR6706. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26Start cleaning up the VTT builder to make it work more like the VTable builder.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26Remove some VTT builder arguments that were always zero.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99576 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Warn when the conversion of an integral non-type template argument toDouglas Gregor
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; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99561 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Teach the diagnostic engine to provide more detailed information aboutDouglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25When finishing a function definition, leave the function definition *after*John McCall
doing all the cleanup tasks and checks. This gives us the proper context for checking access to base and member destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99559 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Fix a code gen. bug involving generation of getter methodFariborz Jahanian
from properties of _Complex type. (radar 7351147). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Don't add address points for virtual primary bases that aren't primary bases ↵Anders Carlsson
in the complete class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99555 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Fix a very minor oversight in privileges-elevation: we were only consideringJohn McCall
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99554 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Handle simple friend-class decls in class templates better by ensuring thatJohn McCall
we look for shadow friend decls in the appropriate scope before injecting a new declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99552 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Check for some code gen. for PR6641 test.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99526 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Preserve type-source information in friend declarations.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99525 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Remove support for nand atomic builtins. They are inconsistently implemented inDaniel Dunbar
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Use the new vtable layout code for construction vtables.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Use Daniel's trick for XFAIL'd testsDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25PS3 needs __PPC__. Should this be in the PPC target?John Thompson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Add another test for weird substitutions into function types during template ↵Douglas Gregor
argument deduction git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Improve our handling of local instantiation scopes in two related ways:Douglas Gregor
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25When -fdump-vtable-layouts is specified, construction vtable initializers ↵Anders Carlsson
will be generated using the new vtable layout code. (The code is still not completely in place but this is a huge step forward). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25add dump() method to CanQual for debugging purposesNuno Lopes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99505 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Properly instantiate friend class template declarations and link them intoJohn McCall
the redeclaration chain. Recommitted from r99477 with a fix: we need to merge in default template arguments from previous declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99496 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Add a utility method.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99495 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Revert 99477 since it appears to be breaking the clang-x86_64-darwin10-fntBob Wilson
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Fix two bugs in format-string checking:Ted Kremenek
(1) Do not assume the data arguments start after the format string (2) Do not use the fact that a function is variadic to treat it like a va_list printf function Fixes PR 6697. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Fix '+=' accumulation error when parsing numeric amounts in a format string.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Properly instantiate and link in friend-class-template declarations.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99477 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Add c-index-test support for printing USRs.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99476 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Require that all Clang-based USRs start with the prefix 'c:' for the "USR ↵Ted Kremenek
space". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Add methods to remove a GDM entry.Zhongxing Xu
Instead of setting the ReturnExpr GDM to NULL, remove it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25More address point map shuffling.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Shuffle some code around; this will make it easier to use the new layout ↵Anders Carlsson
code for address points. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99461 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Kill off two more uses of Sema::CheckReferenceInit in favor of the newDouglas Gregor
initialization code. Exposed a bug where we were not marking an implicit conversion as an lvalue when we were forming a call to a conversion function whose return type is a reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99459 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Switch static_cast from the old reference-initialization code (viaDouglas Gregor
CheckReferenceInit) over to the new initialization code (InitializationSequence), which is better-tested and doesn't require us to compute the entire conversion sequence twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99452 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Check for ret, so that we know we hit the end of the functionDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99448 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24When returning from a function that has a reference return type, useDouglas Gregor
EmitReferenceBindingToExpr() rather than assuming we have an lvalue. This is just the lowest hanging fruit for PR6024, which still requires a bit of work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99447 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Discussing with dgregor we decided that we should not force the emission ofRafael Espindola
implicit methods on explicit template instantiation definitions. As a consequence, we should emit them at every use, even if we see a explicit template instantiation declaration. This is already the current behaviour, but it is good to test for that :-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99443 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Use llvm::SmallString instead of std::string.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99442 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Improve static analyzer diagnostic concerning the use of 'mktemp'Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24make the vtable tester a little friendlier, with a clean target and without ↵Douglas Gregor
requiring . to be in your path git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24When pulling apart an initializer that involves a CXXConstructExpr, doDouglas Gregor
not pick apart a CXXTemporaryObjectExpr because such an object construction was explicitly written in the source code. Fixes PR6657. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99427 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Make sure that we have File IDs for all of the unsaved files before weDouglas Gregor
deserialize diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Allow conversion of qualified Class type to unqualifiedFariborz Jahanian
Class type to match gcc's. Fixes radar 7789113. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99425 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24XFAIL the -nostdinc++ test on Windows; it doesn't look like we even have the ↵Douglas Gregor
notion of separate C and C++ paths there git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Control warnings about GNU extensions with -Wgnu, which has a subgroupDouglas Gregor
for GNU designated-initializer syntax (-Wgnu-designator). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Implement support for -nostdc++. Fixes PR6446.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99417 91177308-0d34-0410-b5e6-96231b3b80d8