summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* MS ABI: Implement #pragma vtordisp() and clang-cl /vdNReid Kleckner2014-02-1211-30/+213
| | | | | | | | | | | | | | | | | These features are new in VS 2013 and are necessary in order to layout std::ostream correctly. Currently we have an ABI incompatibility when self-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper in gtest. This change adds another implicit attribute, MSVtorDispAttr, because implicit attributes are currently the best way to make sure the information stays on class templates through instantiation. Reviewers: majnemer Differential Revision: http://llvm-reviews.chandlerc.com/D2746 llvm-svn: 201274
* Sema: Restrict alignment to 2**28.David Majnemer2014-02-121-8/+6
| | | | | | | | Allowing alignment past this point causes wrap around within clang. N.B. GCC has the same restriction. llvm-svn: 201254
* ARM NEON: fix range checking on immediates.Tim Northover2014-02-121-2/+2
| | | | | | | | | | Previously, range checking on the __builtin_neon_XYZ_v Clang intrinsics didn't take account of the type actually passed to the call, which meant a request like "vext_s16(a, b, 7)" was allowed through (TableGen was conservative and allowed 0-7 for all types). This caused an assert in the backend because the lane doesn't make sense. llvm-svn: 201232
* clang/lib/Driver/Multilib.cpp: Rewrite normalizePathSegment() to be tolerant ↵NAKAMURA Takumi2014-02-121-5/+20
| | | | | | | dosish pathsep. FIXME: It could be more simple... llvm-svn: 201227
* Add an option to allow Clang verify source files for a module only once duringDmitri Gribenko2014-02-125-23/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the build When Clang loads the module, it verifies the user source files that the module was built from. If any file was changed, the module is rebuilt. There are two problems with this: 1. correctness: we don't verify system files (there are too many of them, and stat'ing all of them would take a lot of time); 2. performance: the same module file is verified again and again during a single build. This change allows the build system to optimize source file verification. The idea is based on the fact that while the project is being built, the source files don't change. This allows us to verify the module only once during a single build session. The build system passes a flag, -fbuild-session-timestamp=, to inform Clang of the time when the build started. The build system also requests to enable this feature by passing -fmodules-validate-once-per-build-session. If these flags are not passed, the behavior is not changed. When Clang verifies the module the first time, it writes out a timestamp file. Then, when Clang loads the module the second time, it finds a timestamp file, so it can compare the verification timestamp of the module with the time when the build started. If the verification timestamp is too old, the module is verified again, and the timestamp file is updated. llvm-svn: 201224
* [ARM] Fix NEON wrongly being enabled with soft-float when targeting ↵Amara Emerson2014-02-121-1/+4
| | | | | | | | armv8/Cortex-A53/A57. This was caused by r200708 which enabled the crypto feature for these cores. llvm-svn: 201223
* Fix memory leak introduced by r201010.Daniel Jasper2014-02-121-0/+1
| | | | llvm-svn: 201220
* Fix r201205's use-after-free bug caught by sanitizer botJonathan Roelofs2014-02-121-8/+6
| | | | llvm-svn: 201209
* Add Multilib selection machineryJonathan Roelofs2014-02-127-246/+795
| | | | | | | | | | | | This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. This reverts r201203 (i.e. re-applying r201202 with small fixes in unittests/CMakeLists.txtto make the build bots happy). review: http://llvm-reviews.chandlerc.com/D2538 llvm-svn: 201205
* Revert 201202Jonathan Roelofs2014-02-127-795/+246
| | | | | | Breaks cmake configure of new unit tests directory llvm-svn: 201203
* Add Multilib selection machineryJonathan Roelofs2014-02-127-246/+795
| | | | | | | | | This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. review: http://llvm-reviews.chandlerc.com/D2538 llvm-svn: 201202
* MS ABI: vptr injection should obey alignment requirementsDavid Majnemer2014-02-121-8/+20
| | | | | | | | | | | | | vptr injection must inject padding equivalent to the alignment of the most aligned non-virtual subobject, not the alignment of the enclosing record. To fascilitate this change, don't let record layout observe the alignment of the record until we've injected our vptrs. Also, do not allow the alignment of vbases to affect required alignment until just before we insert the vtordisp field. llvm-svn: 201199
* Expose the name of the checker producing each diagnostic message.Alexander Kornienko2014-02-1163-438/+567
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In clang-tidy we'd like to know the name of the checker producing each diagnostic message. PathDiagnostic has BugType and Category fields, which are both arbitrary human-readable strings, but we need to know the exact name of the checker in the form that can be used in the CheckersControlList option to enable/disable the specific checker. This patch adds the CheckName field to the CheckerBase class, and sets it in the CheckerManager::registerChecker() method, which gets them from the CheckerRegistry. Checkers that implement multiple checks have to store the names of each check in the respective registerXXXChecker method. Reviewers: jordan_rose, krememek Reviewed By: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2557 llvm-svn: 201186
* MS ABI: Add support for the -vm{b,g,s,m,v} flagsDavid Majnemer2014-02-116-15/+65
| | | | | | | | | These flags control the inheritance model initially used by the translation unit. Differential Revision: http://llvm-reviews.chandlerc.com/D2741 llvm-svn: 201175
* Test commit -- Remove an extra newline from Toolchains.cppJonathan Roelofs2014-02-111-1/+0
| | | | llvm-svn: 201172
* [Sema] Revert the change in r200622 that allowed integer casts to silence ↵Argyrios Kyrtzidis2014-02-111-3/+0
| | | | | | | | | | -Wnon-literal-null-conversion in C code. It is actually useful to warn in such cases, thanks to Dmitri for pushing on this and making us see the light! Related to rdar://15925483 and rdar://15922612. The latter radar is where the usefulness of the warning is most clear. llvm-svn: 201165
* 'nonnull(1)' on a block parameter should apply to the block's argument.Jordan Rose2014-02-111-17/+21
| | | | | | | | | | | | | | | Thanks to r199467, __attribute__((nonnull)) (without arguments) can apply directly to parameters, instead of being applied to the whole function. However, the old form of nonnull (with an argument index) could also apply to the arguments of function and block pointers, and both of these can be passed as parameters. Now, if 'nonnull' with an argument is found on a parameter, /and/ the parameter is a function or block pointer, it is handled the old way. PR18795 llvm-svn: 201162
* Rename some PCH-related errors to have 'err_' as their prefixDmitri Gribenko2014-02-111-4/+4
| | | | llvm-svn: 201157
* AArch64: share slgihtly more NEON implementation with ARM.Tim Northover2014-02-111-14/+10
| | | | | | | | The s64/u64 vcvt conversion operations are actually pretty much identical to the s32/u32 ones in implementation, and can be shared with just one extra variable. llvm-svn: 201145
* XCore target: add section information.Robert Lytton2014-02-111-0/+6
| | | | | | | | Xcore target ABI requires const data that is externally visible to be handled differently if it has C-language linkage rather than C++ language linkage. llvm-svn: 201142
* XCore target: Pass through "-fverbose-asm" flag to xcc assembler.Robert Lytton2014-02-111-0/+3
| | | | llvm-svn: 201141
* clang-format: Support lambdas with namespace-qualified return types.Daniel Jasper2014-02-111-0/+1
| | | | | | | E.g.: Foo([]()->std::vector<int> { return { 2 }; }()); llvm-svn: 201139
* clang-format: Fix alignment of comments inside statements.Daniel Jasper2014-02-112-25/+32
| | | | | | | | | | | | | | Before: auto result = SomeObject // Calling someFunction on SomeObject .someFunction(); After: auto result = SomeObject // Calling someFunction on SomeObject .someFunction(); llvm-svn: 201138
* AAPCS: Do not split structs after CPRC allocated on stackOliver Stannard2014-02-111-43/+130
| | | | | | | | | | According to the AAPCS, we can split structs between GPRs and the stack, except for when an argument has already been allocated on the stack. This can occur when a large number of floating-point arguments fill up the VFP registers, and are alllocated on the stack before the general-purpose argument registers are full. llvm-svn: 201137
* Fix PCH deserialization bug with local static symbols being treated as local ↵Ted Kremenek2014-02-111-1/+1
| | | | | | | | | | | | | extern. This triggered a miscompilation of code using Boost's function_template.hpp when it was included inside a PCH file. A local static within that header would be treated as local extern, resulting in the wrong mangling. This only occurred during PCH deserialization. Fixes <rdar://problem/15975816> and <rdar://problem/15926311>. llvm-svn: 201130
* [analyzer] Inline C++ operator new when c++-inline-allocators is turned on.Jordan Rose2014-02-115-5/+52
| | | | | | | | | This will let us stage in the modeling of operator new. The -analyzer-config opton 'c++-inline-allocators' is currently off by default. Patch by Karthik Bhat! llvm-svn: 201122
* [stackprotector] Add command line option -fstack-protector-strongJosh Magee2014-02-114-4/+13
| | | | | | | | | | This option has the following effects: * It adds the sspstrong IR attribute to each function within the CU. * It defines the macro __SSP_STRONG__ with the value of 2. Differential Revision: http://llvm-reviews.chandlerc.com/D2717 llvm-svn: 201120
* MS ABI: Add support for #pragma pointers_to_membersDavid Majnemer2014-02-1011-19/+183
| | | | | | | | | | | | | | | | | | | Introduce a notion of a 'current representation method' for pointers-to-members. When starting out, this is set to 'best case' (representation method is chosen by examining the class, selecting the smallest representation that would work given the class definition or lack thereof). This pragma allows the translation unit to dictate exactly what representation to use, similar to how the inheritance model keywords operate. N.B. PCH support is forthcoming. Differential Revision: http://llvm-reviews.chandlerc.com/D2723 llvm-svn: 201105
* Basic: Clean up malformed pragma diagnosticsDavid Majnemer2014-02-102-2/+2
| | | | | | | Create a new diagnostic, -Wignored-pragmas and use it to handle any case where a pragma would have a side effect but is ignored. llvm-svn: 201102
* Sema: Remove useless MSStructPragmaOn update in Sema::~SemaDavid Majnemer2014-02-101-1/+0
| | | | | | No functional change, this code was just superfluous. llvm-svn: 201099
* ARM: move vshll NEON implementation to common codeTim Northover2014-02-101-13/+10
| | | | | | | Now that both ARM backends use the same implementation for vshll operations, the code can be shared. This is also a necessary LLVM/Clang interface update. llvm-svn: 201094
* ARM: implement vshrn NEON intrinsic in terms of shr/truncTim Northover2014-02-101-13/+10
| | | | | | | Now the backend supports the natural LLVM IR, we can shamelessly steal the AArch64 front-end code to implement the vshrn intrinsic on 32-bit ARM. llvm-svn: 201086
* ASTUnit: simplify remapping files by using the exact same logic in PreprocessorDmitri Gribenko2014-02-101-16/+4
| | | | llvm-svn: 201082
* PR18685: Ignore class template specializations as potentialKaelyn Uhrain2014-02-091-0/+7
| | | | | | | nested-name-specifiers for typos unless the typo already has a nested-name-specifier that is a template specialization. llvm-svn: 201056
* Clarify comment. Remove braces from single-statement block.David Blaikie2014-02-091-4/+4
| | | | llvm-svn: 201040
* Improve diagnostic for using non-class/namespace/scoped enum in a nested ↵David Blaikie2014-02-091-14/+17
| | | | | | | | | | | | | | | name specifier. Rather than simply saying "X is not a class or namespace", clarify what X is by providing the aka type in the case where X is a type, or pointing to the named declaration if there's an unambiguous one to refer to. In the ambiguous case, the ambiguities are already enumerated (though could be clarified by describing what kind of entities they are) Included a few FIXMEs in tests where some further improvements could be made. llvm-svn: 201038
* Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__David Majnemer2014-02-091-0/+3
| | | | | | | | | | TargetInfo::getSuitableAlign() was introduced in r146762 and is defined as alignof(std::max_align_t). Introduce __ALIGNOF_MAX_ALIGN_T__ which exposes getSuitableAlign() so that libc++ may take advantage of it. llvm-svn: 201037
* PR16519, PR18009: When checking a partial specialization for uses of its ownRichard Smith2014-02-091-31/+94
| | | | | | | | | | template parameters, don't look for parameters of outer templates. If a problem is found in a default template argument, point the diagnostic at the partial specialization (with a note pointing at the default argument) instead of pointing it at the default argument and leaving it unclear which partial specialization os problematic. llvm-svn: 201031
* type_info objects are not unnamed_addr: the ABI requires us toJohn McCall2014-02-081-8/+15
| | | | | | | | | | unique them and permits the implementation of dynamic_cast (and anything else which knows it's working with a complete class type) to compare their addresses directly. rdar://16005328 llvm-svn: 201020
* Move the -fms-compatibility using decl check after real access checkingReid Kleckner2014-02-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This avoids false positives from -Wmicrosoft when name lookup would normally succeed in standard C++. This triggered on a common CRTP pattern in clang, where a derived class would have a private using decl to pull in members of a dependent base: class Verifier : InstVisitor<Verifier> { private: using InstVisitor<Verifier>::visit; ... void anything() { visit(); // warned here } }; Real access checks pass here because we're in the context of the Verifier, but the -Wmicrosoft extension was just looking for the private access specifier. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2679 llvm-svn: 201019
* PR18581: Attempt to complete the type in a VLA declaration before checkingRichard Smith2014-02-081-0/+1
| | | | | | whether it's POD. llvm-svn: 201018
* MS ABI: Use the most recent decl to check the inheritance modelReid Kleckner2014-02-081-3/+4
| | | | | | This was crashing compilation of DeclContext::buildLookupImpl<>. llvm-svn: 201013
* Fix lifetime issue causing buildbot failures.Richard Smith2014-02-081-2/+2
| | | | llvm-svn: 201012
* Remove the -fhidden-weak-vtables -cc1 option. It was dead,John McCall2014-02-088-154/+19
| | | | | | gross, and increasingly replaced through other mechanisms. llvm-svn: 201011
* ASTUnit: remove dead code in remapping filesDmitri Gribenko2014-02-081-73/+22
| | | | | | | ASTUnit contains code to remap files to other files on disk. This code is not used. We only remap files to MemoryBuffers. llvm-svn: 201010
* [analyzer] Objective-C object literals are always non-nil.Jordan Rose2014-02-081-4/+26
| | | | | | <rdar://problem/15999214> llvm-svn: 201007
* PR16638, DR1552: the exception specification on an implicitly-declaredRichard Smith2014-02-071-3/+6
| | | | | | | | | | | 'operator delete' or 'operator delete[]' is an explicit exception specification. Therefore we should diagnose 'void operator delete(void*)' instead of 'void operator delete(void*) noexcept'. This diagnostic remains an ExtWarn, since in practice people don't always include the exception specification in such a declaration. llvm-svn: 201002
* Fold together two repeated identical 'if's.Richard Smith2014-02-071-7/+5
| | | | llvm-svn: 201000
* Objective-C. Revert patch r193003 for furtherFariborz Jahanian2014-02-071-21/+0
| | | | | | internal discussions. // rdar://16006401 llvm-svn: 200986
* [analyzer] Just silence all warnings coming out of std::basic_string.Jordan Rose2014-02-071-11/+4
| | | | | | | | | This means always walking the whole call stack for the end path node, but we'll assume that's always fairly tractable. <rdar://problem/15952973> llvm-svn: 200980
OpenPOWER on IntegriCloud