summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix accidental merge error.Bill Wendling2012-05-121-12/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156688 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r156031:Bill Wendling2012-05-129-231/+16
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r156031 | rsmith | 2012-05-02 15:22:32 -0700 (Wed, 02 May 2012) | 4 lines Revert most of r154844, which was disabled in r155975. Keep around the refactorings in that revision, and some of the subsequent bugfixes, which seem to be relevant even without delayed exception specification parsing. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156684 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155293:Bill Wendling2012-05-123-17/+41
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r155293 | rsmith | 2012-04-21 11:42:51 -0700 (Sat, 21 Apr 2012) | 4 lines Fix regression in r154844. If necessary, defer computing adjusted destructor exception specifications in C++11 until after we've parsed the exception specifications for nested classes. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156683 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155218:Bill Wendling2012-05-122-43/+29
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ 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-122-0/+6
| | | | | | | | | | | | | ------------------------------------------------------------------------ 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-4/+8
| | | | | | | | | | | | | ------------------------------------------------------------------------ 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 r155356:Bill Wendling2012-05-121-1/+2
| | | | | | | | | | | | | ------------------------------------------------------------------------ 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 r155788:Bill Wendling2012-05-121-1/+1
| | | | | | | | | | | | | | ------------------------------------------------------------------------ r155788 | rsmith | 2012-04-29 00:31:09 -0700 (Sun, 29 Apr 2012) | 4 lines PR12688: ParseCXXClassMemberDeclaration's sometimes-null ThisDecl takes another victim. Don't crash if we have a delay-parsed exception specification for a class member which is invalid in a way which precludes building a FunctionDecl. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156676 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155975:Bill Wendling2012-05-121-0/+6
| | | | | | | | | | | | | | ------------------------------------------------------------------------ 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 r155860:Bill Wendling2012-05-121-1/+3
| | | | | | | | | | | | ------------------------------------------------------------------------ r155860 | dgregor | 2012-04-30 16:42:57 -0700 (Mon, 30 Apr 2012) | 2 lines Add support for openSUSE 12.2, from Ismail Donmez! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156670 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155803:Bill Wendling2012-05-081-1/+2
| | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r155803 | rsmith | 2012-04-29 17:16:51 -0700 (Sun, 29 Apr 2012) | 8 lines PR11926 + duplicates: Fix crash in -Wuninitialized when using a compiler like g++4.7, which reuses stack space allocated for temporaries. CFGElement::getAs returns a suitably-cast version of 'this'. Patch by Markus Trippelsdorf! No test: this code has the same observable behavior as the old code when built with most compilers, and the tests were already failing when built with a compiler for which this produced a broken binary. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156394 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155728:Bill Wendling2012-04-271-2/+4
| | | | | | | | | | | | | | ------------------------------------------------------------------------ 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-262-0/+2
| | | | | | | | | | | | | ------------------------------------------------------------------------ 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/+3
| | | | | | | | | | | | | | ------------------------------------------------------------------------ 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 r155535:Bill Wendling2012-04-251-1/+1
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r155535 | lattner | 2012-04-24 23:12:24 -0700 (Tue, 24 Apr 2012) | 5 lines OpenBSD: Remove incorrect -pthread preprocessor define _POSIX_THREADS and replace with _REENTRANT. Also remove undef _POSIX_THREADS in phread.h. Patch by Brad Smith! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@155573 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r155279:Bill Wendling2012-04-215-23/+20
| | | | | | | | | | | ------------------------------------------------------------------------ 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
* Revert some Hexagon builtin commits to match reverts done to LLVM inChandler Carruth2012-04-183-766/+157
| | | | | | | | | | | | | | | | | | | r155047. See the LLVM log for the primary motivation: http://llvm.org/viewvc/llvm-project?rev=155047&view=rev Primary commit r154828: - Several issues were raised in review, and fixed in subsequent commits. - Follow-up commits also reverted, and which should be folded into the original before reposting: - r154837: Re-add the 'undef BUILTIN' thing to fix the build. - r154928: Fix build warnings, re-add (and correct) header and license - r154937: Typo fix. Please resubmit this patch with the relevant LLVM resubmission. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155048 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-c: Issue diagnostic when an implicitFariborz Jahanian2012-04-181-3/+20
| | | | | | | | 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
* Suppress -Wunused-variable warning in -Asserts buildMatt Beaumont-Gay2012-04-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155011 91177308-0d34-0410-b5e6-96231b3b80d8
* VerifyICE: Pass PartialDiagnostics by reference.Benjamin Kramer2012-04-181-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155005 91177308-0d34-0410-b5e6-96231b3b80d8
* MIPS: Followup to r154606. Expand list of accepted MIPS target features in ↵Simon Atanasyan2012-04-181-1/+4
| | | | | | the MipsTargetInfoBase::setFeatureEnabled() routine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154998 91177308-0d34-0410-b5e6-96231b3b80d8
* fix GCC version comparison wrt. equal patch suffices (and squash two typos)Gabor Greif2012-04-181-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154997 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds a FixedCompilationDatabase to be able to specify tool parametersManuel Klimek2012-04-181-0/+27
| | | | | | | | at the command line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154989 91177308-0d34-0410-b5e6-96231b3b80d8
* As per John McCall comment:Francois Pichet2012-04-181-4/+4
| | | | | | | | Follow up to r154924: check that we are in a static CMethodDecl to enable the Microsoft bug emulation regarding access to protected member during PTM creation. Not just any static function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154982 91177308-0d34-0410-b5e6-96231b3b80d8
* fix display of source lines with null charactersSeth Cantrell2012-04-181-2/+5
| | | | 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-181-159/+439
| | | | | | | | | | | | | 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
* Calling setVisibility directly only makes (some) sense when the visibility isRafael Espindola2012-04-181-3/+3
| | | | | | explicit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154969 91177308-0d34-0410-b5e6-96231b3b80d8
* PR12569: Instantiate exception specifications of explicit instantiationsRichard Smith2012-04-172-3/+15
| | | | | | | 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-171-440/+160
| | | | | | | | | | | | 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-2/+5
| | | | 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-171-158/+435
| | | | | | | | | | | | | 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
* Simplify calls to mergeVisibility* by passing in the LinkageInfo. NoRafael Espindola2012-04-171-3/+2
| | | | | | functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154940 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-c modern translation. Correct rewriting ofFariborz Jahanian2012-04-171-34/+19
| | | | | | | | | 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
* Switches the JSONCompilationDatabase to use the YAML parser.Manuel Klimek2012-04-171-36/+45
| | | | | | | | | | | | | | | | | | | This will allow us to delete the JSON parser from llvm. The biggest change is a general change of strategy - instead of storing StringRef's to the values for the command line and directory in the input buffer, we store ScalarNode*'s. The reason is that the YAML parser's getRawValue on ScalarNodes returns a string that includes the quotes in case of double quoted strings. For the same reason we're removing the JSON parsing part of the command line parsing - this means an extra copy for a command line when it is requested (and only when it is requested). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154929 91177308-0d34-0410-b5e6-96231b3b80d8
* Emulate a MSVC bug where the creation of pointer-to-member to protected ↵Francois Pichet2012-04-171-0/+7
| | | | | | | | | 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
* fix a typoGabor Greif2012-04-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154920 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert vperm2f128 and vperm2i128 intrinsics back to using llvm intrinsics. ↵Craig Topper2012-04-172-28/+4
| | | | | | 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
* Change ExprEngine::shouldInlineDecl() to be defensive in checking if the CFG ↵Ted Kremenek2012-04-171-0/+5
| | | | | | of the callee is valid. Fixes <rdar://problem/11257631>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154896 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix case where the alignment is overaligned, per Eli's suggestion.Chad Rosier2012-04-171-1/+4
| | | | | | | rdar://11220251 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154893 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement DR1330 in C++11 mode, to support libstdc++4.7 which uses it.Richard Smith2012-04-1712-519/+678
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | 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
* Typo.Eric Christopher2012-04-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154880 91177308-0d34-0410-b5e6-96231b3b80d8
* Modern objective-c translator:'self' used insideFariborz Jahanian2012-04-161-4/+8
| | | | | | | block literal is imported. // rdar://11259664 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154876 91177308-0d34-0410-b5e6-96231b3b80d8
* modern objective-c translator: translation of implicitFariborz Jahanian2012-04-161-15/+12
| | | | | | | | 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-5/+20
| | | | | | 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
* objective-c modern translator: buildit objc boolFariborz Jahanian2012-04-164-18/+8
| | | | | | | | 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
* Remove support for -fast-math metadata for the moment.Duncan Sands2012-04-161-4/+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-2/+13
| | | | | | 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-19/+19
| | | | 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-169-60/+359
| | | | | | | | | | 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