summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* MS ABI: Up the required alignment after inserting padding between vbasesDavid Majnemer2014-07-161-0/+55
| | | | | | | | | | We would correctly insert sufficiently aligned padding between vbases when our leading base was empty, however we would neglect to increase the required alignment of the most derived class. This fixes PR20315. llvm-svn: 213123
* Improve error recovery around colon.Serge Pavlov2014-07-163-0/+123
| | | | | | | | | | | | Recognize additional cases, when '::' is mistyped as ':'. This is a fix to RP18587 - colons have too much protection in member-declarations Review is tracked by http://reviews.llvm.org/D3653. This is an attempt to recommit the fix, initially committed as r212957 but then reverted in r212965 as it broke self-build. In the updated patch ParseDirectDeclarator turns on colon protection in for context as well. llvm-svn: 213120
* Driver: bifurcate extended and basic MSC versioningSaleem Abdulrasool2014-07-166-32/+62
| | | | | | | | | | | | | | | | | | | | | | | This restores the original behaviour of -fmsc-version. The older option remains as a mechanism for specifying the basic version information. A secondary option, -fms-compatibility-version permits the user to specify an extended version to the driver. The new version takes the value as a dot-separated value rather than the major * 100 + minor format that -fmsc-version format. This makes it easier to specify the value as well as a more flexible manner for specifying the value. Specifying both values is considered an error. The older parameter is left solely as a driver option, which is normalised into the newer parameter. This allows us to retain a single code path in the compiler itself whilst preserving the semantics of the old parameter as well as avoid having to determine which of two formats are being used by the invocation. The test changes are due to the fact that the compiler no longer supports the old option, and is a direct conversion to the new option. llvm-svn: 213119
* Add a test for wildcard expansion on WindowsHans Wennborg2014-07-163-0/+6
| | | | | | This depends on LLVM r213114 llvm-svn: 213115
* Avoid referencing the vtable when calling the ctor without emitting itReid Kleckner2014-07-161-2/+52
| | | | | | | | | | | | | | This fixes compilation errors about incomplete types used with WebKit's RefPtr template. Simply calling an out of line constructor should not instantiate all inline and defaulted virtual methods. Tested by building and testing several big piles of code on Linux. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D4429 llvm-svn: 213109
* Use the integrated assembler by default on OpenBSD/sparc.Brad Smith2014-07-151-3/+7
| | | | llvm-svn: 213105
* Add __INTMAX_C_SUFFIX__ and __UINTMAX_C_SUFFIX__.Joerg Sonnenberger2014-07-151-0/+67
| | | | llvm-svn: 213097
* clang-cl: Implement the -arch flagEhsan Akhgari2014-07-152-1/+71
| | | | | | | | | | | | | | | Summary: This implements the -arch flag for both x86 and x86-64 by letting them affect the default target features we pass to cc1. -m machine flags will override the features set by -arch. Reviewers: hansw Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4519 llvm-svn: 213083
* Improve test of my previous patch. rdar://17633301Fariborz Jahanian2014-07-151-2/+3
| | | | llvm-svn: 213081
* Add codegen for more R600 builtinsMatt Arsenault2014-07-151-0/+84
| | | | llvm-svn: 213079
* Objective-C IRGen. Fixes an inconsistant linkage ofFariborz Jahanian2014-07-151-0/+14
| | | | | | | ObC's metaclass metadata with its class metadata which results in an assert. rdar://17633301 llvm-svn: 213076
* Make sure int64_t and uint64_t are consistent.Joerg Sonnenberger2014-07-151-18/+18
| | | | llvm-svn: 213065
* Provide builtin macros as template for PRIab and SCNab, matching theJoerg Sonnenberger2014-07-151-0/+890
| | | | | | underlaying types. llvm-svn: 213063
* [OPENMP] Several cosmetic fixes in comments, tests and the code for '#pragma ↵Alexey Bataev2014-07-151-8/+0
| | | | | | omp single'. llvm-svn: 213040
* Don't get confused on the number of braces when braces start after the first ↵Ehsan Akhgari2014-07-151-0/+3
| | | | | | | | | | | | | | | | __asm Summary: Without this, we would not consume the closing brace which would cause the parser to start consuming C++ and bad things would happen. Reviewers: majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4505 llvm-svn: 213032
* PR19751: (T())++ is not a cast-expression.Richard Smith2014-07-151-0/+6
| | | | llvm-svn: 213022
* AST: Fix __uuidof for template specializationsDavid Majnemer2014-07-141-0/+37
| | | | | | | | | | | While we previously supported __uuidof applied to a template specialization, we would only find the uuid attribute if it was applied to the template argument. We would erroneously ignore the uuid attribute on the specialization itself. This is required to parse Windows Runtime C++ Template Library headers. llvm-svn: 213016
* Continue parsing an expression list even after an error is encountered.Kaelyn Takata2014-07-143-2/+10
| | | | | | | | | Otherwise, multiple errors such as having unknown identifiers for two arguments won't be diagnosed properly (e.g. only the first one would have a diagnostic message if typo correction fails even though both would be diagnosed if typo correction suggests a replacement). llvm-svn: 213003
* Fix build with various feature flag combinationsAlp Toker2014-07-141-1/+12
| | | | llvm-svn: 212996
* Fix the !CLANG_ENABLE_ARCMT buildAlp Toker2014-07-141-1/+8
| | | | llvm-svn: 212995
* Try harder to supress the test from r212975 on WindowsBen Langmuir2014-07-141-2/+2
| | | | | | | | The attempt in r212980 was broken because we might not fail if LLVM_ON_UNIX is enabled for cross compiling to Windows, and it didn't consider mingw either. llvm-svn: 212989
* Introduce getCorrespondingUnsignedType() in TargetInfo to work like theJoerg Sonnenberger2014-07-141-18/+19
| | | | | | | | corresponding AST context function, only restricted to basic integer types. Use this to ensure getUIntPtrType() gives types consistent with getIntPtrType(). Fix NVPTX backend to give signed intptr_t. llvm-svn: 212982
* XFAIL test that doesn't work on Windows yetBen Langmuir2014-07-141-0/+2
| | | | llvm-svn: 212980
* In C++98, if an rvalue reference binds to a function lvalue (or an xvalue or anRichard Smith2014-07-141-10/+6
| | | | | | | | array prvalue), treat that as a direct binding. Only the class prvalue case needs to be excluded here; the rest are extensions anyway, so we can treat them as we would in C++11. llvm-svn: 212978
* Fix case-sensitivity of inferred framework modulesBen Langmuir2014-07-141-0/+5
| | | | | | | Just because we can open a directory named "COcoa.framework" doesn't mean we should provide a "COcoa" module on a case-insensitive filesystem. llvm-svn: 212975
* Fix typosAlp Toker2014-07-142-2/+2
| | | | | | Also consolidate 'backward compatibility' llvm-svn: 212974
* Avoid non-attributive uses of 'unsupported' in diagnosticsAlp Toker2014-07-144-10/+10
| | | | | | | | | | | | | We don't have a style guide for diagnostic messages, but convention strongly favours the forms: 'attribute is not supported', 'unsupported attribute' We generally avoid: 'attribute is unsupported', 'non-supported attribute' llvm-svn: 212972
* Revert "Improve error recovery around colon."Reid Kleckner2014-07-142-111/+0
| | | | | | | | This reverts commit r212957. It broke the self-host on code like this from LLVM's option library: for (auto Arg: filtered(Id0, Id1, Id2)) llvm-svn: 212965
* Change the diagnostic group for unsupported gcc optimizations added r212805Alp Toker2014-07-141-6/+6
| | | | | | | | | | Use -Winvalid-command-line-argument here to align with existing gcc opt diagnostics. Meanwhile -Wunused-command-line-argument is for flags that we support but were, say, fed into the wrong invocation. Also tweak wording to make sense with -Werror. llvm-svn: 212964
* Improve error recovery around colon.Serge Pavlov2014-07-142-0/+111
| | | | | | | | | Recognize additional cases, when '::' is mistyped as ':'. This is a fix to RP18587 - colons have too much protection in member-declarations. Differential Revision: http://reviews.llvm.org/D3653 llvm-svn: 212957
* CodeGen: Let arrays be inputs to inline asmDavid Majnemer2014-07-142-0/+14
| | | | | | | | | | | An array showing up in an inline assembly input is accepted in ICC and GCC 4.8 This fixes PR20201. Differential Revision: http://reviews.llvm.org/D4382 llvm-svn: 212954
* ARM: Add NOP intrinsic mapping in arm_acle.hYi Kong2014-07-141-0/+8
| | | | llvm-svn: 212950
* ARM: Implement __builtin_arm_nop intrinsicYi Kong2014-07-142-0/+7
| | | | | | | | | | | This patch implements __builtin_arm_nop intrinsic for AArch32 and AArch64, which generates hint 0x0, the alias of NOP instruction. This intrinsic is necessary to implement ACLE __nop intrinsic. Differential Revision: http://reviews.llvm.org/D4495 llvm-svn: 212947
* [x32] Add __ILP32__ macro for ILP32 platformsPavel Chupin2014-07-141-0/+162
| | | | | | | | | | | | | | | | Summary: Add __ILP32__ and _ILP32 macro for corresponding platforms. Cover x86_64-*-*-gnux32 with test. Test Plan: test added Reviewers: chandlerc, atanasyan Subscribers: cfe-commits, dschuff, zinovy.nis Differential Revision: http://reviews.llvm.org/D4473 llvm-svn: 212931
* Superficial fix for PR20218: binding a function lvalue to a const reference toRichard Smith2014-07-141-0/+22
| | | | | | | | | | | | | a function pointer is neither better nor worse than binding a function lvalue to a function rvalue reference. Don't get confused and think that both bindings are binding to a function lvalue (which would make the lvalue form win); the const reference is binding to an rvalue. The "real" bug in PR20218 is still present: we're getting the wrong answer from template argument deduction, and that's what leads us to this weird overload set. llvm-svn: 212916
* Add test cases for AArch64 hints codegenYi Kong2014-07-131-0/+8
| | | | llvm-svn: 212909
* MS ABI: Stick internal vftables in a comdat if they have RTTI dataDavid Majnemer2014-07-131-1/+2
| | | | | | | | | | | | | | | Previously, we would have a private backing variable and an internal alias pointing at it. However, -fdata-sections only fires if a global variable has non-private linkage. This means that an unreferenced vftable wouldn't get discarded, bloating the object file. Instead, stick the backing variable in a comdat even if the alias has internal linkage. This will allow the linker to drop the vftable if it is unused. llvm-svn: 212901
* tests: use a more precise target for testsSaleem Abdulrasool2014-07-121-2/+2
| | | | llvm-svn: 212892
* Headers: add hint intrinsics to arm_acle.hSaleem Abdulrasool2014-07-121-4/+6
| | | | | | | | This adds the ARM ACLE hint intrinsic wrappers to arm_acle.h. These need to be protected with a !defined(_MSC_VER) since MSVC (and thus clang in compatibility mode) provide these wrappers as proper builtin intrinsics. llvm-svn: 212891
* CodeGen: support hint intrinsics from ACLE on AArch64Saleem Abdulrasool2014-07-121-0/+37
| | | | | | | This adds support for the ACLE hint intrinsics on AArch64 similar to ARM. This is required to properly support ACLE on AArch64. llvm-svn: 212890
* Improve comments of ARM ACLE header file and testsYi Kong2014-07-121-3/+8
| | | | | | Include section number in ARM ACLE specification for easier navigation. llvm-svn: 212887
* Add nonnull in CodeGen for __attribute__((returns_nonnull))Hal Finkel2014-07-121-0/+6
| | | | | | | As a follow-up to r212835, also add the LLVM nonnull function attribute when __attribute__((returns_nonnull)) is provided. llvm-svn: 212874
* [ASan] Collect unmangled names of global variables in Clang to print them in ↵Alexey Samsonov2014-07-121-10/+14
| | | | | | | | | | | | | | | | | error reports. Currently ASan instrumentation pass creates a string with global name for each instrumented global (to include global names in the error report). Global name is already mangled at this point, and we may not be able to demangle it at runtime (e.g. there is no __cxa_demangle on Android). Instead, create a string with fully qualified global name in Clang, and pass it to ASan instrumentation pass in llvm.asan.globals metadata. If there is no metadata for some global, ASan will use the original algorithm. This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=264. llvm-svn: 212872
* Require an x86 registered target for this test by splitting it outReid Kleckner2014-07-122-6/+12
| | | | | | | This is a shot in the dark to fix the hexagon bot, so I'm not 100% sure this is the issue. llvm-svn: 212871
* clang-cl: Make all x86 CPU feature flags available, such as -msse3Reid Kleckner2014-07-121-2/+4
| | | | | | | | | | | | | Ideally, we would use the /arch cl.exe flag for this stuff. Unfortunately, MSVC supports only 5 /arch flag values, which isn't nearly enough to cover all the CPU features that LLVM cares about. At the very least, we need to know about SSE3 and SSE4.1 in addition to SSE, SSE2, AVX, and AVX2. In the future we should add the relevant /arch mappings in addition to these gcc-style -m flags. llvm-svn: 212869
* Form a CallExpr from __noop without parensReid Kleckner2014-07-111-5/+22
| | | | | | | | | | | | MSVC accepts __noop without any trailing parens and treats it like a literal zero. We don't treat __noop as an integer literal, but now at least we can parse a naked __noop expression. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D4476 llvm-svn: 212860
* Consolidate header inclusion diagnosticsAlp Toker2014-07-1110-20/+20
| | | | | | | Make argument orders match, unify diagnostic IDs and reword the message to be a little less saccharine. llvm-svn: 212845
* CodeGen: Don't emit a thread-wrapper if we can't touch the backing variableDavid Majnemer2014-07-111-2/+25
| | | | | | | | | | | | | | | | OS X TLS has all accesses going through the thread-wrapper function and gives the backing thread-local variable internal linkage. This means that thread-wrappers must have WeakAnyLinkage so that references to the internal thread-local variables do not get propagated to other code. It also means that translation units which do not provide a definition for the thread-local variable cannot attempt to emit a thread-wrapper because the thread wrapper will attempt to reference the backing variable. Differential Revision: http://reviews.llvm.org/D4109 llvm-svn: 212841
* oops. correct the prefix.Brad Smith2014-07-111-1/+1
| | | | llvm-svn: 212840
* MS extension: Make __noop be the integer zero, not voidReid Kleckner2014-07-111-3/+3
| | | | | | | We still don't accept '__noop;', and we don't consider __noop to be the integer literal zero. More work is needed. llvm-svn: 212839
OpenPOWER on IntegriCloud