summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Driver: correct behaviour of -fmsc-version=MAJORSaleem Abdulrasool2014-06-231-0/+6
| | | | | | | | | Ensure that we properly handle the case where just the major version component is provided by the user. Thanks to Alp Toker for pointing out that this was not handled correctly! llvm-svn: 211506
* MS ABI: Add an additional test for typeidDavid Majnemer2014-06-231-0/+7
| | | | | | | This tests typeid with polymorphic arguments which have an extendable virtual function table. llvm-svn: 211505
* Revert "Revert r211402 (and r211408,r211410), "CodeGen: Refactor ↵David Majnemer2014-06-222-176/+135
| | | | | | | | | dynamic_cast and typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp." This reverts commit r211467 which reverted r211408,r211410, it caused crashes in test/SemaCXX/undefined-internal.cpp for i686-win32 targets. llvm-svn: 211473
* Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and ↵NAKAMURA Takumi2014-06-222-135/+176
| | | | | | | | | | typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp. It is reproducible with: $ clang -cc1 -triple i686-win32 -emit-llvm-only clang/test/SemaCXX/undefined-internal.cpp llvm-svn: 211467
* [analyzer] Check for NULL passed to CFAutorelease.Jordan Rose2014-06-214-46/+94
| | | | | | Patch by Sean McBride, tests adjusted by me. llvm-svn: 211453
* Make MS i128 suffix test from r211446 more robustAlp Toker2014-06-211-2/+4
| | | | | | We want to catch both negative and positive failure conditions. llvm-svn: 211449
* The i128 suffix isn't always available.David Majnemer2014-06-211-0/+2
| | | | | | | | This Lexer test unconditionally used the i128 integer literal suffix. This suffix is only available to targets that have 128-bit arithmetic support. llvm-svn: 211446
* Lex: Use the correct types for MS integer suffixesDavid Majnemer2014-06-211-0/+18
| | | | | | | | | | | | | | | | Something went wrong with r211426, it is an older version of this code and should not have been committed. It was reverted with r211434. Original commit message: We didn't properly implement support for the sized integer suffixes. Suffixes like i16 were essentially ignored instead of mapping them to the appropriately sized integer type. This fixes PR20008. Differential Revision: http://reviews.llvm.org/D4132 llvm-svn: 211441
* [test] Add '-target' option to fix bot failure.Argyrios Kyrtzidis2014-06-211-1/+1
| | | | llvm-svn: 211439
* [PCH] Remove the BackingIvarReferencedInAccessor field from DECL_OBJC_IVAR ↵Argyrios Kyrtzidis2014-06-211-0/+10
| | | | | | | | abbreviation record. Patch by Yiding Jia! llvm-svn: 211438
* Revert "Lex: Use the correct types for MS integer suffixes"Rafael Espindola2014-06-211-8/+0
| | | | | | | | | This reverts commit r211426. This broke the arm bots. The crash can be reproduced on X86 by running. ./bin/clang -cc1 -fsyntax-only -verify -fms-extensions ~/llvm/clang/test/Lexer/ms-extensions.c -triple arm-linux llvm-svn: 211434
* Lex: Use the correct types for MS integer suffixesDavid Majnemer2014-06-211-0/+8
| | | | | | | | | | | | We didn't properly implement support for the sized integer suffixes. Suffixes like i16 were essentially ignored instead of mapping them to the appropriately sized integer type. This fixes PR20008. Differential Revision: http://reviews.llvm.org/D4132 llvm-svn: 211426
* Driver: In crashdumps with -fmodule, dump the module dependenciesJustin Bogner2014-06-204-2/+35
| | | | llvm-svn: 211421
* Driver: enhance MSC version compatibilitySaleem Abdulrasool2014-06-201-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | The version information for Visual Studio is spread over multiple variables. The newer Windows SDK has started making use of some of the extended versioning variables that were previously undefined. Enhance our compatibility definitions for these cases. _MSC_VER is defined to be the Major * 100 + Minor. _MSC_FULL_VER is defined to be Major * 10000000 + Minor * 100000 + Build. And _MSC_BUILD is the build revision of the compiler. Extend the -fmsc-version option in a compatible manner. If the value is the previous form of MMmm, then we assume that the build number is 0. Otherwise, a specific build number may be passed by using the form MMmmbbbbb. Due to bitwidth limitations of the option, it is currently not possible to define a revision value. The version information can be passed as either the decimal encoded value (_MSC_FULL_VER or _MSC_VER) or as a dot-delimited value. The change to the TextDiagnostic is to deal with the updated encoding of the version information. llvm-svn: 211420
* Driver: Record that we're in crashdump and push flags to ConstructJobJustin Bogner2014-06-201-3/+3
| | | | | | | | | | | It's more flexible and arguably better layering to set flags to modify compiling for diagnostics in the CC1 job themselves, rather than tweaking the driver flags and letting them propagate. There is one visible change this causes: crash report files will now get preprocessed names (.i and friends). llvm-svn: 211411
* CodeGen: Fix test to work with assertions as wellDavid Majnemer2014-06-201-1/+1
| | | | llvm-svn: 211410
* CodeGen: typeid/dynamic_cast tests don't need assertsDavid Majnemer2014-06-202-42/+26
| | | | | | | These tests relied on information that was only available for clang builds that included asserts. Fix these tests to lift that restriction. llvm-svn: 211408
* CodeGen: Refactor dynamic_cast and typeidDavid Majnemer2014-06-202-174/+149
| | | | | | | | | | | This refactors the emission of dynamic_cast and typeid expressions so that ABI specific knowledge lives in appropriate places. There are quite a few benefits for having the two implementations share a common core like sharing logic for optimization opportunities. While we are at it, clean up the tests. llvm-svn: 211402
* Fix typo in r211394.Richard Smith2014-06-201-1/+1
| | | | llvm-svn: 211395
* [C++1z] Implement N3928: message in static_assert is optional.Richard Smith2014-06-202-1/+5
| | | | llvm-svn: 211394
* [C++1z] Implement N3981: Disable trigraphs by default in C++1z mode.Richard Smith2014-06-201-0/+9
| | | | llvm-svn: 211392
* Don't crash when emitting a glvalue conditional where one arm is aRichard Smith2014-06-201-0/+32
| | | | | | throw-expression. Based on a patch by Marius Wachtler! llvm-svn: 211388
* Fix crash caused by unnamed union or struct when doing ast-printSerge Pavlov2014-06-201-0/+12
| | | | llvm-svn: 211380
* [PowerPC] Fix small argument stack slot offset for LEUlrich Weigand2014-06-201-0/+69
| | | | | | | | | | | | | | | | | When small arguments (structures < 8 bytes or "float") are passed in a stack slot in the ppc64 SVR4 ABI, they must reside in the least significant part of that slot. On BE, this means that an offset needs to be added to the stack address of the parameter, but on LE, the least significant part of the slot has the same address as the slot itself. For the most part, this is handled in the LLVM back-end, where I just fixed the LE case in commit r211368. However, there is one piece of the clang front-end that is also aware of these stack-slot offsets: PPC64_SVR4_ABIInfo::EmitVAArg. This patch updates that routine to take endianness into account. llvm-svn: 211370
* Disable Modules/dependency-dump-dependent-module.m on win32 for now.NAKAMURA Takumi2014-06-201-0/+6
| | | | | | | | FIXME: This fails on win32 due to ERROR_FILENAME_EXCED_RANGE if the working directory is too deep. We should make Win32/Path.inc capable of long pathnames with '\\?\'. llvm-svn: 211363
* The ability to use vector initializer lists is a GNU vector extensionJames Molloy2014-06-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | and is unrelated to the NEON intrinsics in arm_neon.h. On little endian machines it works fine, however on big endian machines it exhibits surprising behaviour: uint32x2_t x = {42, 64}; return vget_lane_u32(x, 0); // Will return 64. Because of this, explicitly call out that it is unsupported on big endian machines. This patch will emit the following warning in big-endian mode: test.c:3:15: warning: vector initializers are a GNU extension and are not compatible with NEON intrinsics [-Wgnu] int32x4_t x = {0, 1, 2, 3}; ^ test.c:3:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants 1 warning generated. llvm-svn: 211362
* Add file missed in r211360 commitUlrich Weigand2014-06-201-0/+0
| | | | llvm-svn: 211361
* [PowerPC] Fix ELF interpreter name for powerpc64le-linuxUlrich Weigand2014-06-204-0/+24
| | | | | | | | | | On PowerPC LE the system uses the /lib64/ld64.so.2 dynamic linker name instead of /lib64/ld64.so.1 (to indicate the ELFv2 ABI version). This fixes the clang driver to pass the appropriate -dynamic-linker setting, and adds some more tests to linux-ld.c. llvm-svn: 211360
* [PowerPC] Add MultiarchIncludeDirs for powerpc64leUlrich Weigand2014-06-205-0/+16
| | | | | | | | | | There was already partial support for multi-arch on powerpc64le, but the MultiarchIncludeDirs setting was missing. This patch adds the appropriate definition, and also extends the linux-header-search.cpp test case to verify an Ubuntu 14.04 powerpc64le tree. llvm-svn: 211359
* Fix PR20081: Parsing templates in the presence of -x cuda -std=c++11Eli Bendersky2014-06-202-1/+22
| | | | | | http://reviews.llvm.org/D4222 llvm-svn: 211357
* Add module flags metadata to record the settings for enum and wchar widthOliver Stannard2014-06-201-0/+13
| | | | | | | Add module flags metadata to record the settings for enum and wchar width, to allow correct ARM build attribute generation llvm-svn: 211354
* [OPENMP] Initial support for 'nowait' clause.Alexey Bataev2014-06-201-4/+4
| | | | llvm-svn: 211352
* [OPENMP] Initial support for 'ordered' clause.Alexey Bataev2014-06-201-4/+4
| | | | llvm-svn: 211347
* Fix/Improve SourceRange of explicitly defaulted membersDaniel Jasper2014-06-203-6/+31
| | | | | | | | | | | | | | | | When adding the implicit compound statement (required for Codegen?), the end location was previously overridden by the start location, probably based on the assumptions: * The location of the compound statement should be the member's location * The compound statement if present is the last element of a FunctionDecl This patch changes the location of the compound statement to the member's end location. Code review: http://reviews.llvm.org/D4175 llvm-svn: 211344
* [OPENMP] Initial support for 'schedule' clause.Alexey Bataev2014-06-202-8/+99
| | | | llvm-svn: 211342
* Objective-C qoi. When Objective-C pointer mismatches withFariborz Jahanian2014-06-191-0/+17
| | | | | | | | a qualified-id type because pointer is object of a forward class declaration, include this info in a diagnostic note. // rdar://10751015 llvm-svn: 211324
* test: Just check the VFS when testing module-dependency-dumpJustin Bogner2014-06-192-21/+0
| | | | | | | Checking the filesystem seems to be a bit unreliable. Limit the tests to the VFS map for now. llvm-svn: 211310
* Frontend: Add a CC1 flag to dump module dependencies to a directoryJustin Bogner2014-06-192-0/+52
| | | | | | | | | | | | | | | | | | This adds the -module-dependency-dir to clang -cc1, which specifies a directory to copy all of a module's dependencies into in a form suitable to be used as a VFS using -ivfsoverlay with the generated vfs.yaml. This is useful for crashdumps that involve modules, so that the module dependencies will be intact when a crash report script is used to reproduce a problem on another machine. We currently encode the absolute path to the dump directory, due to limitations in the VFS system. Until we can handle relative paths in the VFS, users of the VFS map may need to run a simple search and replace in the file. llvm-svn: 211303
* Fix PR20069: bad loop pragma arguments crash FEEli Bendersky2014-06-191-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a crash when handling malformed arguments to loop pragmas such as: "#pragma clang loop vectorize(()". Essentially any argument which is not an identifier or constant resulted in a crash. This patch also changes a couple of the error messages which weren't quite correct. New behavior with this patch vs old behavior: #pragma clang loop vectorize(1) OLD: error: missing keyword; expected 'enable' or 'disable' NEW: error: invalid argument; expected 'enable' or 'disable' #pragma clang loop vectorize() OLD: error: expected ')' NEW: error: missing argument to loop pragma 'vectorize' #pragma clang loop vectorize_width(bad) OLD: error: missing value; expected a positive integer value NEW: error: invalid argument; expected a positive integer value #pragma clang loop vectorize(bad) OLD: invalid keyword 'bad'; expected 'enable' or 'disable' NEW: error: invalid argument; expected 'enable' or 'disable' http://reviews.llvm.org/D4197 Patch by Mark Heffernan llvm-svn: 211292
* Improve robustness of tests for module flags metadataOliver Stannard2014-06-198-29/+29
| | | | | | | Fix clang tests to not break if the ID numbers of module flags metadata nodes change. llvm-svn: 211276
* Fix assertion hit or bogus compiler error in cases when instantiating ObjC ↵Argyrios Kyrtzidis2014-06-191-0/+35
| | | | | | | | property accesses used with overloaded binary operators. rdar://17153478 llvm-svn: 211270
* [c++1z] Implement N3994: a range-based for loop can declare a variable with ↵Richard Smith2014-06-191-2/+20
| | | | | | | | | | | | super-terse notation for (x : range) { ... } which is equivalent to for (auto &&x : range) { ... } llvm-svn: 211267
* [OPENMP] Improved diagnostic messages for vars with the predetermined data ↵Alexey Bataev2014-06-1910-230/+321
| | | | | | sharing attributes and reformatting llvm-svn: 211262
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-181-1/+17
| | | | | | | | retainable ObjC pointers without requiring a bridge-cast in the context of pointer comparison as this is in effect a +0 context. // rdar://16627903 llvm-svn: 211243
* Sema: Static redeclaration after extern declarations is a Microsoft ExtensionDavid Majnemer2014-06-186-11/+13
| | | | | | | | | | | CL permits static redeclarations to follow extern declarations. The storage specifier on the latter declaration has no effect. This fixes PR20034. Differential Revision: http://reviews.llvm.org/D4149 llvm-svn: 211238
* Objective-C. Revert my patch in r211234.Fariborz Jahanian2014-06-184-21/+7
| | | | llvm-svn: 211237
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-184-7/+21
| | | | | | | retainable ObjC pointers without requiring a bridge-cast by recognizing this as a +0 context. // rdar://16627903 llvm-svn: 211234
* tests: relax ms-intrinsics testSaleem Abdulrasool2014-06-181-17/+14
| | | | | | | | | | Relax the tests to allow for differences between release and debug builds. This should fix the buildbots. Thanks to Benjamin Kramer and Eric Christo for their invaluable tip that this was release build specific issue. llvm-svn: 211227
* Relax the cl-inputs.c test a little bit in case link.exe is on PATHReid Kleckner2014-06-181-2/+2
| | | | llvm-svn: 211224
* [MS-ABI] Implement typeidWarren Hunt2014-06-181-0/+58
| | | | | | | This patch enables clang to generate calls to __RTtypeid when lowering typeid on win32 targets. Test cases are included. llvm-svn: 211223
OpenPOWER on IntegriCloud