summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Emit an additional note during analysis of 'if' clause.Alexey Bataev2015-09-157-13/+13
| | | | | | Patch adds emission of additional note for 'if' clauses with name modifiers in case if 'if' clause without name modified was specified or 'if' clause with the same name modifier was specified. llvm-svn: 247706
* [OPENMP] Emit __kmpc_cancel_barrier() and code for 'cancellation point' only ↵Alexey Bataev2015-09-1517-65/+201
| | | | | | | | | | | | | | if 'cancel' is found. Patch improves codegen for OpenMP constructs. If the OpenMP region does not have internal 'cancel' construct, a call to 'void __kmpc_barrier()' runtime function is generated for all implicit/explicit barriers. If the region has inner 'cancel' directive, then ``` if (__kmpc_cancel_barrier()) exit from outer construct; ``` code is generated. Also, the code for 'canellation point' directive is not generated if parent directive does not have 'cancel' directive. llvm-svn: 247681
* [OpenCL] Add new types for OpenCL 2.0.Alexey Bader2015-09-151-0/+34
| | | | | | | | Patch by Pedro Ferreira. Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12855 llvm-svn: 247676
* Make clang/test/CodeGen/catch-undef-behavior.c* capable of -Asserts with ↵NAKAMURA Takumi2015-09-152-23/+21
| | | | | | | | "opt -instnamer". It reverts r231717. llvm-svn: 247667
* [MS ABI] Restore our warning for overwide bitfields using the MS ABIDavid Majnemer2015-09-151-1/+1
| | | | | | This restores a diagnostic lost in r247651. llvm-svn: 247659
* [modules] A using-declaration doesn't introduce a new entity, just a new nameRichard Smith2015-09-152-2/+100
| | | | | | | for an existing entity, and as such a using-declaration doesn't need to conflict with a hidden entity (nor vice versa). llvm-svn: 247654
* [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.Devin Coughlin2015-09-152-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | In Objective-C, method calls with nil receivers are essentially no-ops. They do not fault (although the returned value may be garbage depending on the declared return type and architecture). Programmers are aware of this behavior and will complain about a false alarm when the analyzer diagnoses API violations for method calls when the receiver is known to be nil. Rather than require each individual checker to be aware of this behavior and suppress a warning when the receiver is nil, this commit changes ExprEngineObjC so that VisitObjCMessage skips calling checker pre/post handlers when the receiver is definitely nil. Instead, it adds a new event, ObjCMessageNil, that is only called in that case. The CallAndMessageChecker explicitly cares about this case, so I've changed it to add a callback for ObjCMessageNil and moved the logic in PreObjCMessage that handles nil receivers to the new callback. rdar://problem/18092611 Differential Revision: http://reviews.llvm.org/D12123 llvm-svn: 247653
* [MS ABI] Overwide bool bitfields should be permittedDavid Majnemer2015-09-151-2/+2
| | | | | | | | Overwide bool bitfields have eight bits of storage size, make sure we take the padding into account when determining whether or not they are problematic. llvm-svn: 247651
* small test bugfixPiotr Padlewski2015-09-151-2/+2
| | | | llvm-svn: 247650
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-09-156-23/+376
| | | | | | | | | | | | | | | | | | Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html Edit: Fixed version because of PR24479 and other bug caused in chrome. After this patch got reverted because of ScalarEvolution bug (D12719) Merged after John McCall big patch (Added Address). http://reviews.llvm.org/D11859 http://reviews.llvm.org/D12865 llvm-svn: 247646
* Prevent implicit re-interpret casts between ExtVector and Scalar types.Stephen Canon2015-09-151-0/+19
| | | | | | Previously, in certain cases lax vector conversions could occur between scalar floating-point values and ExtVector types; these conversions would be simple bitcasts. We need to allow them with other vector types to support some common headers, but we don't need them for ExtVector. Preventing them here makes them behave like other operations involving scalars and ExtVectors. llvm-svn: 247643
* clang/test/CodeGenCXX/2009-04-23-bool2.cpp: Avoid -mms-bitfields to add ↵NAKAMURA Takumi2015-09-141-1/+1
| | | | | | | explicit triple. FIXME: Better way to cancel -mms-bitfields? llvm-svn: 247640
* [Solaris] Default to -fno-cxa-finalize.Rafael Espindola2015-09-141-0/+4
| | | | | | | | | | | There is no __cxa_finalize symbol available on recent Solaris OS versions, so we need this flag to make non trivial C++ programs run. Also stop looking for cxa_finalize.o, since it won't be there. Patch by Xan López! llvm-svn: 247634
* [WebAssembly] Define the atomic type sizesDan Gohman2015-09-141-22/+22
| | | | | | | | | | | | | WebAssembly's spec has now been updated to specify some guarantees about lock free atomic accesses. Update clang to match. This also updates sig_atomic_t to be 64-bit on wasm64. WebAssembly does not presently have asynchronous interrupts, but this change is within the spirit of how they will work if they are added. Differential Revision: http://reviews.llvm.org/D12862 llvm-svn: 247624
* [WebAssembly] Use "long long" for int_fast64_t and int_least64_t on wasm64Dan Gohman2015-09-141-20/+20
| | | | | | | | | This makes int_fast64_t and int_least64_t the same type as int64_t, and eliminates a difference between wasm32 and wasm64. Differential Revision: http://reviews.llvm.org/D12861 llvm-svn: 247622
* Revert "Always_inline codegen rewrite" and 2 follow-ups.Evgeniy Stepanov2015-09-1410-238/+17
| | | | | | | | | | Revert "Update cxx-irgen.cpp test to allow signext in alwaysinline functions." Revert "[CodeGen] Remove wrapper-free always_inline functions from COMDATs" Revert "Always_inline codegen rewrite." Reason for revert: PR24793. llvm-svn: 247620
* PR24595: Ignore calling convention modifiers for structors in MS ABI.Andrey Bokhanko2015-09-142-4/+23
| | | | | | | | | | MS compiler ignores calling convention modifiers for structors. This patch makes clang do the same (for MS ABI). This fixes PR24595 and makes vswriter.h header (from Windows SDK 8.1) compilable. Differential Revision: http://reviews.llvm.org/D12402 llvm-svn: 247619
* C11 _Bool bitfield diagnosticRachel Craik2015-09-149-19/+21
| | | | | | | | | | | | Summary: Implement DR262 (for C). This patch will mainly affect bitfields of type _Bool Reviewers: fraggamuffin, rsmith Subscribers: hubert.reinterpretcast, cfe-commits Differential Revision: http://reviews.llvm.org/D10018 llvm-svn: 247618
* Driver should forward at most one gdwarf-N flag to cc1as.Douglas Katzman2015-09-141-1/+2
| | | | llvm-svn: 247611
* [Solaris] Add -lc also when linking shared librariesRafael Espindola2015-09-141-0/+17
| | | | | | | | | | This is actually needed, otherwise libc won't be added at all. For instance when building libclang.so all the libc symbols won't be found, with ld warning about libc being an "implicit dependency". Patch by Xan López! llvm-svn: 247603
* Fix a nasty bug with the partial destruction of nested arrays;John McCall2015-09-142-0/+64
| | | | | | | | | it escaped notice because it's only used for heterogeneous initialization. rdar://21397946 llvm-svn: 247597
* [Static Analyzer] Moving nullability checkers out of alpha.Gabor Horvath2015-09-142-2/+2
| | | | llvm-svn: 247595
* [Static Analyzer] Moving nullability checkers to a top level package.Gabor Horvath2015-09-142-1/+88
| | | | | | Differential Revision: http://reviews.llvm.org/D12852 llvm-svn: 247590
* Update cxx-irgen.cpp test to allow signext in alwaysinline functions.Samuel Antao2015-09-141-1/+1
| | | | | | This was causing an error in Power8 targets. llvm-svn: 247584
* [CMake] r247548 introduced llvm-readobj.NAKAMURA Takumi2015-09-141-1/+1
| | | | llvm-svn: 247554
* [CMake] Reformat CLANG_TEST_DEPS.NAKAMURA Takumi2015-09-141-1/+2
| | | | llvm-svn: 247553
* [mips] Add test case to check ABI flag emissions in case of inline assemblerSimon Atanasyan2015-09-141-0/+12
| | | | | | Follow up to r247546. The test case reproduces the problem fixed by this commit. llvm-svn: 247548
* [Sema] Reject value-initialization of function typesDavid Majnemer2015-09-141-0/+2
| | | | | | | | | T in the expression T() must be a non-array complete object type or the void type. Function types are neither. This fixes PR24798. llvm-svn: 247535
* [Static Analyzer] Merge the Objective-C Generics Checker into Dynamic Type ↵Gabor Horvath2015-09-131-38/+38
| | | | | | | | Propagation checker. Differential Revision: http://reviews.llvm.org/D12381 llvm-svn: 247532
* [CodeGen] Remove wrapper-free always_inline functions from COMDATsDavid Majnemer2015-09-121-12/+12
| | | | | | always_inline functions without a wrapper don't need to be in a COMDAT. llvm-svn: 247500
* clang/test/Driver/stackrealign.c REQUIRES clang-driver.NAKAMURA Takumi2015-09-121-0/+1
| | | | | | GCC driver, for example cygwin, both "-mstackrealign" "-mno-stackrealign" are passed. llvm-svn: 247496
* Always_inline codegen rewrite.Evgeniy Stepanov2015-09-1210-17/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation may end up emitting an undefined reference for an "inline __attribute__((always_inline))" function by generating an "available_externally alwaysinline" IR function for it and then failing to inline all the calls. This happens when a call to such function is in dead code. As the inliner is an SCC pass, it does not process dead code. Libc++ relies on the compiler never emitting such undefined reference. With this patch, we emit a pair of 1. internal alwaysinline definition (called F.alwaysinline) 2a. A stub F() { musttail call F.alwaysinline } -- or, depending on the linkage -- 2b. A declaration of F. The frontend ensures that F.inlinefunction is only used for direct calls, and the stub is used for everything else (taking the address of the function, really). Declaration (2b) is emitted in the case when "inline" is meant for inlining only (like __gnu_inline__ and some other cases). This approach, among other nice properties, ensures that alwaysinline functions are always internal, making it impossible for a direct call to such function to produce an undefined symbol reference. This patch is based on ideas by Chandler Carruth and Richard Smith. llvm-svn: 247494
* Revert "Specify target triple in alwaysinline tests."Evgeniy Stepanov2015-09-1110-238/+17
| | | | | | | | | Revert "Always_inline codegen rewrite." Breaks gdb & lldb tests. Breaks on Fedora 22 x86_64. llvm-svn: 247491
* Add new test file missing from r247486.Richard Smith2015-09-111-0/+6
| | | | llvm-svn: 247488
* [modules] When picking one of two template declarations as a lookup result,Richard Smith2015-09-113-0/+9
| | | | | | | | it's not sufficient to prefer the declaration with more default arguments, or the one that's visible; they might both be visible, but one of them might have a visible default argument where the other has a hidden default argument. llvm-svn: 247486
* When comparing two block captures for layout, don't crashJohn McCall2015-09-111-0/+9
| | | | | | | | if they have the same alignment and one was 'this'. Fixes PR24780. llvm-svn: 247482
* Let selector-expr-lvalue.mm actually test something.Nico Weber2015-09-111-8/+15
| | | | | | | I accidentally introduced a bug locally, and noticed that none of the tests caught it. No longer! llvm-svn: 247477
* [Shave]: pass -isystem dirs and "-Wa," args to moviAsmDouglas Katzman2015-09-111-3/+4
| | | | llvm-svn: 247474
* Specify target triple in alwaysinline tests.Evgeniy Stepanov2015-09-112-6/+6
| | | | | | This should fix the tests on Windows (failing due to mangling differencies). llvm-svn: 247473
* Always_inline codegen rewrite.Evgeniy Stepanov2015-09-1110-17/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation may end up emitting an undefined reference for an "inline __attribute__((always_inline))" function by generating an "available_externally alwaysinline" IR function for it and then failing to inline all the calls. This happens when a call to such function is in dead code. As the inliner is an SCC pass, it does not process dead code. Libc++ relies on the compiler never emitting such undefined reference. With this patch, we emit a pair of 1. internal alwaysinline definition (called F.alwaysinline) 2a. A stub F() { musttail call F.alwaysinline } -- or, depending on the linkage -- 2b. A declaration of F. The frontend ensures that F.inlinefunction is only used for direct calls, and the stub is used for everything else (taking the address of the function, really). Declaration (2b) is emitted in the case when "inline" is meant for inlining only (like __gnu_inline__ and some other cases). This approach, among other nice properties, ensures that alwaysinline functions are always internal, making it impossible for a direct call to such function to produce an undefined symbol reference. This patch is based on ideas by Chandler Carruth and Richard Smith. llvm-svn: 247465
* [MS ABI] Select an inheritance model in template argumentsDavid Majnemer2015-09-111-0/+11
| | | | | | | | | | | | We used to only select an inheritance model if the pointer to member was nullptr. Instead, select a model regardless of the member pointer's value. N.B. This bug was exposed by making member pointers report true for isIncompleteType but has been latent since the member pointer scheme's inception. llvm-svn: 247464
* [analyzer] Add -analyzer-config option for function size the inliner ↵Devin Coughlin2015-09-112-6/+22
| | | | | | | | | | | | | | | | | | | considers as large Add an option (-analyzer-config min-blocks-for-inline-large=14) to control the function size the inliner considers as large, in relation to "max-times-inline-large". The option defaults to the original hard coded behaviour, which I believe should be adjustable with the other inlining settings. The analyzer-config test has been modified so that the analyzer will reach the getMinBlocksForInlineLarge() method and store the result in the ConfigTable, to ensure it is dumped by the debug checker. A patch by Sean Eveson! Differential Revision: http://reviews.llvm.org/D12406 llvm-svn: 247463
* [Edit] Fix issue with tracking what macro argument inputs have been edited.Argyrios Kyrtzidis2015-09-112-0/+4
| | | | | | This was not working correctly, leading to erroneously rejecting valid edits. llvm-svn: 247462
* Record function attribute "stackrealign" instead of using backend optionAkira Hatanaka2015-09-114-15/+17
| | | | | | | | | | | | -force-align-stack. Also, make changes to the driver so that -mno-stack-realign is no longer an option exposed to the end-user that disallows stack realignment in the backend. Differential Revision: http://reviews.llvm.org/D11815 llvm-svn: 247451
* Fix a typo and make this test stricter.Adrian Prantl2015-09-111-2/+5
| | | | llvm-svn: 247449
* Use Itanium C++ ABI triple for new modules+debug testReid Kleckner2015-09-111-1/+4
| | | | llvm-svn: 247438
* [test] Specify exception object type in two testsVedant Kumar2015-09-112-2/+2
| | | | | | | | | | | | | Replace: 'try { throw 0; } catch (...)' with 'try { throw 0; } catch (int e)' in two test cases. Differential Revision: http://reviews.llvm.org/D12743 llvm-svn: 247437
* Update test expectations for LLVM asm printing changeReid Kleckner2015-09-111-4/+7
| | | | llvm-svn: 247434
* Module Debugging: Emit forward declarations for types that are defined inAdrian Prantl2015-09-112-0/+98
| | | | | | | | | clang modules, if -dwarf-ext-refs (DebugTypesExtRefs) is specified. This reimplements r247369 in about a third of the amount of code. Thanks to David Blaikie pointing this out in post-commit review! llvm-svn: 247432
* Revert "Module Debugging: Emit forward declarations for types that are ↵Adrian Prantl2015-09-112-106/+0
| | | | | | | | defined in" This reverts commit r247369 to facilitate reviewing of the following patch. llvm-svn: 247431
OpenPOWER on IntegriCloud