summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* PR 20146Nathan Sidwell2015-01-153-2/+18
| | | | | | reject CV void return type on C definitions per 6.9.1/3 llvm-svn: 226178
* [PM] Track an LLVM API update which separates the TargetLibraryInfoChandler Carruth2015-01-151-1/+2
| | | | | | | | | | object from the pass that provides access to it. We should probably refactor the createTLI code here in Clang in light of the new structure, but I wanted this patch to be a minimal one that just patches the behavior back together. llvm-svn: 226158
* AST: alignof might be dependent because of alignment attributesDavid Majnemer2015-01-153-12/+46
| | | | | | | Dependent alignment attributes should make an alignof expression dependent as well. llvm-svn: 226156
* [CMake] clangCodeGen: Prune a redundant "Target" out of libdeps. It is ↵NAKAMURA Takumi2015-01-151-1/+0
| | | | | | supplied by Analysis. llvm-svn: 226152
* AST: Ensure implicit records have default visibilityDavid Majnemer2015-01-152-0/+14
| | | | | | | | | | | | | | | Types composed with certain implicit record types would have their RTTI marked as hidden because the implicit record type didn't have any visibility. This manifests itself as triggering false positives from tools like clang's -fsantize=function feature. The RTTI for a function type's return type wouldn't match if the return type was an implicit record type. Patch by Stephan Bergmann! llvm-svn: 226148
* [CMake] Update libdeps on clangCodeGen, corresponding to r226079.NAKAMURA Takumi2015-01-151-0/+1
| | | | llvm-svn: 226142
* [Mips] Define macros `__mips_isa_rev` in case of mips32r6/mips64r6 optionsSimon Atanasyan2015-01-152-0/+22
| | | | llvm-svn: 226136
* Sema: Recover when a function template is in an extern "C" blockDavid Majnemer2015-01-154-6/+16
| | | | llvm-svn: 226135
* Remove unused parameter, followup to r179639. No behavior change.Nico Weber2015-01-154-6/+1
| | | | llvm-svn: 226128
* Remove ASTConsumer::HandleVTable()'s bool parameter.Nico Weber2015-01-158-27/+17
| | | | | | | | | | | Sema calls HandleVTable() with a bool parameter which is then threaded through three layers. The only effect of this bool is an early return at the last layer. Instead, remove this parameter and call HandleVTable() only if the bool is true. No intended behavior change. llvm-svn: 226096
* PR13699: Include friend declarations in code completion results if they had aRichard Smith2015-01-152-3/+39
| | | | | | | | | prior visible declaration. Prefer to take template parameter names from the first declaration. Testcase from a patch by Francisco Lopes! llvm-svn: 226083
* [PM] Update for LLVM r226078 which moved TargetLibraryInfo to theChandler Carruth2015-01-151-1/+1
| | | | | | Analysis library. llvm-svn: 226079
* Fix crash-on-invalid and name lookup when recovering from ~X::X() typo.Richard Smith2015-01-155-4/+27
| | | | llvm-svn: 226067
* IR: Move MDLocation into place (clang testcases)Duncan P. N. Exon Smith2015-01-1423-81/+81
| | | | | | Update testcases to match LLVM change in r226048. llvm-svn: 226049
* Revert "More robust deployment target parsing on darwin"Steven Wu2015-01-142-55/+8
| | | | | | This breaks green-dragon. Revert it and investigate. llvm-svn: 226011
* docs/conf.py: update for 3.7Hans Wennborg2015-01-141-2/+2
| | | | llvm-svn: 226010
* ReleaseNotes.rst: update to 3.7Hans Wennborg2015-01-141-10/+6
| | | | | | The 3.6 release notes are in the 3.6 branch. llvm-svn: 226009
* Update cxx_dr_status.html after 3.6 branchHans Wennborg2015-01-142-5/+5
| | | | llvm-svn: 226008
* More robust deployment target parsing on darwinSteven Wu2015-01-142-8/+55
| | | | | | | | | | | | | | | | Summary: This is a more robust way of figuring out implicit deployment target from isysroot. It also handles iphone simulator target. Reviewers: bob.wilson, t.p.northover Reviewed By: t.p.northover Subscribers: t.p.northover, cfe-commits Differential Revision: http://reviews.llvm.org/D6939 llvm-svn: 226005
* clang-format: Disable flag for Google's Java and Javascript styles.Daniel Jasper2015-01-141-0/+2
| | | | | | | Disable AlwaysBreakBeforeMultilineString, as the style guides don't really say to do so. llvm-svn: 225982
* [mips] Handle transparent unions correctly.Daniel Sanders2015-01-142-0/+29
| | | | | | | | | | | | | | | | | | | | | | Summary: This fixes MultiSource/Applications/lemon on big-endian N32 by correcting the handling of the argument to wait(). glibc defines it as a transparent union of void* and int*. Such unions are passed according to the rules of the first member so the argument must be passed as if it were a void* (sign extended from i32 to i64) and not as a union (shifted to the upper bits of an i64). wait() already behaves correctly on big-endian O32 and N64 since the union is already the same size as an argument slot. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6963 llvm-svn: 225981
* [cleanup] Re-sort *all* #include lines with llvm/utils/sort_includes.pyChandler Carruth2015-01-1445-69/+56
| | | | | | | | | | Sorry for the noise, I managed to miss a bunch of recent regressions of include orderings here. This should actually sort all the includes for Clang. Again, no functionality changed, this is just a mechanical cleanup that I try to run periodically to keep the #include lines as regular as possible across the project. llvm-svn: 225979
* [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.pyChandler Carruth2015-01-1413-22/+19
| | | | | | | No functionality changed, this is a purely mechanical cleanup to ensure the #include order remains consistent across the project. llvm-svn: 225975
* clang-format: [Java] Support try blocks with resources.Daniel Jasper2015-01-143-1/+17
| | | | | | | | | | | | | | | Before: try (SomeResource rs = someFunction()) { Something(); } After: try (SomeResource rs = someFunction()) { Something(); } llvm-svn: 225973
* clang-format: [Java] Prefer not to break in parameter annotations.Daniel Jasper2015-01-142-0/+8
| | | | | | | | | | | | | | Before: boolean someFunction(@Param(aaaaaaaaaaaaaaaa) String aaaaa, String bbbbbbbbbbbbbbb) {} After: boolean someFunction( @Param(aaaaaaaaaaaaaaaa) String aaaaa, String bbbbbbbbbbbbbbb) {} llvm-svn: 225971
* clang-format: [Java] Understand "import static".Daniel Jasper2015-01-142-1/+4
| | | | llvm-svn: 225965
* clang-format: [Java] Don't let annotations confuse return type analysis.Daniel Jasper2015-01-142-0/+7
| | | | | | | | | | | | | | Before: @Test ReturnType doSomething(String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {} After: @Test ReturnType doSomething( String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {} llvm-svn: 225964
* clang-format: [Java] Don't line-wrap before annotations' l_parens.Daniel Jasper2015-01-142-1/+5
| | | | | | | | | | | | | | Before: @SomeAnnotation (aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa) int i; After: @SomeAnnotation( aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa) int i; llvm-svn: 225963
* clang-format: [Java] Don't get confused by leading annotations.Daniel Jasper2015-01-142-1/+5
| | | | | | | | | | | | | | Before: @Test(a) aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaa); After: @Test(a) aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 225962
* The assembler is now enabled by default.Brad Smith2015-01-141-9/+0
| | | | llvm-svn: 225961
* Sema: It's cheaper to ask LookupResult::empty than to calculate linkageDavid Majnemer2015-01-141-1/+1
| | | | llvm-svn: 225960
* Use the integrated assembler by default on 32-bit PowerPC and SPARC.Brad Smith2015-01-145-35/+7
| | | | llvm-svn: 225958
* Reapply r225000 (reverted in r225555): DebugInfo: Generalize debug info ↵David Blaikie2015-01-1419-221/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | location handling (and follow-up commits). Several pieces of code were relying on implicit debug location setting which usually lead to incorrect line information anyway. So I've fixed those (in r225955 and r225845) separately which should pave the way for this commit to be cleanly reapplied. The reason these implicit dependencies resulted in crashes with this patch is that the debug location would no longer implicitly leak from one place to another, but be set back to invalid. Once a call with no/invalid location was emitted, if that call was ever inlined it could produce invalid debugloc chains and assert during LLVM's codegen. There may be further cases of such bugs in this patch - they're hard to flush out with regression testing, so I'll keep an eye out for reports and investigate/fix them ASAP if they come up. Original commit message: Reapply "DebugInfo: Generalize debug info location handling" Originally committed in r224385 and reverted in r224441 due to concerns this change might've introduced a crash. Turns out this change fixes the crash introduced by one of my earlier more specific location handling changes (those specific fixes are reverted by this patch, in favor of the more general solution). Recommitted in r224941 and reverted in r224970 after it caused a crash when building compiler-rt. Looks to be due to this change zeroing out the debug location when emitting default arguments (which were meant to inherit their outer expression's location) thus creating call instructions without locations - these create problems for inlining and must not be created. That is fixed and tested in this version of the change. Original commit message: This is a more scalable (fixed in mostly one place, rather than many places that will need constant improvement/maintenance) solution to several commits I've made recently to increase source fidelity for subexpressions. This resetting had to be done at the DebugLoc level (not the SourceLocation level) to preserve scoping information (if the resetting was done with CGDebugInfo::EmitLocation, it would've caused the tail end of an expression's codegen to end up in a potentially different scope than the start, even though it was at the same source location). The drawback to this is that it might leave CGDebugInfo out of sync. Ideally CGDebugInfo shouldn't have a duplicate sense of the current SourceLocation, but for now it seems it does... - I don't think I'm going to tackle removing that just now. I expect this'll probably cause some more buildbot fallout & I'll investigate that as it comes up. Also these sort of improvements might be starting to show a weakness/bug in LLVM's line table handling: we don't correctly emit is_stmt for statements, we just put it on every line table entry. This means one statement split over multiple lines appears as multiple 'statements' and two statements on one line (without column info) are treated as one statement. I don't think we have any IR representation of statements that would help us distinguish these cases and identify the beginning of each statement - so that might be something we need to add (possibly to the lexical scope chain - a scope for each statement). This does cause some problems for GDB and possibly other DWARF consumers. llvm-svn: 225956
* DebugInof: Correct the location of exception cleanups in global ctors/dtors ↵David Blaikie2015-01-144-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | and ObjC methods Without setting the CurEHLocation these cleanups would be attributed to whatever the last active debug line location was (the 'fn' call in the included test cases). By setting CurEHLocation correctly the line information is improved/corrected. This quality bug turned into a crasher with r225000 when, instead of allowing the last location to persist, it would be zero'd out. This could lead to a function call (such as the dtor) being made without a debug location - if that call was subsequently inlined (and the caller and callee had debug info, just not the call instruction) the inliner would violate important constraints about the debug location chains by not updating the inlined instructions to chain up to the callee locations. So, by fixing this bug, I am addressing the assertion failures introduced by r225000 and should be able to recommit that patch with impunity... llvm-svn: 225955
* Revert "Insert random noops to increase security against ROP attacks (clang)"JF Bastien2015-01-146-19/+1
| | | | | | | This reverts commit: http://reviews.llvm.org/D3393 llvm-svn: 225947
* Sema: Relax parsing of '#' in constraintsDavid Majnemer2015-01-142-5/+1
| | | | llvm-svn: 225942
* Sema: Check type compatibility with the most recent decl when mergingDavid Majnemer2015-01-142-3/+14
| | | | | | | | | | We would check the type information from the declaration found by lookup but we would neglect checking compatibility with the most recent declaration. This would make it possible for us to not correctly diagnose inconsistencies with declarations which were made in a different scope. llvm-svn: 225934
* [AVX512] Add FP unpack intrinsicsAdam Nemet2015-01-142-0/+61
| | | | | | | | | | | These are implemented with __builtin_shufflevector just like AVX. We have some tests on the LLVM side to assert that these shufflevectors do indeed generate the corresponding unpck instruction. Part of <rdar://problem/17688758> llvm-svn: 225922
* Insert random noops to increase security against ROP attacks (clang)JF Bastien2015-01-146-1/+19
| | | | | | | | | | | | | | | | | | | | A pass that adds random noops to X86 binaries to introduce diversity with the goal of increasing security against most return-oriented programming attacks. Command line options: -noop-insertion // Enable noop insertion. -noop-insertion-percentage=X // X% of assembly instructions will have a noop prepended (default: 50%, requires -noop-insertion) -max-noops-per-instruction=X // Randomly generate X noops per instruction. ie. roll the dice X times with probability set above (default: 1). This doesn't guarantee X noop instructions. In addition, the following 'quick switch' in clang enables basic diversity using default settings (currently: noop insertion and schedule randomization; it is intended to be extended in the future). -fdiversify This is the clang part of the patch. llvm part: D3392 http://reviews.llvm.org/D3393 Patch by Stephen Crane (@rinon) llvm-svn: 225910
* Update HelpText for -fsanitize= option.Alexey Samsonov2015-01-141-3/+2
| | | | | | | There are too many available sanitizers now - redirect to user manual instead of listing them all. llvm-svn: 225894
* Update for move in llvm.Eric Christopher2015-01-141-1/+1
| | | | llvm-svn: 225892
* Look through sugar when determining whether a type is a scoped enumerationRichard Smith2015-01-142-1/+9
| | | | | | type. Patch by Stephan Bergmann! llvm-svn: 225889
* Sema: An extern declaration can't be a redeclaration of a parameterDavid Majnemer2015-01-143-2/+11
| | | | | | | | | | | | In the following: void f(int x) { extern int x; } The second declaration of 'x' shouldn't be considered a redeclaration of the parameter. This is a different approach to r225780. llvm-svn: 225875
* Sink a parameter into the callee since it's always the same expression in ↵David Blaikie2015-01-142-9/+7
| | | | | | terms of another parameter llvm-svn: 225856
* DebugInfo: Correct the location of EH cleanup for blocksDavid Blaikie2015-01-132-0/+18
| | | | | | | | | | | | | | | | | | | | | | | This was previously piggybacking on whatever happened to be the last location set on CGDebugInfo/DIBuilder, which was wrong (it was often the current location, such as the 'fn()' call site, not the end of the block). With my improvements to set/unset the location in a scoped manner (r225000) this went from a bad quality situation, to a crash. Fixing this goes part-way to unblocking the recommit of r225000. It's likely that any call to CodeGenFunction::StartFunction without the CurEHLocation set represents a similar bug or risk of a bug. Perhaps there are some callers that know they won't generate EH cleanups, but I'm not sure. I considered a generic catch-fix in StartFunction (just fallback to the GlobalDecl's location) but that seemed like it'd mask bugs where the EH location shouldn't be the same as the decl's location (& indeed by not using that stop-gap I found this bug). We'll see how long I can hold out on the generic catch-all. I might eventually be able to add an assertion in. llvm-svn: 225845
* clang-format: [Java] Detect `native` keyword.Nico Weber2015-01-133-1/+5
| | | | | | | | | | Before: public native<X> Foo foo(); After: public native <X> Foo foo(); llvm-svn: 225839
* Add [extern_c] attribute to _Builtin_intrinsics moduleBen Langmuir2015-01-131-1/+1
| | | | | | This allows users to import this module inside an extern "C" {} block. llvm-svn: 225835
* Mention FreeBSD support.Roman Divacky2015-01-131-0/+1
| | | | llvm-svn: 225834
* When attribute 'optnone' appears on the same declaration with aPaul Robinson2015-01-134-32/+30
| | | | | | | | | | | | conflicting attribute, warn about the conflict and pick a "winning" attribute to preserve, instead of emitting an error. This matches the behavior when the conflicting attributes are on different declarations. Along the way I discovered that conflicts involving __forceinline were reported as 'always_inline' (alternate spelling, same attribute) so fixed that up to report the attribute as spelled in the source. llvm-svn: 225813
* Inherit attributes when infering a framework moduleBen Langmuir2015-01-135-27/+52
| | | | | | | | | | If a module map contains framework module * [extern_c] {} We will now infer [extern_c] on the inferred framework modules (we already inferred [system] as a special case). llvm-svn: 225803
OpenPOWER on IntegriCloud