summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Append CXXDefaultInitExpr's wrapped expression to the CFG when visiting a ↵Enrico Pertoso2015-06-033-1/+16
| | | | | | | | | | | | | | | | | | | constructor initializer Summary: This patch is part of http://llvm-reviews.chandlerc.com/D2181. In-class initializers are appended to the CFG when CFGBuilder::addInitializer is called. Reviewers: jordan_rose, rsmith Reviewed By: jordan_rose Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D2370 llvm-svn: 238913
* Fix typo in cross-compilation docs: "-fpu" -> "-mfpu"Vladimir Sukharev2015-06-031-1/+1
| | | | | | | | | | Reviewers: rengolin Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10209 llvm-svn: 238912
* clang-format: Properly reset BreakBeforeParameter when wrappingDaniel Jasper2015-06-032-0/+5
| | | | | | | | | | | | | | | | | operators to the new line. Before: LOG_IF(aaa == // bbb) << a << b; After: LOG_IF(aaa == // bbb) << a << b; llvm-svn: 238911
* Fixes a typo in a comment.Enrico Pertoso2015-06-031-1/+1
| | | | llvm-svn: 238910
* clang-format: [JS] More aggressively keep array literals on one line.Daniel Jasper2015-06-032-5/+5
| | | | | | | | | | | | | | Before: var aaaaa: List<SomeThing> = [ new SomeThingAAAAAAAAAAAA(), new SomeThingBBBBBBBBB() ]; After: var aaaaa: List<SomeThing> = [new SomeThingAAAAAAAAAAAA(), new SomeThingBBBBBBBBB()]; llvm-svn: 238909
* clang-format: [JS] Fix bug in type colon detection.Daniel Jasper2015-06-032-1/+11
| | | | | | | | | | | | | Before, this couldn't be formatted at all: class X { subs = { 'b': { 'c': 1, }, }; } llvm-svn: 238907
* Revert "add the -mrecip driver flag and process its options (2nd try)"Rafael Espindola2015-06-036-213/+1
| | | | | | | | This reverts commit r238851. It depends on a llvm commit that was reverted. llvm-svn: 238904
* [Sema] Make the atomic builtins more efficient by reducing volatilityDavid Majnemer2015-06-032-0/+12
| | | | | | | | The parameter types and return type do not need to be volatile just because the pointer type's pointee type is volatile qualified. This is an unnecessary pessimization. llvm-svn: 238892
* Fix typo in tutorial.Douglas Katzman2015-06-021-1/+1
| | | | llvm-svn: 238885
* [MSVC Compatibility] Permit static_cast from void-ptr to function-ptrDavid Majnemer2015-06-023-0/+14
| | | | | | | | | | | The MSVC 2013 and 2015 implementation of std::atomic is specialized for pointer types. The member functions are implemented using a static_cast from void-ptr to function-ptr which is not allowed in the standard. Permit this conversion if -fms-compatibility is present. This fixes PR23733. llvm-svn: 238877
* Correct DriverInternals.rst: ccc-print-options is gone.Douglas Katzman2015-06-021-2/+2
| | | | | | Was removed in svn r189802. llvm-svn: 238876
* clang-format: [JS] Always add space after fat arrow.Daniel Jasper2015-06-022-3/+3
| | | | | | | | | | Before: return () =>[]; After: return () => []; llvm-svn: 238875
* clang-format: [JS] Array literal detection fix #4.Daniel Jasper2015-06-022-1/+7
| | | | llvm-svn: 238873
* [x86-64 ABI] Fix for PR23082: an assertion failure when passing/returning a ↵Andrea Di Biagio2015-06-022-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrapper union in a full YMM register. This patch fixes an assertion failure in method 'X86_64ABIInfo::GetByteVectorType'. Method 'GetByteVectorType' (in TargetInfo.cpp) is responsible for mapping a QualType 'Ty' (for an argument or return value) to an LLVM IR type that, according to the ABI, must be passed in a XMM/YMM vector register. When selecting the IR vector type, method 'GetByteVectorType' always tries to choose the "best" IR vector type for the 'Ty' in input. In particular, if Ty is a wrapper structure, it keeps unwrapping it until it finds a vector type VTy. That VTy is the "preferred IR type". However, function 'isSingleElementStructure' (used to unwrap structures) does not know how to look through union types. So, before this patch, if Ty was in a nest of wrapper structures with at least two union types, we would have triggered an assertion failure (added at revision 230971). With this patch, if method 'GetByteVectorType' fails to find the preferred vector type, we just return a valid (although potentially 'less friendly') vector type based on the type size. So, rather than asserting on an 'unexpected' 'Ty' in input, we conservatively return vector type <2 x double> if Ty is 16 bytes, or <4 x double> if Ty is 32 bytes. Differential Revision: http://reviews.llvm.org/D10190 llvm-svn: 238861
* add missing dependency for CodeGen libSanjay Patel2015-06-021-0/+1
| | | | | | This looks to be exposed on some bots by r238851. llvm-svn: 238855
* add the -mrecip driver flag and process its options (2nd try)Sanjay Patel2015-06-026-1/+213
| | | | | | | | | | | | | | | | | | | The first try to land this (r238055) was reverted due to bot failures caused by the LLVM part of the patch. That was hopefully fixed by r238788, and the LLVM patch was resubmitted at r238842. This is the front-end counterpart to D8982. The -mrecip option interface is based on maintaining compatibility with gcc: https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#index-mrecip_003dopt-1627 https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/RS_002f6000-and-PowerPC-Options.html#index-mrecip-2289 ...while adding more functionality (allowing users to specify the number of refinement steps for each estimate type). Differential Revision: http://reviews.llvm.org/D8989 llvm-svn: 238851
* clang-format: Don't try to detect C++ lambdas in other languages.Daniel Jasper2015-06-022-0/+6
| | | | llvm-svn: 238845
* clang-format: [JS] Fix incorrect line length calculation.Daniel Jasper2015-06-022-2/+4
| | | | llvm-svn: 238841
* clang-format: [JS] Array literal detection fix #3.Daniel Jasper2015-06-022-2/+5
| | | | llvm-svn: 238839
* clang-format: [JS] Fix another regression when detecting array literals.Daniel Jasper2015-06-022-1/+7
| | | | llvm-svn: 238835
* clang-format: [JS] Fix regression of detecting array literals.Daniel Jasper2015-06-022-1/+8
| | | | llvm-svn: 238832
* Make vim also output a helpful message in some error cases.Manuel Klimek2015-06-021-0/+2
| | | | | | | | When clang-format encounters a syntax error, it will not format that line; we're now using the same mechanism we're already using in emacs to show a helpful error message to the user. llvm-svn: 238823
* Remove error message when using the fallback style.Manuel Klimek2015-06-022-3/+0
| | | | llvm-svn: 238822
* [Basic] Transition getEnvironmentVersion from getOSVersion for androidDavid Majnemer2015-06-011-1/+1
| | | | | | | 'android' occupies the environment component of the triple. Let's use getEnvironmentVersion to extract it instead of getOSVersion. llvm-svn: 238797
* Replace a few std::string& with StringRef. NFC.Rafael Espindola2015-06-017-18/+16
| | | | | | Patch by Косов Евгений! llvm-svn: 238774
* Revert "[Hexagon] Test passes for hexagon target now that the backend ↵Rafael Espindola2015-06-011-0/+1
| | | | | | | | | | correctly generates relocations." This reverts commit r238754. It depends on r238748, which was reverted. llvm-svn: 238773
* Fix PR21945: Crash in constant evaluator.Jonathan Roelofs2015-06-012-0/+8
| | | | | | Patch by Косов Евгений! llvm-svn: 238758
* [Hexagon] Test passes for hexagon target now that the backend correctly ↵Colin LeMahieu2015-06-011-1/+0
| | | | | | generates relocations. llvm-svn: 238754
* clang-format: [JS] Making arrow function wrapping more consistent.Daniel Jasper2015-06-013-11/+22
| | | | | | | | | | | | | | | | | | | | | | Before: someFunction(() => { doSomething(); // break }) .doSomethingElse( // break ); After: someFunction(() => { doSomething(); // break }) .doSomethingElse( // break ); This is still bad, but at least it is consistent with what we do for other function literals. Added corresponding tests. llvm-svn: 238736
* [MS ABI] Be a little more defensive wrt vector typesDavid Majnemer2015-06-011-14/+20
| | | | | | | | | We probably shouldn't say that all appropriately sized vector types are intel vector types (i.e. __m128, etc.) as they don't exist for all architectures. While this is largely academic, it'd save some debugging if we supported such a platform. llvm-svn: 238731
* [Format] Move UnwrappedLines instead of copying.Benjamin Kramer2015-05-311-7/+4
| | | | | | No functional change intended. llvm-svn: 238673
* clang-format: NFC. Cleanup after r237895.Daniel Jasper2015-05-312-31/+8
| | | | | | | | | | | Specifically adhere to LLVM Coding Standards (no 'else' after return/break/continue) and remove yet another implementation of paren counting. We already have enough of those in the UnwrappedLineParser. No functional changes intended. llvm-svn: 238672
* clang-format: [JS] Fix line breaks in computed property names.Daniel Jasper2015-05-312-1/+4
| | | | | | | | | | | | | | | | | | | Before: let foo = { [someLongKeyHere]: 1, someOtherLongKeyHere: 2, [keyLongEnoughToWrap]: 3, lastLongKey: 4 }; After: let foo = { [someLongKeyHere]: 1, someOtherLongKeyHere: 2, [keyLongEnoughToWrap]: 3, lastLongKey: 4 }; llvm-svn: 238671
* ubsan: Check for null pointers given to certain builtins, suchNuno Lopes2015-05-304-12/+58
| | | | | | | | | | as memcpy, memset, memmove, and bzero. Reviewed by: Richard Smith Differential Revision: http://reviews.llvm.org/D9673 llvm-svn: 238657
* [CodeGen] Indirect fields can initialize a unionDavid Majnemer2015-05-303-5/+25
| | | | | | | | The first named data member is the field used to default initialize the union. An IndirectFieldDecl can introduce the first named data member of a union. llvm-svn: 238649
* Fix 80-column violations.Eric Christopher2015-05-291-60/+77
| | | | llvm-svn: 238630
* clang/CMakeLists.txt: s/LLVM_INSTALL_PACKAGE_DIR/CLANG_INSTALL_PACKAGE_DIR/ ↵NAKAMURA Takumi2015-05-291-1/+1
| | | | | | for the standalone configuration. llvm-svn: 238628
* [Sema] Promote compound assignment exprs. with fp16 LHS and int. RHS.Ahmed Bougacha2015-05-292-1/+145
| | | | | | | | | | | | | | | | | | | | | | | | We catch most of the various other __fp16 implicit conversions to float, but not this one: __fp16 a; int i; ... a += i; For which we used to generate something 'fun' like: %conv = sitofp i32 %i to float %1 = tail call i16 @llvm.convert.to.fp16.f32(float %conv) %add = add i16 %0, %1 Instead, when we have an __fp16 LHS and an integer RHS, we should use float as the result type. While there, add a bunch of missing tests for mixed __fp16/integer expressions. llvm-svn: 238625
* ARM: fix ACLE predefine for iOS's "-arch armv7s".Tim Northover2015-05-292-0/+2
| | | | | | We were getting "#define __ARM_ARCH_7 -S__ 1" which is really not a good idea. llvm-svn: 238614
* Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial typesBenjamin Kramer2015-05-2930-111/+99
| | | | | | | | | | | | | | | | | | | | If the type isn't trivially moveable emplace can skip a potentially expensive move. It also saves a couple of characters. Call sites were found with the ASTMatcher + some semi-automated cleanup. memberCallExpr( argumentCountIs(1), callee(methodDecl(hasName("push_back"))), on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))), hasArgument(0, bindTemporaryExpr( hasType(recordDecl(hasNonTrivialDestructor())), has(constructExpr()))), unless(isInTemplateInstantiation())) No functional change intended. llvm-svn: 238601
* [CMake] Bug 19462 - Use the INSTALL(EXPORT ...) to export CMake definitionsChris Bieneman2015-05-291-1/+3
| | | | | | | | | | | | | | Summary: This patch moves all the clang library targets into a ClangTargets export list, and installs it using the CMake install(EXPORT...) command. Reviewers: rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7623 llvm-svn: 238593
* [ARM] Adjust -march checkingJohn Brawn2015-05-292-4/+9
| | | | | | | | | | getCanonicalArchName can return an empty string for an architecture that is well-formed but meaningless. Use parseArch to determine if it's actually valid or not. Differential Revision: http://reviews.llvm.org/D10120 llvm-svn: 238553
* Fix assertion on C++ attributes in fillAttributedTypeLocAlexander Musman2015-05-292-8/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this fixes http://llvm.org/PR17424 fillAttributedTypeLoc() function is only called with AttributeLists of either DeclarationChunk (which is used for each type in a declarator being parsed) or DeclSpec (which captures information about declaration specifiers). As C++11 attributes actually appertain to declarators, they are moved straight to the declarator’s attr list in distributeFunctionTypeAttrFromDeclSpec() function. 'Put them wherever you like' semantics is not supported for C++11 attributes (but is allowed for GNU attributes, for example). So when we meet an attribute while parsing the declaration, we cannot be sure if it appertains to either DeclarationChunk or DeclSpec. This investigation correlates with the history of changes of SemaType.cpp: • Asserts in fillAttributedTypeLoc() were added on 3 Mar 2011 in r126986 (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon- 20110228/039638.html); • Distributing C++11 attrs to the declarator was added on 14 Jan 2013 in r172504 (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon- 20130114/071830.html). Considering all written above I changed asserts in fillAttributedTypeLoc() to nullptr checks. This fixes PR17424 and related assertion on [[gnu::fastcall]] void __stdcall foo(); Author: Alexey Frolov Differential Revision: http://reviews.llvm.org/D9288 llvm-svn: 238550
* Refactor MacroInfo so macro arguments can be iterated with range-based for ↵Daniel Marjamaki2015-05-293-9/+7
| | | | | | | | | | loops. No functional change intended. Patch by Sebastian Edman! llvm-svn: 238547
* Run clang-format on MacroInfo.hDaniel Marjamaki2015-05-291-53/+38
| | | | llvm-svn: 238546
* clang-format: [JS] Support ES6 computed property names.Daniel Jasper2015-05-293-0/+9
| | | | | | | | | | | | | | | | Before: var x = { [a]: 1, b: 2 }; After: var x = { [a]: 1, b: 2 }; llvm-svn: 238544
* NFC: tab => spacesJingyue Wu2015-05-291-8/+8
| | | | llvm-svn: 238542
* wip: Remove some unused functionsJustin Bogner2015-05-292-39/+0
| | | | llvm-svn: 238538
* Remove dead code.Richard Smith2015-05-281-2/+1
| | | | llvm-svn: 238526
* AST: Fix printing GNU old-style field designatorsJustin Bogner2015-05-282-2/+16
| | | | | | | | | | | | Allows StmtPrinter to print old style field designators in initializers, fixing an issue where we would print the following invalid code: struct A a = {b: = 3, .c = 4}; Patch by Nick Sumner. Thanks! llvm-svn: 238517
OpenPOWER on IntegriCloud