summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix leak from r210059Alp Toker2014-06-034-4/+11
| | | | | | | Also revert r210096 which temporarily disabled the test while this was being investigated. llvm-svn: 210115
* Use IntrusiveRefCntPtr's == and != nullptr operators.Rafael Espindola2014-06-031-8/+8
| | | | | | This is a partial revert of r210075. llvm-svn: 210101
* clang-format: Refactor indentation behavior for multiple nested blocks.Daniel Jasper2014-06-035-33/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a few oddities when formatting multiple nested JavaScript blocks, e.g.: Before: promise.then( function success() { doFoo(); doBar(); }, [], function error() { doFoo(); doBaz(); }); promise.then([], function success() { doFoo(); doBar(); }, function error() { doFoo(); doBaz(); }); After: promise.then( function success() { doFoo(); doBar(); }, [], function error() { doFoo(); doBaz(); }); promise.then([], function success() { doFoo(); doBar(); }, function error() { doFoo(); doBaz(); }); llvm-svn: 210097
* temporary disable part of a test because it causes clang to leak memory ↵Kostya Serebryany2014-06-031-2/+3
| | | | | | (want to have the sanitizer bot green) llvm-svn: 210096
* [OPENMP] Loop canonical form analysis (Sema)Alexander Musman2014-06-0311-25/+1170
| | | | | | | | | This patch implements semantic analysis to make sure that the loop is in OpenMP canonical form. This is the form required for 'omp simd', 'omp for' and other loop pragmas. Differential revision: http://reviews.llvm.org/D3778 llvm-svn: 210095
* Remove incorrect assertion.Richard Smith2014-06-032-4/+10
| | | | llvm-svn: 210092
* Implement DR990 and DR1070. Aggregate initialization initializes uninitializedRichard Smith2014-06-0311-96/+244
| | | | | | | | | elements from {}, rather than value-initializing them. This permits calling an initializer-list constructor or constructing a std::initializer_list object. (It would also permit initializing a const reference or rvalue reference if that weren't explicitly prohibited by other rules.) llvm-svn: 210091
* Teach AST dumper to dump the array filler in an initializer list.Richard Smith2014-06-031-0/+17
| | | | llvm-svn: 210090
* PR11410: Extend diagnostic to cover all cases of aggregate initialization, notRichard Smith2014-06-035-15/+39
| | | | | | | | | | just the extremely specific case of a trailing array element that couldn't be initialized because the default constructor for the element type is deleted. Also reword the diagnostic to better match our other context diagnostics and to prepare for the implementation of core issue 1070. llvm-svn: 210083
* List DR532 as implemented on the defect report status page by renaming the ↵Nikola Smiljanic2014-06-031-2/+2
| | | | | | namespace. llvm-svn: 210080
* When emitting a multidimensional array new, emit the initializers for theRichard Smith2014-06-034-156/+260
| | | | | | | | | trailing elements as a single loop, rather than sometimes emitting a nest of several loops. This fixes a bug where CodeGen would sometimes try to emit an expression with the wrong type for the element being initialized. Plus various other minor cleanups to the IR produced for array new initialization. llvm-svn: 210079
* Don't assume an implicit IntrusiveRefCntPtr -> bool operator.Rafael Espindola2014-06-032-9/+9
| | | | llvm-svn: 210075
* Move DR532 test where it belongs.Nikola Smiljanic2014-06-032-16/+16
| | | | llvm-svn: 210064
* Update for llvm API change.Rafael Espindola2014-06-0310-65/+71
| | | | | | Aliases in llvm now hold an arbitrary expression. llvm-svn: 210063
* Fix -emit-codegen-only to not generate binariesAlp Toker2014-06-032-0/+8
| | | | llvm-svn: 210059
* Eliminate redundant MangleBuffer classAlp Toker2014-06-035-43/+13
| | | | | | | | | The only remaining user didn't actually use the non-dynamic storage facility this class provides. The std::string is transitional and likely to be StringRefized shortly. llvm-svn: 210058
* Itanium ABI: Update getAddrOfVTable to set the DLL storage class for vtablesHans Wennborg2014-06-023-5/+26
| | | | | | | | This corresponds to the same change for the MS ABI in r209908. Differential Revision: http://reviews.llvm.org/D3993 llvm-svn: 210054
* allow optional signext attributeWill Schmidt2014-06-023-10/+10
| | | | | | | Allow the tests to succeed with tne signext (or other) attribute is present. The attributes show up for Power, but not for x86*, so need to be appropriately wildcarded. llvm-svn: 210050
* Delete apparently unused methodAlexey Samsonov2014-06-022-29/+0
| | | | llvm-svn: 210047
* [CodeGen] Don't use SizeTy for EmitNeonSplat.Michael J. Spencer2014-06-021-1/+1
| | | | llvm-svn: 210042
* Remove unused variableAlexey Samsonov2014-06-021-2/+0
| | | | llvm-svn: 210041
* Fix comment vs function name mismatchHans Wennborg2014-06-021-1/+1
| | | | llvm-svn: 210039
* Remove sanitizer blacklist from ASan/TSan/MSan function passes.Alexey Samsonov2014-06-021-9/+5
| | | | | | | | | | | | | | | | | Instrumentation passes now use attributes address_safety/thread_safety/memory_safety which are added by Clang frontend. Clang parses the blacklist file and adds the attributes accordingly. Currently blacklist is still used in ASan module pass to disable instrumentation for certain global variables. We should fix this as well by collecting the set of globals we're going to instrument in Clang and passing it to ASan in metadata (as we already do for dynamically-initialized globals and init-order checking). This change also removes -tsan-blacklist and -msan-blacklist LLVM commandline flags in favor of -fsanitize-blacklist= Clang flag. llvm-svn: 210037
* CGDebugInfo: Simplify/invert createLexicalBlock parameter construction.David Blaikie2014-06-021-8/+5
| | | | llvm-svn: 210033
* The exception-declaration for a function-try-block cannot redeclare aAaron Ballman2014-06-023-8/+22
| | | | | | | function parameter. One of our existing test cases was XFAILed because of this. This fixes the issue and un-XFAILs the test. llvm-svn: 210026
* clang-format: Fix special case of binary operator detection.Daniel Jasper2014-06-022-0/+7
| | | | | | | | | | | | | | | | | There is a pattern where evaluation order is used as control flow. This patch special-cases a commonly occuring version of this pattern. Before: Aaaaa *aaa = nullptr; // ... aaa &&aaa->f(); After: Aaaaa *aaa = nullptr; // ... aaa && aaa->f(); llvm-svn: 210017
* clang-format: No space between ")" and braced init list.Daniel Jasper2014-06-022-5/+7
| | | | | | | | | | | | Before: auto j = decltype(i) {}; After: auto j = decltype(i){}; This fixes llvm.org/PR19892. llvm-svn: 210013
* clang-format: Fix Allman brace breaking of enums.Daniel Jasper2014-06-022-4/+14
| | | | | | | | | | | | | | | | | | Before: enum Side { LEFT, RIGHT }; After: enum Side { LEFT, RIGHT }; This fixes llvm.org/PR19911. llvm-svn: 210011
* clang-format: Fix trailing const (etc.) with Allman brace style.Daniel Jasper2014-06-022-2/+9
| | | | | | | | | | | | | | | | | | Before: void someLongFunction(int someLongParameter) const { } After: void someLongFunction( int someLongParameter) const { } This fixes llvm.org/PR19912. llvm-svn: 210010
* Revert "Fix the undefined-but-used odr-use marker (DR48)"Alp Toker2014-06-013-9/+15
| | | | | | | | Wrong patch got committed (this one isn't ready for prime time). This reverts commit r209996. llvm-svn: 209997
* Fix the undefined-but-used odr-use marker (DR48)Alp Toker2014-06-013-15/+9
| | | | | | | | | | | | | We should treat tentative definitions as undefined for the purpose of ODR-use linkage checking. This broke somewhere around r149731 when tests were disabled. Note that test coverage for these diagnostics is generally lacking due to a separate issue (PR19910: Don't suppress unused/undefined warnings when there are errors). llvm-svn: 209996
* Don't compare an error_code with nullptr.Rafael Espindola2014-06-011-1/+1
| | | | llvm-svn: 209993
* Fix PR18498: Support explicit template arguments with variadic generic lambdasFaisal Vali2014-06-012-1/+111
| | | | | | | | | | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=18498 This code was resulting in a crash: auto L = [](auto ... v) { }; L.operator()<int>(3); The reason is that the partially-substituted-pack is incorrectly retained within the current-instantiation-scope during template-argument-finalization, and because lambda's are local, there parent instantiation scopes are merged, which leads to the expansion-pattern being retained in the finalized specialization. This patch ensures that once we have finalized deduction of a parameter-pack, we remove the partially-substituted-pack so that it doesn't cause CheckParameterPacksForExpansion to incorrectly inform the caller that it needs to retain the expansion pattern. Thanks to Richard Smith for the review! http://reviews.llvm.org/D2135 llvm-svn: 209992
* Test fixes and improvements.Rafael Espindola2014-06-011-6/+3
| | | | | | | | | Remove redundant -fno-stack-protector run with openbsd. Add -target to the -fstack-protector tests so they pass on openbsd. Patch by Brad Smith. llvm-svn: 209991
* Don't add examples to the check-clang dependencies unless requestedAlp Toker2014-06-011-3/+9
| | | | | | | The tests were correctly getting skipped but the targets still mistakenly got built. llvm-svn: 209983
* Preprocessor: make C++ operator names as macro identifiers a compatible ↵Alp Toker2014-05-314-6/+13
| | | | | | | | | | | extension With recent changes, this is now a compatible language extension and can be safely enabled with -ms-extensions instead of requiring the full -ms-compatibility MSVC drop-in mode. As such we can now also emit an extension warning under -Wmicrosoft to help users port their code. llvm-svn: 209978
* Fix test on platforms where size_t is not 'unsigned long'.Benjamin Kramer2014-05-311-1/+1
| | | | llvm-svn: 209974
* Support C++11 scoped enums in NamedDecl::isCXXClassMember()Alp Toker2014-05-311-2/+1
| | | | | | | | | Resolves an old FIXME. No callers depend on this giving the right answer so I haven't been able to cook up a useful test case. llvm-svn: 209970
* Rename utility function templatesAlp Toker2014-05-311-6/+6
| | | | | | | isExternCTemplate() and getLanguageLinkageTemplate() have nothing to do with templates despite the dubious naming scheme. llvm-svn: 209969
* Format strings: check against an enum's underlying type.Jordan Rose2014-05-316-33/+91
| | | | | | | | | | | | | This allows us to be more careful when dealing with enums whose fixed underlying type requires special handling in a format string, like NSInteger. A refinement of r163266 from a year and a half ago, which added the special handling for NSInteger and friends in the first place. <rdar://problem/16616623> llvm-svn: 209966
* AST Dump: print the Inherited flag on attributesHans Wennborg2014-05-312-2/+10
| | | | | | | | | Also move the attribute-specific dumping to after dumping this and the Implicit flag. Differential Revision: http://reviews.llvm.org/D3971 llvm-svn: 209965
* Preprocessor: recover gracefully when C++ operator names are used as macro ↵Alp Toker2014-05-313-6/+16
| | | | | | | | | | identifiers This failure mode shows up occasionally when users try to include C headers in C++ projects or when porting from Windows. We might as well recover in the way the user expected, thus avoiding confusing diagnostic messages at point of use. llvm-svn: 209963
* Preprocessor: don't exit early in CheckMacroName()Alp Toker2014-05-312-11/+8
| | | | | | | | | | The checks below can hypothetically apply to converted operator name identifiers. In practice there are no builtin macros etc. with those names so there's no behavioural change to test. llvm-svn: 209962
* There is no std::errc:success, remove the llvm one.Rafael Espindola2014-05-315-57/+55
| | | | llvm-svn: 209959
* Use make_error_code in preparation for making errc an enum class.Rafael Espindola2014-05-312-9/+9
| | | | llvm-svn: 209956
* PR12961 - Extend DR532 to cover C++98/03.Nikola Smiljanic2014-05-313-82/+46
| | | | llvm-svn: 209955
* Diagnose dll attribute on member of class that already has a dll attributeHans Wennborg2014-05-313-9/+42
| | | | | | Differential Revision: http://reviews.llvm.org/D3973 llvm-svn: 209954
* Make Attr::Clone() also clone the Inherited, IsPackExpansion and Implicit flagsHans Wennborg2014-05-311-2/+6
| | | | | | | | | | I was bitten by this when working with the dll attributes: when a dll attribute was cloned from a class template declaration to its specialization, the Inherited flag didn't get cloned. Differential Revision: http://reviews.llvm.org/D3972 llvm-svn: 209950
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-313-8/+8
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209949
* [CodeGen] Don't cast and use SizeTy instead of Int32Ty when constructing ↵Michael J. Spencer2014-05-314-35/+31
| | | | | | {extract,insert} vector element instructions. llvm-svn: 209942
OpenPOWER on IntegriCloud