summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use generic_category from the std namespace.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210736
* Errno should use generic_category.Rafael Espindola2014-06-121-1/+1
| | | | | | Sorry, no testcase, just noticed while trying to remove llvm's system_error.h llvm-svn: 210727
* PR19966: don't crash/assert when __underlying_type is applied to an incompleteRichard Smith2014-06-121-1/+12
| | | | | | | enumeration type. I've also filed a LWG issue pointing out that this should be ill-formed. llvm-svn: 210723
* Don't inherit dllimport to inline move assignment operatorsHans Wennborg2014-06-111-2/+15
| | | | | | | | | | | | | | Current MSVC versions don't have move assignment operators, so we can't rely on them being available in the dll. If we have the definition, we can just use that directly. This breaks pointer equality, but should work fine otherwise. When there is an MSVC version that supports move assignment, we can key this off the -fmsc-ver option. http://reviews.llvm.org/D4105 llvm-svn: 210715
* Don't slice SemaDiagnosticBuilderReid Kleckner2014-06-111-3/+2
| | | | | | | I wasn't able to figure out how to emit this diagnostic from a SFINAE context, so I don't have a test. llvm-svn: 210713
* Fix the VS2012 build.Hans Wennborg2014-06-111-5/+7
| | | | | | It didn't handle the in-class member initializer and compound literal. llvm-svn: 210707
* Objective-C. Accept '__attribute__((__ns_returns_retained__))' Fariborz Jahanian2014-06-111-1/+12
| | | | | | | for function/methods returning block in MRR mode as well. // rdar://17259812 llvm-svn: 210706
* Add missing "non-constant" diagnostic for a member call on a temporary ofRichard Smith2014-06-111-0/+1
| | | | | | non-literal class type. llvm-svn: 210696
* clang-cl: accept the /C option with /P (PR19978)Hans Wennborg2014-06-111-3/+7
| | | | | | (It's also allowed with /EP, but we haven't implemented that option yet.) llvm-svn: 210695
* Objective-C. More tests for both bridging attributes andFariborz Jahanian2014-06-111-1/+1
| | | | | | | a fix to make it work when CFStructs have no definition. // rdar://17238954. llvm-svn: 210690
* Use std::error_code instead of llvm::error_code.Rafael Espindola2014-06-113-18/+18
| | | | | | This is an update for a llvm api change. llvm-svn: 210688
* Add some comments to TypoCorrectionConsumer.Kaelyn Takata2014-06-111-26/+49
| | | | | | | | | | | Also move the constructor for NamespaceSpecifierSet out of line to improve the class' readability. I meant to do these two things while cleaning up the previous TypoCorrectionConsumer changes and have them folded into those changes. No functionality changed. llvm-svn: 210686
* Sink SpecifierInfo into the only class that uses it.Kaelyn Takata2014-06-111-18/+13
| | | | | | | | | | | | | SpecifierInfo is not used outside of NamespaceSpecifierSet except indirectly through NamespaceSpecifierSet's iterator, so clean up the code a bit by moving SpecifierInfo into NamespaceSpecifierSet. Also drop SpecifierInfo's trivial yet verbose constructor since brace initiialization is sufficient in the only two places the constructor was being explicitly called. No functionality changed. llvm-svn: 210672
* Make a couple of helper classes private to TypoCorrectionConsumer.Kaelyn Takata2014-06-111-81/+87
| | | | | | | | | | | The SpecifierInfo and NamespaceSpecifierSet are now only used by TypoCorrectionConsumer, so treat them as the implementation details of TypoCorrectionConsumer that they are. Also make NamespaceSpecifierSet's method names more style guide compliant. No functionality changed. llvm-svn: 210671
* Clean up the TypoCorrectionConsumer's interface a bit.Kaelyn Takata2014-06-111-37/+26
| | | | | | No functionality changed. llvm-svn: 210670
* Move TypoCorrection filtering into the TypoCorrectionConsumer and make it ↵Kaelyn Takata2014-06-111-257/+253
| | | | | | | | | | | | incremental. The only external/visible functional change that fell out of this refactoring is that there was one less case where the typo caching and/or counting didn't work properly. The result is that a test case had to be moved from typo-correction.cpp to typo-correction-pt2.cpp to avoid the hard-coded limit on per file/TU typo correction attempts. llvm-svn: 210669
* Move a few classes to be before TypoCorrectionConsumer.Kaelyn Takata2014-06-111-129/+134
| | | | | | | | | | | This is in preparation for moving TypoCorrection filtering into the TypoCorrectionConsumer, to separate out some of the purely mechanical churn. It also makes some of the method names in NamespaceSpecifierSet be more style guide compliant. No functionality changed. llvm-svn: 210668
* Add loop unroll pragma supportEli Bendersky2014-06-113-56/+92
| | | | | | | | http://reviews.llvm.org/D4089 Patch by Mark Heffernan. llvm-svn: 210667
* Objective-C. Patch to handle bridge attribute warningsFariborz Jahanian2014-06-111-29/+80
| | | | | | | | correctly when both NSAttributedString and NSMutableAttributedString are specified on the same CFStruct via different typedefs. // rdar://17238954 llvm-svn: 210660
* [PPC64LE] Fix vec_sld and vec_vsldoi for little endianBill Schmidt2014-06-111-0/+96
| | | | | | | | | | | | The vec_sld and vec_vsldoi interfaces perform a left-shift on vector arguments for both big and little endian. However, because they rely on the vec_perm interface which is endian-dependent, the permutation vector needs to be reversed for LE to get the proper shift direction. I've added some extra testing for these interfaces for LE in the builtins-ppc-altivec.c. llvm-svn: 210657
* clang-format: Fix pointer/reference detection after decltype.Daniel Jasper2014-06-111-1/+2
| | | | | | | | | | Before: [](const decltype(*a) & value) {} After: [](const decltype(*a)& value) {} llvm-svn: 210643
* MS ABI: Only class templates get complex nullptr pointer-to-member-functionsDavid Majnemer2014-06-111-4/+7
| | | | | | | | | | | r210637 regressed CodeGenCXX/mangle-ms-templates-memptrs.cpp because it did not believe that there is a distinction between class templates and function templates. Sadly, there is. Function templates should behave in a compatible manner with MSVC. llvm-svn: 210642
* MS ABI: Mangle null pointer-to-member-functions compatiblyDavid Majnemer2014-06-111-24/+25
| | | | | | | | | | | | | | | | | | | | | Summary: Previously, we would mangle nullptr pointer-to-member-functions in class templates with a mangling we invented because contemporary versions of MSVC would crash when trying to compile such code. However, VS "14" can successfully compile these sorts of template instantiations. This commit updates our mangling to be compatible with theirs. Reviewers: rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4059 llvm-svn: 210637
* CodeGen: Correct linkage of thread_local for OS XDavid Majnemer2014-06-113-14/+25
| | | | | | | | | | | | | The backing store of thread local variables is internal for OS X and all accesses must go through the thread wrapper. However, individual TUs may have inlined through the thread wrapper. To fix this, give the thread wrapper functions WeakAnyLinkage. This prevents them from getting inlined into call-sites. This fixes PR19989. llvm-svn: 210632
* [AArch64] Add default features for CPUs on AArch64 target.Kevin Qin2014-06-111-0/+20
| | | | | | | | | | For ARM target, we can use CRYPTO and CRC features if we select cortex-a57 by '-mcpu', but for AArch64 target, it doesn't work unless adding with '-mfpu=crypto-neon-fp-armv8'. To keep consistency between front-end and back-end and get end-users more easier to use, we'd better add default feature for CPUs on AArch64 target as well. llvm-svn: 210625
* PR19993: don't assert/crash if a static data member is initialized by '= ↵Richard Smith2014-06-111-2/+2
| | | | | | delete;'. llvm-svn: 210617
* PR19996: don't crash if -Wuninitialized sees a c++1y lambda init-capture.Richard Smith2014-06-111-1/+1
| | | | llvm-svn: 210615
* Allow lookup into dependent bases in more places under -fms-compatibilityReid Kleckner2014-06-111-22/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently allow unqualified lookup for instance methods but not static methods because we can't recover with a semantic 'this->' insertion. ATL headers have static methods that do unqualified lookup into dependent base classes. The pattern looks like: template <typename T> struct Foo : T { static int *getBarFromT() { return Bar; } }; Now we recover as if the user had written: template <typename T> struct Foo : T { static int *getBarFromT() { return Foo::Bar; } }; ... which will eventually look up Bar in T at instantiation time. Now we emit a diagnostic in both cases, and delay lookup in other contexts where 'this' is available and refers to a class with dependent bases. Reviewed by: rsmith Differential Revision: http://reviews.llvm.org/D4079 llvm-svn: 210611
* Teach __alignof__ to look through arrays before performing theRichard Smith2014-06-101-9/+1
| | | | | | | preferred-alignment transformations. Corrects alignof(T[]) to return alignof(T) in all cases, as required by relevant standards. llvm-svn: 210609
* Related to PR19992: when the GNU alignof-expression extension is applied to anRichard Smith2014-06-103-10/+27
| | | | | | | expression of array-of-unknown-bound type, don't try to complete the array bound, and return the alignment of the element type rather than 1. llvm-svn: 210608
* Recover from missing typenames on template args for MSVC compatibilityReid Kleckner2014-06-102-10/+45
| | | | | | | | | | | | | While matching a non-type template argument against a known template type parameter we now modify the AST's TemplateArgumentLoc to assume the user wrote typename. Under -fms-compatibility, we downgrade our diagnostic from an error to an extwarn. Reviewed by: rsmith Differential Revision: http://reviews.llvm.org/D4049 llvm-svn: 210607
* PR19992: alignof is permitted on an array of unknown bound.Richard Smith2014-06-101-19/+16
| | | | llvm-svn: 210585
* Fix crash with x86_64-pc-win32-macho target. <rdar://problem/17235840>Bob Wilson2014-06-101-1/+2
| | | | | | | | The changes in r204978 broke win32-macho targets. There were checks added for MSVC and Itanium environments as special cases, and win32-macho needs to be treated the same way. llvm-svn: 210584
* Remove a redundant conditional when caching typo failures.Kaelyn Takata2014-06-101-6/+5
| | | | | | No functionality change. llvm-svn: 210583
* Do not predefine __EXCEPTIONS in clang-cl (PR19977)Hans Wennborg2014-06-101-1/+1
| | | | | | | | Patch by Ehsan Akhgari! (Test tweak by me.) Differential Revision: http://reviews.llvm.org/D4065 llvm-svn: 210582
* Fix mangling of __uuidof after two levels of template instantiationReid Kleckner2014-06-101-0/+3
| | | | llvm-svn: 210570
* Objective-C. Don't ignore availability attribute whenFariborz Jahanian2014-06-101-1/+4
| | | | | | | doing Objective-C subscript access. // rdar://16842487 PR19682. llvm-svn: 210565
* Don't inherit dll attributes to deleted methods (PR19988)Hans Wennborg2014-06-101-3/+2
| | | | | | | | | | | | | We would previously end up with an error when instantiating the following template: template <typename> struct __declspec(dllimport) S { void foo() = delete; }; S<int> s; error: attribute 'dllimport' cannot be applied to a deleted function llvm-svn: 210550
* Objective-C IRGen. Patch to generate a weak symbol reference whenFariborz Jahanian2014-06-101-4/+7
| | | | | | | | 'super' dispatches a class method in category for OBJC_METACLASS. This is when class is a weak_import class. // rdar://16529125 llvm-svn: 210547
* clang-format: [JS] Treat dict literals similar to objc method exprs.Daniel Jasper2014-06-103-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: return { link: function() { f(); // } }; return { a: a, link: function() { f(); // } } After: return { link: function() { f(); // } }; return { a: a, link: function() { f(); // } }; llvm-svn: 210537
* clang-format: Increase penalty for wrapping array subscript expressionsDaniel Jasper2014-06-101-1/+1
| | | | | | | | | | | | | Before: aaaaaaaaaaa aaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaa[0].aaaaaaa [0].aaaaaaaaaaaaaaaaaaaaaa(); After: aaaaaaaaaaa aaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaa[0] .aaaaaaa[0] .aaaaaaaaaaaaaaaaaaaaaa(); llvm-svn: 210529
* clang-format: Fix enum formatting with specific comment.Daniel Jasper2014-06-101-1/+3
| | | | | | | | | | | | | | | Before: enum Fruit { // APPLE, PEAR }; After: enum Fruit { // APPLE, PEAR }; llvm-svn: 210522
* Improve diagnostic mapping terminologyAlp Toker2014-06-107-65/+65
| | | | | | | | | | | | Diagnostic mappings are used to calculate the final severity of diagnostic instances. Detangle the implementation to reflect the terminology used in documentation and bindings. No change in functionality. llvm-svn: 210518
* clang-format: Support variadic lambda captures.Daniel Jasper2014-06-101-0/+2
| | | | | | | | | | Before: return [ i, args... ]{}; After: return [i, args...] {}; llvm-svn: 210514
* clang-format: Handle multiline strings inside ternary expressions.Daniel Jasper2014-06-101-1/+2
| | | | | | | With AlwaysSplitBeforeMultilineStrings, clang-format would not find any valid solution. llvm-svn: 210513
* Show -Wdate-time in system headersAlp Toker2014-06-101-13/+6
| | | | | | | | | | Anyone enabling this warning would expect to hear about all occurrences including those in system headers that can cause non-reproducible builds. To achieve this, rework ShowInSystemHeader to remove broken unused mapping code that didn't make sense with a simpler and correct scheme. llvm-svn: 210512
* Implement -Wdate-time preprocessor warningAlp Toker2014-06-101-1/+4
| | | | | | | This GCC warning is useful for validating reproducible builds and might help when tracking down issues with modules too. llvm-svn: 210511
* Improve checking for dynamic initializers of dllimport fields in template ↵Hans Wennborg2014-06-101-8/+8
| | | | | | | | | instantiation We would previously assert if the initializer was dependent. I also think that checking isConstantInitializer is more correct here than checkInitIsICE. llvm-svn: 210505
* Reduce indentation in ActOnIdExpression, NFCReid Kleckner2014-06-091-51/+48
| | | | llvm-svn: 210499
* Removing an "if (this == nullptr)" check from two print methods. The conditionRichard Trieu2014-06-0914-20/+51
| | | | | | | will never be true in a well-defined context. The checking for null pointers has been moved into the caller logic so it does not rely on undefined behavior. llvm-svn: 210498
OpenPOWER on IntegriCloud