summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix cases where we were not producing an error when a computed goto couldRafael Espindola2012-10-271-35/+41
| | | | | | | jump over destructor calls. Fixes pr13812. llvm-svn: 166855
* Move two helper functions to AST so that sema can use them.Rafael Espindola2012-10-272-113/+71
| | | | llvm-svn: 166853
* Refactor some code into a new findMaterializedTemporary function.Rafael Espindola2012-10-271-25/+32
| | | | llvm-svn: 166849
* Refactor some code into a new skipRValueSubobjectAdjustments function.Rafael Espindola2012-10-271-45/+51
| | | | llvm-svn: 166848
* Delay codegen to after collecting all SubobjectAdjustment so that the collectionRafael Espindola2012-10-271-6/+6
| | | | | | can be refactored and used in Sema. llvm-svn: 166847
* Add missing safety check to an optimization for do-while loops. PR14191.Eli Friedman2012-10-261-0/+4
| | | | llvm-svn: 166832
* Fix indentation.Eli Friedman2012-10-261-2/+2
| | | | llvm-svn: 166830
* In Parser::ParseDecltypeSpecifier, make sure the end location it returnsArgyrios Kyrtzidis2012-10-261-2/+15
| | | | | | | is at the end of parsed tokens when an error occurs, otherwise we'll hit an assertion when trying to annotate the decltype tokens. llvm-svn: 166826
* Don't crash synthesizing an ObjC property with an empty struct type. ↵Eli Friedman2012-10-261-0/+8
| | | | | | <rdar://problem/12547611>. llvm-svn: 166825
* When an externally-supplied record layout has a size that clearlyDouglas Gregor2012-10-261-15/+33
| | | | | | | | | | | doesn't include padding up to the alignment of the record, take this as a cue that the alignment of the record should (conservatively) be set to 1. This is similar to other the other cues we use to determine that the record has a lower alignment, e.g., that the externally-supplied layout places fields at lower offsets than we would. Fixes <rdar://problem/12582052>; test case in LLDB. llvm-svn: 166824
* Add comment for my patch in r166809.Fariborz Jahanian2012-10-261-0/+2
| | | | llvm-svn: 166823
* Remove BLOCK_BYREF_LAYOUT_BYREF flags from list ofFariborz Jahanian2012-10-261-3/+2
| | | | | | flags for __block variable meta-data. llvm-svn: 166811
* objective-C IRGen: for @implementation nested in Fariborz Jahanian2012-10-261-1/+8
| | | | | | | | | extern "C", its method definitions must be IRGen'ed before meta-data for class is generated. Otherwise, IRGen crashes (to say the least). // rdar://12581683 llvm-svn: 166809
* [driver] Before applying the working directory check if the input pathArgyrios Kyrtzidis2012-10-261-2/+2
| | | | | | is absolute. llvm-svn: 166808
* This patch addresses a 64-bit PowerPC ELF ABI compatibility issue withBill Schmidt2012-10-261-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | varargs parameter passing. A strict reading of the ABI indicates that any argument with alignment greater than 8 may require skipping doublewords in the parameter save area to align the argument, and hence require skipping GPRs. In practice, this is not done by GCC. The alignment restriction is used for internal alignment of a structure, but a structure with 16-byte alignment, for example, is not itself 16-byte aligned in the parameter save area. Although this is messy, it has become the de facto standard used in building existing libraries. My initial varargs support followed the ABI language, but not the de facto standard. Running the GCC compatibility test suite exposed this issue, and indeed showed that LLVM didn't pass parameters self-consistently with my original logic. Removing the additional alignment logic allows the affected tests to now pass. I modified the ppc64-varargs-struct.c test case to remove the existing test for generation of alignment code, which is no longer appropriate. Built and tested on powerpc64-unknown-linux-gnu with no new regressions. llvm-svn: 166805
* [options] Fix mishandling of aliased options that was introduced in r166444.Argyrios Kyrtzidis2012-10-261-8/+18
| | | | llvm-svn: 166801
* Match up anonymous structs/unions in the ASTImporter. Previously, we'dDouglas Gregor2012-10-261-3/+101
| | | | | | | | only actually get the answer right if there was only a single anonymous struct/union at that level. This is part of <rdar://problem/11904570>; the test will go into LLDB itself. llvm-svn: 166781
* Add comments for RemoveRedundantMsgs, rename it to removeRedundantMsgs() per ↵Ted Kremenek2012-10-261-4/+13
| | | | | | Jordan's feedback. llvm-svn: 166778
* Eliminate some longstanding FIXMEs regarding variadic templates in theDouglas Gregor2012-10-261-8/+2
| | | | | | ASTImporter. llvm-svn: 166777
* In the ASTImporter, don't try to emit a diagnostic if we're notDouglas Gregor2012-10-261-120/+154
| | | | | | allowed to complain about a failure. llvm-svn: 166776
* Declare type of flags to be used in a __block (byref)Fariborz Jahanian2012-10-261-0/+12
| | | | | | variable descriptor captured by a block. llvm-svn: 166746
* Oz optimization level sets ForceSizeOpt attribute for each functionQuentin Colombet2012-10-261-0/+2
| | | | llvm-svn: 166744
* X86 SSE Intrinsics: update header for sqrt_ss, rsqrt_ss and rcp_ss.Manman Ren2012-10-261-3/+6
| | | | | | | There intrinsics pass through the upper FP values from the input. rdar://12558838 llvm-svn: 166743
* Recommit Eric's code to validate ASM string's constraints and modifiers.Bill Wendling2012-10-252-0/+72
| | | | | | | | | | | | | This code checks the ASM string to see if the output size is able to fit within the variable specified as the output. For instance, scalar-to-vector conversions may not really work. It's on by default, but can be turned off with a flag if you think you know what you're doing. This is placed under a flag ('-Wasm-operand-widths') and flag group ('-Wasm'). <rdar://problem/12284092> llvm-svn: 166737
* Changing name of enum for block literal flags to representFariborz Jahanian2012-10-251-3/+3
| | | | | | what it is meant for. llvm-svn: 166734
* TrackConstraintBRVisitor and ConditionBRVisitor can emit similarTed Kremenek2012-10-252-8/+94
| | | | | | | | | | | | path notes for cases where a value may be assumed to be null, etc. Instead of having redundant diagnostics, do a pass over the generated PathDiagnostic pieces and remove notes from TrackConstraintBRVisitor that are already covered by ConditionBRVisitor, whose notes tend to be better. Fixes <rdar://problem/12252783> llvm-svn: 166728
* [ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.Chad Rosier2012-10-251-0/+50
| | | | llvm-svn: 166723
* Add some new types in preparation of encoding of captured block variableFariborz Jahanian2012-10-251-0/+69
| | | | | | layout meta-data work. wip. llvm-svn: 166717
* CommentDumper: reorder members and add a comment.Dmitri Gribenko2012-10-251-6/+7
| | | | llvm-svn: 166705
* Provide comment describing what buildBlockDescriptor does.Fariborz Jahanian2012-10-251-1/+12
| | | | llvm-svn: 166703
* Cleanup some clang code to use new type functions instead of using cast<>.Micah Villmow2012-10-256-24/+16
| | | | llvm-svn: 166684
* Modify the targets to set appropriate calling convention defaults and C ↵David Tweed2012-10-252-6/+8
| | | | | | | | variables when using a gnueabihf or aapcs-vfp target. Tested by me and Wei-Ren Chen. llvm-svn: 166679
* Initialize debug info for special cases of functions that lack declarations ↵Alexey Samsonov2012-10-254-7/+36
| | | | | | and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942. llvm-svn: 166676
* -fcatch-undefined-behavior checking for appropriate vptr value: Clang ↵Richard Smith2012-10-254-12/+94
| | | | | | CodeGen side. llvm-svn: 166661
* Take into account that there may be a BOM at the beginning of the file,Argyrios Kyrtzidis2012-10-251-3/+6
| | | | | | when computing the size of the precompiled preamble. llvm-svn: 166659
* Revert r166647 to rethink the patch...Bill Wendling2012-10-252-71/+0
| | | | llvm-svn: 166655
* Remove the old predefines-buffer diffing code completely. It's beenDouglas Gregor2012-10-251-332/+1
| | | | | | | replaced by the more efficient, cleaner preprocessor-option version that occurs earlier in PCH validation. llvm-svn: 166654
* Fix computation of predefines buffer from the preprocessor-optionDouglas Gregor2012-10-251-10/+1
| | | | | | checking, and disable the old predefines-buffer-diff'ing code path. llvm-svn: 166653
* When we're devirtualizing a method call, make sure the method has the ↵Eli Friedman2012-10-251-7/+7
| | | | | | | | correct IR type. Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev. llvm-svn: 166651
* ASTUnit doesn't actually care about the predefines; don't record them.Douglas Gregor2012-10-251-18/+2
| | | | llvm-svn: 166650
* The the preprocessor option validator to compute suggestedDouglas Gregor2012-10-251-14/+72
| | | | | | | predefines. We're not quite ready to cut over to these suggested predefines yet, however. llvm-svn: 166648
* Add some support for diagnosing possibly mismatched constraint, type size andBill Wendling2012-10-252-0/+71
| | | | | | | modifiers. (From an idea by Eric...) <rdar://problem/12284092> llvm-svn: 166647
* 'constexpr' and 'friend' are both declaration specifiers. Teach the parser ↵Richard Smith2012-10-251-3/+5
| | | | | | this, for better error recovery. llvm-svn: 166645
* PR14171: Don't crash if we hit one of the paths where GetFullTypeForDeclaratorRichard Smith2012-10-241-0/+15
| | | | | | rebuilds a function type, and that function type has parens around its name. llvm-svn: 166644
* Teach the PCH validator to check the preprocessor options, especiallyDouglas Gregor2012-10-243-7/+131
| | | | | | | | | | | | | | | the macros that are #define'd or #undef'd on the command line. This checking happens much earlier than the current macro-definition checking and is far cleaner, because it does a direct comparison rather than a diff of the predefines buffers. Moreover, it allows us to use the result of this check to skip over PCH files within a directory that have non-matching -D's or -U's on the command line. Finally, it improves the diagnostics a bit for mismatches, fixing <rdar://problem/8612222>. The old predefines-buffer diff'ing will go away in a subsequent commit. llvm-svn: 166641
* Fix false positive in -Wunused-variable when a ctor call make involve cleanups.David Blaikie2012-10-241-0/+2
| | | | llvm-svn: 166625
* Don't print scope qualifiers for references to a type defined locally in a ↵Eli Friedman2012-10-241-0/+1
| | | | | | function. Patch by Grzegorz Jablonski. llvm-svn: 166617
* (De-)serialize the preprocessor options, including macros defined,Douglas Gregor2012-10-242-3/+75
| | | | | | -include'd files, etc. llvm-svn: 166614
* Teach the preprocessor to hold onto the preprocessor options.Douglas Gregor2012-10-243-4/+10
| | | | llvm-svn: 166599
* Move PreprocessorOptions into the Lex library, and make it intrusivelyDouglas Gregor2012-10-243-4/+6
| | | | | | reference-counted. llvm-svn: 166587
OpenPOWER on IntegriCloud