summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Add attributes for preserve_mostcc/preserve_allcc calling conventions to the ↵Roman Levenstein2016-03-162-0/+52
| | | | | | | | | | | | | | | C/C++ front-end Till now, preserve_mostcc/preserve_allcc calling convention attributes were only available at the LLVM IR level. This patch adds attributes for preserve_mostcc/preserve_allcc calling conventions to the C/C++ front-end. The code was mostly written by Juergen Ributzka. I just added support for the AArch64 target and tests. Differential Revision: http://reviews.llvm.org/D18025 llvm-svn: 263647
* Fix destructor definition of invalid classesOlivier Goffart2016-03-161-1/+9
| | | | | | | | | | | | The declaration of the destructor of an invalid class was not properly marked as noexcept. As a result, the definition of the same destructor, which was properly implicitly marked as noexcept, would not match the definition. This would cause the definition CXXDestructorDecl to be matked as invalid and omited from the AST. Differential Revision: http://reviews.llvm.org/D17988 llvm-svn: 263639
* Revert r263617, "Reapply: [VFS] Add support for handling path traversals"NAKAMURA Takumi2016-03-162-132/+0
| | | | | | It broke standalone clang build. llvm-svn: 263636
* [modules] Fix adding a templated friend functions to a namespace from ↵Vassil Vassilev2016-03-164-0/+56
| | | | | | | | | | | | | | another module. When clang adds argument dependent lookup candidates, it can perform template instantiation. For example, it can instantiate a templated friend function and register it in the enclosing namespace's lookup table. Fixes https://llvm.org/bugs/show_bug.cgi?id=24954 Reviewed by Richard Smith. llvm-svn: 263634
* Add more ARM Cortex-R8 regression tests to Clang.Pablo Barrio2016-03-164-10/+19
| | | | | | | | | | | | | | Summary: This patch adds Clang tests for Cortex-R8 related to FP capabilities and hardware integer divide. Reviewers: rengolin, bsmith Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D18193 llvm-svn: 263632
* Avoid using LookupResult's implicit copy ctor and assignment operator to ↵Marina Yatsina2016-03-161-0/+15
| | | | | | | | | | | | | avoid warnings The purpose of this patch is to keep the same functionality without using LookupResult's implicit copy ctor and assignment operator, because they cause warnings when -Wdeprecated is passed. This patch is meant to help the following review: http://reviews.llvm.org/D18123. The functionality is covered by the tests in my original commit (255890) The test case in this patch was added to test a bug caught in the review of the first version of this fix. Differential Revision: http://reviews.llvm.org/D18175 llvm-svn: 263630
* Reapply: [VFS] Add support for handling path traversalsBruno Cardoso Lopes2016-03-162-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | This is originally r261551, reverted because of windows bots failing on unittests. Change the current behavior to do not handle path traversals on windows. Handle ".", ".." and "./" with trailing slashes while collecting files to be dumped into the vfs overlay directory. Include the support for symlinks into components. Given the path: /install-dir/bin/../lib/clang/3.8.0/include/altivec.h, if "bin" component is a symlink, it's not safe to use `path::remove_dots` here, and `realpath` is used to get the right answer. Since `realpath` is expensive, we only do it at collecting time (which only happens during the crash reproducer) and cache the base directory for fast lookups. Overall, this makes the input to the VFS YAML file to be canonicalized to never contain traversal components. Differential Revision: http://reviews.llvm.org/D17104 rdar://problem/24499339 llvm-svn: 263617
* Convert some ObjC msgSends to runtime calls.Pete Cooper2016-03-162-0/+136
| | | | | | | | | | | | | | It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those functions. This patch adds support for converting messages to retain/release/alloc/autorelease to their equivalent runtime calls. Tests included for the positive case of applying this transformation, negative tests that we ensure we only convert "alloc" to objc_alloc, not "alloc2", and also a driver test to ensure we enable this only for supported runtime versions. Reviewed by John McCall. Differential Revision: http://reviews.llvm.org/D14737 llvm-svn: 263607
* Myriad: define __myriad2 macro automaticallyDouglas Katzman2016-03-152-4/+13
| | | | llvm-svn: 263596
* Revert commit http://reviews.llvm.org/D17877 to fix tests on x86.Arpith Chacko Jacob2016-03-151-587/+0
| | | | llvm-svn: 263589
* [OpenMP] Base support for target directive codegen on NVPTX device.Arpith Chacko Jacob2016-03-151-0/+587
| | | | | | | | | | | Summary: This patch adds base support for codegen of the target directive on the NVPTX device. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D17877 llvm-svn: 263587
* Move the fixit for -Wformat-security to a note.Bob Wilson2016-03-156-37/+21
| | | | | | | | r263299 added a fixit for the -Wformat-security warning, but that runs into complications with our guideline that error recovery should be done as-if the fixit had been applied. Putting the fixit on a note avoids that. llvm-svn: 263584
* [cfi] Don't emit checks for disabled CFI kinds.Evgeniy Stepanov2016-03-152-1/+72
| | | | | | | | | | | | | | In the cross-DSO CFI mode clang emits __cfi_check_fail that handles errors triggered from other modules with targets in the current module. With this change, __cfi_check_fail will handle errors for CFI kinds that are not enabled in the current module as if they have the trapping behaviour (-fsanitize-trap=...). This fixes a bug where some combinations of -fsanitize* flags may result in a link failure due to a missing sanitizer runtime library for the diagnostic calls in __cfi_check_fail. llvm-svn: 263578
* Test commit - Remove some trailing whitespacePablo Barrio2016-03-151-1/+1
| | | | llvm-svn: 263574
* Fix a bot I broke.Chris Bieneman2016-03-151-1/+4
| | | | | | The builtin library isn't added by the driver unless it exists, so we shouldn't check for it. I've marked this as a FIXME, because we probably should have a way to test this. llvm-svn: 263568
* [Driver] [Darwin] Fix linking libclang_rt.profile_*sim.aChris Bieneman2016-03-151-0/+6
| | | | | | | | | | | | Summary: isTarget*() calls are order-dependent. This is because iOS Sim *is* iOS. This means checks for the simulator version of the platform must always be ahead of checks for the embedded platform. Reviewers: zaks.anna, bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17947 llvm-svn: 263567
* Myriad: Pass -mcpu to movi{Compile,Asm}Douglas Katzman2016-03-151-7/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D18186 llvm-svn: 263556
* Reverted http://reviews.llvm.org/D17877 to fix tests.Arpith Chacko Jacob2016-03-151-587/+0
| | | | llvm-svn: 263555
* [OpenMP] Base support for target directive codegen on NVPTX device.Arpith Chacko Jacob2016-03-151-0/+587
| | | | | | | | | | | Summary: This patch adds base support for codegen of the target directive on the NVPTX device. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D17877 llvm-svn: 263552
* Make it possible for AST plugins to enable themselves by defaultJohn Brawn2016-03-151-0/+7
| | | | | | | | | | | | Currently when an AST plugin is loaded it must then be enabled by passing -plugin pluginname or -add-plugin pluginname to the -cc1 command line. This patch adds a method to PluginASTAction which allows it to declare that the action happens before, instead of, or after the main AST action, plus the relevant changes to make the plugin action happen at that time automatically. Differential Revision: http://reviews.llvm.org/D17959 llvm-svn: 263546
* clang/test/CodeGenCXX/virtual-function-attrs.cpp: Appease i686-mingw32 to ↵NAKAMURA Takumi2016-03-141-3/+3
| | | | | | expect x86_thiscallcc. llvm-svn: 263505
* Relax test introduced in r263464 to accept ARM ABI output.Peter Collingbourne2016-03-141-1/+1
| | | | | | Should fix ARM bots. llvm-svn: 263477
* CodeGen: Use 32-bit gep offsets to address vtable address points.Peter Collingbourne2016-03-1410-34/+34
| | | | | | | | | | | | | | | | | The relative vtable ABI will use a struct rather than an array as the type of a vtable. LLVM only allows 32-bit integers as struct indices, so we need to use 32-bit integers to get addresses of address points. In order to keep the code simple, we might as well do that unconditionally. It's probably a reasonable implementation limit to support no more than 2 billion virtual functions per class. This change causes quite a bit of churn in the test suite, so I'm making it separately. Differential Revision: http://reviews.llvm.org/D18113 llvm-svn: 263469
* CodeGen: Mark functions used in vtables as unnamed_addr.Peter Collingbourne2016-03-142-0/+16
| | | | | | | | | | | This marks virtual function declarations, as well as runtime library functions __cxa_pure_virtual, __cxa_deleted_virtual and _purecall, as unnamed_addr. This will allow us to correctly form relative references to them from vtables in the relative vtable ABI. Differential Revision: http://reviews.llvm.org/D18071 llvm-svn: 263464
* [modules] Don't diagnose non-modular includes from modular files that areRichard Smith2016-03-142-0/+8
| | | | | | implementation units of modules rather than interface units. llvm-svn: 263449
* [OpenMP] Replace offloading option that start with -o with -fo.Samuel Antao2016-03-1411-236/+236
| | | | | | | | | | | | | | | Summary: The current offloading implementation is using -omptargets and -omp-host-ir-file-path options in the frontend. This causes the user a lot of trouble due to to the conflicts with the -o option. E.g. if the user misspells omptargets he will end up with a file with a weird name. This patches replaces these two options with -fomptargets and -fomp-host-ir-file-path to avoid these issues, and it is also more consistent with the other options like -fopenmp. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D18112 llvm-svn: 263442
* Revert "Recommitted r261634 "Supporting all entities declared in lexical ↵Benjamin Kramer2016-03-142-33/+6
| | | | | | | | scope in LLVM debug info." After fixing PR26715 at r263379." This reverts commit r263425. Breaks self-host. llvm-svn: 263436
* Fix some more tests with CLANG_DEFAULT_CXX_STDLIBJonas Hahnfeld2016-03-145-22/+24
| | | | | | | Also use -stdlib=platform instead of -stdlib=libstdc++ when testing if Clang chooses the correct default for the given platform. llvm-svn: 263435
* Make FreeBSD and NetBSD use CLANG_DEFAULT_CXX_STDLIBJonas Hahnfeld2016-03-142-34/+34
| | | | | | | | | Also introduce -stdlib=platform to override the configured value and use it to make the tests always pass. Differential Revision: http://reviews.llvm.org/D17286 llvm-svn: 263434
* Recommitted r261634 "Supporting all entities declared in lexical scope in ↵Amjad Aboud2016-03-142-6/+33
| | | | | | | | LLVM debug info." After fixing PR26715 at r263379. llvm-svn: 263425
* [Driver] Enable --rtlib option for MSVC targetAndrey Turetskiy2016-03-142-0/+9
| | | | | | | | | | This enables "--rtlib compiler-rt" option under MSVC environment. Patch by Roman Shirokiy. Differential Revision: http://reviews.llvm.org/D17453 llvm-svn: 263422
* Give the test a temporary output so it can be cleaned up.Eric Christopher2016-03-141-2/+2
| | | | llvm-svn: 263410
* Try to get cl-pch-showincludes passing on AArch64 bots.Nico Weber2016-03-131-0/+1
| | | | llvm-svn: 263400
* Remove compile time PreserveName in favor of a runtime cc1 ↵Mehdi Amini2016-03-138-19/+29
| | | | | | | | | | | | | | | | | | | | -discard-value-names option Summary: This flag is enabled by default in the driver when NDEBUG is set. It is forwarded on the LLVMContext to discard all value names (but GlobalValue) for performance purpose. This an improved version of D18024 Reviewers: echristo, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18127 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263394
* Added test that covers changes in r263379.Amjad Aboud2016-03-131-0/+10
| | | | llvm-svn: 263380
* Also test that the pch file is not printed in /showIncludesNico Weber2016-03-131-0/+1
| | | | llvm-svn: 263355
* Make test a bit stricter to check not just the file basename is printed.Nico Weber2016-03-131-4/+4
| | | | llvm-svn: 263353
* clang-cl: Add /Yc argument to /showIncludes output.Nico Weber2016-03-131-2/+1
| | | | | | | | | | To make this work, delay printing of ExtraDeps in HeaderIncludesCallback a bit, so that it happens after CompilerInstance::InitializeSourceManager() has run. General /FI arguments are still missing from /showIncludes output, this still needs to be fixed. llvm-svn: 263352
* clang-cl: Add a test for the interaction of /Yc and /showIncludes.Nico Weber2016-03-124-0/+23
| | | | | | | | We almost get this right, but not completely (see FIXME). It looks like /FI headers generally aren't included in /showIncludes yet, but they should be. But it seems good to have test coverage for the bits that already work. llvm-svn: 263344
* Add fix-it for format-security warnings.Bob Wilson2016-03-112-0/+37
| | | | llvm-svn: 263299
* Fix ObjCMethodDecl::findPropertyDecl for class properties.Jordan Rose2016-03-111-0/+25
| | | | | | | This affects code completion and a few other things; hopefully the code completion test is sufficient to catch regressions. llvm-svn: 263295
* Add missing triple to instantiate-sizeof.cpp testReid Kleckner2016-03-111-1/+1
| | | | llvm-svn: 263285
* Allow sizeof(UnrelatedClass::field) in C++11 class template methodsReid Kleckner2016-03-111-1/+26
| | | | | | | | | | | | | | | | | This feature works outside of templates by forming a DeclRefExpr to a FieldDecl instead of a MemberExpr, which requires a base object in addition to the FieldDecl. Previously, while building up the template AST before instantiation, we formed a CXXDependentScopeMemberExpr, which always instantiates to a MemberExpr. Now, in unevaluated contexts we form a DependentScopeDeclRefExpr, which is a more flexible node that can instantiate to either a MemberExpr or a DeclRefExpr depending on lookup results. Fixes PR26893. llvm-svn: 263279
* Update test case for llvm summary format changes in D17592.Teresa Johnson2016-03-111-4/+4
| | | | llvm-svn: 263276
* [SEH] Remove nounwind/noinline from outlined finally funcletsReid Kleckner2016-03-111-2/+19
| | | | | | With the new EH representation this is no longer necessary. llvm-svn: 263269
* Add tests for ARM Cortex-R8Alexandros Lamprineas2016-03-111-0/+3
| | | | | | | | | | | Add command-line tests for ARM Cortex-R8 checking that the driver calls clang -cc1 with the correct little-endian/big-endian, and ARM/Thumb triple. Patch by Pablo Barrio <pablo.barrio@arm.com> Differential Revision: http://reviews.llvm.org/D18052 llvm-svn: 263245
* Print strict in Availability attribute when it is on.Manman Ren2016-03-101-0/+3
| | | | llvm-svn: 263172
* Add has_feature objc_class_property.Manman Ren2016-03-101-0/+4
| | | | | | rdar://23891898 llvm-svn: 263171
* Reenable asm-errors.cNico Weber2016-03-101-3/+2
| | | | | | | r134811 made the test pass and reenabled it, but r134831 accidentally disabled it again due to a bad merge. llvm-svn: 263168
* Add test for r263138.Richard Smith2016-03-101-0/+13
| | | | llvm-svn: 263155
OpenPOWER on IntegriCloud