summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merging r155218:Bill Wendling2012-05-122-4/+52
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r155218 | rsmith | 2012-04-20 11:46:14 -0700 (Fri, 20 Apr 2012) | 5 lines Fix bug where a class's (deleted) copy constructor would be implicitly given a non-const reference parameter type if the class had any subobjects with deleted copy constructors. This causes a rejects-valid if the class's copy constructor is explicitly defaulted (as happens for some implementations of std::pair etc). ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156682 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155289:Bill Wendling2012-05-121-0/+17
| | | | | | | | | | | | | ------------------------------------------------------------------------ r155289 | rsmith | 2012-04-21 10:47:47 -0700 (Sat, 21 Apr 2012) | 3 lines Fix serialization of uninstantiated exception specifications. Patch by Li Kan, test by me. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156681 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155424:Bill Wendling2012-05-121-1/+10
| | | | | | | | | | | | | ------------------------------------------------------------------------ r155424 | rsmith | 2012-04-23 22:06:35 -0700 (Mon, 23 Apr 2012) | 3 lines PR12629: Cope with parenthesized function types when attaching a delayed exception specification to a function. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156679 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155608:Bill Wendling2012-05-121-0/+5
| | | | | | | | | | | | | ------------------------------------------------------------------------ r155608 | rsmith | 2012-04-25 20:16:45 -0700 (Wed, 25 Apr 2012) | 3 lines PR12660: Don't crash when initializing a const reference from a braced init list which creates a temporary by calling a constructor. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156678 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155356:Bill Wendling2012-05-121-0/+8
| | | | | | | | | | | | | ------------------------------------------------------------------------ r155356 | dgregor | 2012-04-23 09:42:52 -0700 (Mon, 23 Apr 2012) | 3 lines Teach RequireCompleteType about multi-dimensional arrays. Fixes <rdar://problem/11284902>. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156677 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155823:Bill Wendling2012-05-121-0/+259
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r155823 | dgregor | 2012-04-30 09:20:27 -0700 (Mon, 30 Apr 2012) | 4 lines Restore paren, bracket and brace counts in parser when TentativeParsingAction is reverted, from Pasi Parviainen! Fixes PR12480 / <rdar://problem/11341251>. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156675 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155910:Bill Wendling2012-05-121-5/+2
| | | | | | | | | | | ------------------------------------------------------------------------ r155910 | chapuni | 2012-05-01 03:51:55 -0700 (Tue, 01 May 2012) | 1 line clang/test/Rewriter/rewrite-modern-extern-c-func-decl.mm: Remove XFAIL and add -U__declspec. mingw32 tends to define built-in __declspec. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156674 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r156047:Bill Wendling2012-05-122-29/+32
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r156047 | rjmccall | 2012-05-02 18:34:46 -0700 (Wed, 02 May 2012) | 4 lines Merge x86-64-abi-sret-vs-2word-struct-param.cpp into the generic x86_64-arguments.cpp test file and be sure to test the coerced case as well. Thanks to Wei-Ren Chen for bringing this test to my attention. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156673 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155975:Bill Wendling2012-05-123-6/+9
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r155975 | rsmith | 2012-05-01 18:29:43 -0700 (Tue, 01 May 2012) | 4 lines Disable our non-standard delayed parsing of exception specifications. Delaying the parsing of such things appears to be a conforming extension, but it breaks libstdc++4.7's std::pair. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156672 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155278:Bill Wendling2012-05-011-0/+3
| | | | | | | | | | | | | ------------------------------------------------------------------------ r155278 | chapuni | 2012-04-21 02:39:58 -0700 (Sat, 21 Apr 2012) | 3 lines clang/test/Rewriter/rewrite-modern-extern-c-func-decl.mm: Mark as XFAIL:mingw for now, due to predefined __declspec. It could be tweaked to add -triple i686-win32, though. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@155934 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155728:Bill Wendling2012-04-275-21/+27
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r155728 | rsmith | 2012-04-27 12:33:05 -0700 (Fri, 27 Apr 2012) | 4 lines PR12224 (sort of): Diagnose inheriting constructor declarations in C++11 mode. We do not support IRGen for these, and get some parts of the semantic analysis wrong. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@155731 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155670:Bill Wendling2012-04-261-0/+11
| | | | | | | | | | | | | ------------------------------------------------------------------------ r155670 | efriedma | 2012-04-26 15:43:24 -0700 (Thu, 26 Apr 2012) | 3 lines Add a missing ExpressionEvaluationContext for template default arguments. Fixes PR12581. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@155671 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155576:Bill Wendling2012-04-251-0/+32
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r155576 | akirtzidis | 2012-04-25 11:39:17 -0700 (Wed, 25 Apr 2012) | 4 lines When resolving default template arguments, it should be done in the declaration context of the template what we are going to instantiate. Fixes various crashes of rdar://11242625 & http://llvm.org/PR11421. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@155582 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155342:Bill Wendling2012-04-231-1/+3
| | | | | | | | | | | | | ------------------------------------------------------------------------ r155342 | asl | 2012-04-23 02:02:13 -0700 (Mon, 23 Apr 2012) | 3 lines Do not use stdint.h, driver might provide invalid location for it. Instead, provide the types directly. This should fix PR12628 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@155376 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155279:Bill Wendling2012-04-212-3/+70
| | | | | | | | | | | ------------------------------------------------------------------------ r155279 | chapuni | 2012-04-21 02:40:04 -0700 (Sat, 21 Apr 2012) | 1 line SemaDeclCXX.cpp: Fix utf8 in comment. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@155295 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-c: Issue diagnostic when an implicitFariborz Jahanian2012-04-181-0/+30
| | | | | | | | property accessor (getter) missing, instead of crashing. // rdar://11273060 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155036 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds a FixedCompilationDatabase to be able to specify tool parametersManuel Klimek2012-04-181-0/+8
| | | | | | | | at the command line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154989 91177308-0d34-0410-b5e6-96231b3b80d8
* fix display of source lines with null charactersSeth Cantrell2012-04-181-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154981 91177308-0d34-0410-b5e6-96231b3b80d8
* Nicer display of unprintable source, and fix caret display for non-ascii textSeth Cantrell2012-04-183-2/+33
| | | | | | | | | | | | | Unprintable source in diagnostics is transformed to a printable form and then displayed with reversed colors if possible. Unprintable characters are displayed as <U+NNNN> while bytes that do not represent valid characters are shown as <XX>. Column adjustments to diagnostic carets, highlighted ranges, and fixups are made both for characters escaped as above and for characters which are printable but take up more than a single column. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154980 91177308-0d34-0410-b5e6-96231b3b80d8
* PR12569: Instantiate exception specifications of explicit instantiationsRichard Smith2012-04-172-8/+69
| | | | | | | and explicit specializations of function templates appropriately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154956 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Nicer display of unprintable source, and fix caret display for ↵Seth Cantrell2012-04-174-33/+2
| | | | | | | | | | | | non-ascii text" This reverts commit e9a3b76ba589a8a884e978273beaed0d97cf9861. Revert "fix display of source lines with null characters" This reverts commit 70712b276e40bbe11e5063dfc7e82ce3209929cd. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154950 91177308-0d34-0410-b5e6-96231b3b80d8
* fix display of source lines with null charactersSeth Cantrell2012-04-171-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154947 91177308-0d34-0410-b5e6-96231b3b80d8
* Nicer display of unprintable source, and fix caret display for non-ascii textSeth Cantrell2012-04-173-2/+33
| | | | | | | | | | | | | Unprintable source in diagnostics is transformed to a printable form and then displayed with reversed colors if possible. Unprintable characters are displayed as <U+NNNN> while bytes that do not represent valid characters are shown as <XX>. Column adjustments to diagnostic carets, highlighted ranges, and fixups are made both for characters escaped as above and for characters which are printable but take up more than a single column. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154946 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-c modern translation. Correct rewriting ofFariborz Jahanian2012-04-171-0/+45
| | | | | | | | | block meta-data of block literals declared inside of extern "C" functions. // rdar://1131490 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154939 91177308-0d34-0410-b5e6-96231b3b80d8
* Emulate a MSVC bug where the creation of pointer-to-member to protected ↵Francois Pichet2012-04-171-1/+26
| | | | | | | | | member of base class is allowed but only from a static function. This fixes a regression when parsing MFC code with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154924 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert vperm2f128 and vperm2i128 intrinsics back to using llvm intrinsics. ↵Craig Topper2012-04-173-4/+7
| | | | | | Unfortunately, these instructions have behavior that can't be modeled with shuffle vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154906 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix test.Eli Friedman2012-04-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154897 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement DR1330 in C++11 mode, to support libstdc++4.7 which uses it.Richard Smith2012-04-174-2/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a new flavor of exception specification, EST_Uninstantiated. A function type with this exception specification carries a pointer to a FunctionDecl, and the exception specification for that FunctionDecl is instantiated (if needed) and used in the place of the function type's exception specification. When a function template declaration with a non-trivial exception specification is instantiated, the specialization's exception specification is set to this new 'uninstantiated' kind rather than being instantiated immediately. Expr::CanThrow has migrated onto Sema, so it can instantiate exception specs on-demand. Also, any odr-use of a function triggers the instantiation of its exception specification (the exception specification could be needed by IRGen). In passing, fix two places where a DeclRefExpr was created but the corresponding function was not actually marked odr-used. We used to get away with this, but don't any more. Also fix a bug where instantiating an exception specification which refers to function parameters resulted in a crash. We still have the same bug in default arguments, which I'll be looking into next. This, plus a tiny patch to fix libstdc++'s common_type, is enough for clang to parse (and, in very limited testing, support) all of libstdc++4.7's standard headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154886 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure EmitMoveFromReturnSlot is passing the correct alignment toChad Rosier2012-04-171-0/+8
| | | | | | | | EmitFinalDestCopy (and thus pass EmitAggregateCopy the correct alignment). rdar://11220251 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154883 91177308-0d34-0410-b5e6-96231b3b80d8
* Modern objective-c translator:'self' used insideFariborz Jahanian2012-04-161-0/+3
| | | | | | | block literal is imported. // rdar://11259664 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154876 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Make sure that when we have multiple @class references in the ↵Argyrios Kyrtzidis2012-04-161-0/+7
| | | | | | | | | | | | | | | same line, that later ones do not override the previous ones. If we have: @class Foo, Bar; source ranges for both start at '@', so 'Bar' will end up overriding 'Foo' even though the cursor location was at 'Foo'. rdar://11257578 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154873 91177308-0d34-0410-b5e6-96231b3b80d8
* modern objective-c translator: translation of implicitFariborz Jahanian2012-04-1614-8/+35
| | | | | | | | cast to/from block pointer types. // rdar://11202764 Also, many more modern translator tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154869 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix a false alarm in SelfInitChecker (radar://11235991).Anna Zaks2012-04-161-4/+57
| | | | | | Along with it, fix a couple of other corner cases and add more tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154866 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fixup for a test case.Anna Zaks2012-04-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154864 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-c modern translator: buildit objc boolFariborz Jahanian2012-04-166-16/+16
| | | | | | | | type for rewriter project will be BoolTy. // rdar://11231426. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154861 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Spelling range for a objc category should the category name ↵Argyrios Kyrtzidis2012-04-161-0/+10
| | | | | | | | range, not the class one. rdar://11249386 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154853 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for -fast-math metadata for the moment.Duncan Sands2012-04-161-8/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154851 91177308-0d34-0410-b5e6-96231b3b80d8
* Per Richard's comments on r154794, add the checks necessary to handle ↵Eli Friedman2012-04-161-0/+6
| | | | | | constant-folding relational comparisons safely in case the user is using -fwrapv or equivalent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154849 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r154749 for now at John McCall's request.Rafael Espindola2012-04-161-12/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154846 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the last part of C++ [class.mem]p2, delaying the parsing ofDouglas Gregor2012-04-165-10/+41
| | | | | | | | | | exception specifications on member functions until after the closing '}' for the containing class. This allows, for example, a member function to throw an instance of its own class. Fixes PR12564 and a fairly embarassing oversight in our C++98/03 support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154844 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate fpmath metadata when -ffast-math. Note that no optimizations are hookedDuncan Sands2012-04-161-0/+8
| | | | | | | up to this yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154835 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement C++11 [expr.prim.general]p3, which permits the use of 'this'Douglas Gregor2012-04-163-1/+111
| | | | | | | | | | | | | | | | | | | | | | | | | in the declaration of a non-static member function after the (optional) cv-qualifier-seq, which in practice means in the exception specification and late-specified return type. The new scheme here used to manage 'this' outside of a member function scope is more general than the Scope-based mechanism previously used for non-static data member initializers and late-parsesd attributes, because it can also handle the cv-qualifiers on the member function. Note, however, that a separate pass is required for static member functions to determine whether 'this' was used, because we might not know that we have a static function until after declaration matching. Finally, this introduces name mangling for 'this' and for the implicit 'this', which is intended to match GCC's mangling. Independent verification for the new mangling test case would be appreciated. Fixes PR10036 and PR12450. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154799 91177308-0d34-0410-b5e6-96231b3b80d8
* Make constant evaluation for pointer comparisons work correctly for some ↵Eli Friedman2012-04-162-0/+11
| | | | | | uncommon cases. <rdar://problem/10962435>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154794 91177308-0d34-0410-b5e6-96231b3b80d8
* The result of the Microsoft __uuidof operator must be considered a global ↵Francois Pichet2012-04-161-2/+2
| | | | | | | | | | | | | | lvalue during constant expression evaluation. Otherwise we would get this error in C++11 mode (because of a recent change): error: non-type template argument of type 'const _GUID *' is not a constant expression For code like: template <const GUID* g = &__uuidof(struct_with_uuid)> class COM_CLASS { }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154790 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate alignment on lvalues through EmitLValueForField. PR12395.Eli Friedman2012-04-161-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154789 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'env' in hopes of making this test pass on Windows.Nick Lewycky2012-04-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154785 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the all_lookups_iterator for PCH as a follow-up to r153970. ThisNick Lewycky2012-04-163-0/+21
| | | | | | | | | | | | includes a patch from Matthias Kleine with a regression testcase! Adds a new iterator 'data_iterator' to OnDiskHashTable which doesn't try to reconstruct the external_key from the internal_key, which is useful for traits that don't store enough information to do that mapping in their key. Also deletes the 'item_iterator' from OnDiskHashTable as dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154784 91177308-0d34-0410-b5e6-96231b3b80d8
* Change _mm256_permute4x64_epi64 and _mm256_permute4x64_pd to use ↵Craig Topper2012-04-151-2/+2
| | | | | | builtin_shufflevector instead of specific builtins. Old builtins will be removed from llvm now that vpermq/vpermpd are supported by shuffle lowering code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154777 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix tests that weren't actually verifying anything.David Blaikie2012-04-156-9/+9
| | | | | | | | | | | | | | Passing -verify to clang without -cc1 or -Xclang silently passes (with a printed warning, but lit doesn't care about that). This change adds -cc1 or, as is necessary in one case, -Xclang to fix this so that these tests are actually verifying as intended. I'd like to change the driver so this kind of mistake could not be made, but I'm not entirely sure how. Further, since the driver only warns about unknown flags in general, we could have similar bugs with a misspellings of arguments that would be nice to find. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154776 91177308-0d34-0410-b5e6-96231b3b80d8
* Use MDBuilder to help with metadata creation.Duncan Sands2012-04-152-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154767 91177308-0d34-0410-b5e6-96231b3b80d8