summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Sema: Taking the address of a dtor is illegal per C++ [class.dtor]p2.Benjamin Kramer2013-10-101-0/+4
| | | | | | Emit a proper error instead of crashing in CodeGen. PR16892. llvm-svn: 192345
* [Mips] Support FSF Mips toolchain directories tree in the Clang driver.Simon Atanasyan2013-10-102-25/+134
| | | | | | | The patch reviewed by Rafael Espindola. http://llvm-reviews.chandlerc.com/D1843 llvm-svn: 192343
* Fix getIntegerTypeOrder() to properly handle enums by first unwrapping their ↵Ted Kremenek2013-10-101-0/+15
| | | | | | | | | | | | underlying integer type. This is a precondition for calling getIntegerRank(). Fixes an assertion failure in a test case involving vectors. Fixes <rdar://problem/15091442> Please somebody check this. llvm-svn: 192334
* Use KEY_WOW64_32KEY when reading the registry in WindowsToolChain.cpp (PR17033)Hans Wennborg2013-10-091-3/+6
| | | | | | | | This exposes a 32-bit view of the registry even when Clang is built as a 64-bit program. Since Visual Studio is a 32-bit application, this is necessary for us to find it. llvm-svn: 192331
* Refine string literal concatenation warning within an NSArray literal to not ↵Ted Kremenek2013-10-091-4/+18
| | | | | | warn when the literal comes from a macro expansion. Fixes <rdar://problem/15147688>. llvm-svn: 192328
* This patch addresses a problem encountered by theSean Callanan2013-10-091-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASTImporter when importing the following types: typedef struct { } A; typedef struct { A a; } B; Suppose we have imported B, but we did not at that time need to complete it. Then later we want to import A. The struct is anonymous, so the first thing we want to do is make sure no other anonymous struct already matches it. So we set up an StructuralEquivalenceContext and compare B with A. This happens at ASTImporter.cpp:2179. Now, in this scenario, B is not complete. So we go and import its fields, including a, which causes A to be imported. The ASTImporter doesn’t yet have A in its list of already-imported things, so we import A. After the StructuralEquivalenceContext is finished determining that A and B are different, the ASTImporter concludes that A must be imported because no equivalent exists, so it imports a second copy of A. Now we have two different structs representing A. This is really bad news. The patch allows the StructuralEquivalenceContext to use the original version of B when making its comparison, obviating the need for an import and cutting this loop. llvm-svn: 192324
* ObjectiveC migrator. Introduce a new objcmt-atomic-property optionFariborz Jahanian2013-10-092-4/+12
| | | | | | | and use it to infer all properties as 'atomic'. // rdar://14988132 llvm-svn: 192317
* Consumed analysis: improve loop handling. The prior version of the analysisDeLesley Hutchins2013-10-092-36/+146
| | | | | | | | | | | | marked all variables as "unknown" at the start of a loop. The new version keeps the initial state of variables unchanged, but issues a warning if the state at the end of the loop is different from the state at the beginning. This patch will eventually be replaced with a more precise analysis. Initial patch by chris.wailes@gmail.com. Reviewed and edited by delesley@google.com. llvm-svn: 192314
* Revert commit r192299 until find a way to account for simlinks in OS X.Ariel J. Bernal2013-10-091-10/+4
| | | | llvm-svn: 192313
* Initialize vtorDisp in class constructors and destructorsTimur Iskhodzhanov2013-10-093-0/+67
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D1867 llvm-svn: 192312
* Tighten diagnostics for calling conventions on variadic functionsHans Wennborg2013-10-091-12/+16
| | | | | | | | | | | | Follow-up from r192240. This makes it an error to use callee-cleanup conventions on variadic functions, except for __fastcall and __stdcall, which we ignore with a warning for GCC and MSVC compatibility. Differential Revision: http://llvm-reviews.chandlerc.com/D1870 llvm-svn: 192308
* ObjectiveC migrator. Introduce a new print policy forFariborz Jahanian2013-10-092-1/+3
| | | | | | | suppression of strong lifetime qualifiers when inferring property. // rdar://15082812 llvm-svn: 192305
* Use aliases for more constructors and destructors.Rafael Espindola2013-10-091-21/+6
| | | | | | | | | | | | | | | | With this patch we produce alias for cases like template<typename T> struct foobar { foobar() { } }; template struct foobar<void>; It is safe to use aliases to weak symbols, as long and the alias itself is also weak. llvm-svn: 192300
* This patch fixes replacements that are not applied when relative paths areAriel J. Bernal2013-10-091-7/+12
| | | | | | | | | | specified. In particular it makes sure that relative paths for non-virtual files aren't made absolute. Added unittest test. llvm-svn: 192299
* clang-format: Fix template declaration line breaking with comment.Daniel Jasper2013-10-091-1/+2
| | | | | | | | | Before, clang-format would always insert a linebreak before the comment in code like: template <typename T> // T can be A, B or C. struct S {}; llvm-svn: 192297
* [Mips] Group MIPS-related options checking function in one place.Simon Atanasyan2013-10-091-8/+8
| | | | llvm-svn: 192293
* [Mips] Make the isMipsR2Arch() function simpler - remove checking forSimon Atanasyan2013-10-091-7/+2
| | | | | | MIPS-arch. llvm-svn: 192292
* [Mips] Do not check for options from the OPT_mips_CPUs_Group. All theseSimon Atanasyan2013-10-092-30/+4
| | | | | | options are aliases now. llvm-svn: 192290
* Code cleanup: rename VTableContext to ItaniumVTableContext, VTableBuilder to ↵Timur Iskhodzhanov2013-10-095-90/+87
| | | | | | ItaniumVTableBuilder and clang-format code around llvm-svn: 192288
* Reland 192220 "Abstract out parts of thunk emission code, add support for ↵Timur Iskhodzhanov2013-10-097-75/+174
| | | | | | simple thunks when using -cxx-abi microsoft" with relaxed assertions llvm-svn: 192285
* Make wording for certain invalid unary expressions more consistent.David Majnemer2013-10-091-1/+1
| | | | | | | | | | An invalid decltype expression like 'decltype int' gives: error: expected '(' after 'decltype' This makes it so 'sizeof int' gives a similar one: error: expected parentheses around type name in sizeof expression llvm-svn: 192258
* -Wmicrosoft: Don't warn on non-inline pure virtual method definitionsReid Kleckner2013-10-081-1/+1
| | | | | | | | | | | | | | | MSVC and clang with -fms-extensions allow pure virtual methods to be defined inline after the "= 0" tokens. Clang warns on these because it is not standard, but incorrectly warns on out-of-line definitions, which are standard. With this change, clang will only warn on inline definitions of pure virtual methods. Fixes some self-host warnings on out-of-line definitions of pure virtual destructors. llvm-svn: 192244
* [AArch64] Add support for NEON scalar floating-point reciprocal estimate,Chad Rosier2013-10-081-0/+15
| | | | | | reciprocal exponent, and reciprocal square root estimate instructions. llvm-svn: 192243
* Turn error about fastcall variadic function into warning in MS mode (PR12535)Hans Wennborg2013-10-081-1/+5
| | | | | | | | | | MSVC allows this and silently falls back to __cdecl for variadic functions. This patch turns Clang's error into a warning in MS mode and adds a test to make sure we generate correct code. Differential Revision: http://llvm-reviews.chandlerc.com/D1861 llvm-svn: 192240
* ObjectiveC migrator: Add support for inferring Fariborz Jahanian2013-10-081-2/+5
| | | | | | | properties of function pointer type. // rdar://15082812 llvm-svn: 192237
* [AArch64] Add support for NEON scalar signed/unsigned integer to floating-pointChad Rosier2013-10-081-0/+14
| | | | | | convert instructions. llvm-svn: 192232
* ObjectiveC migration. Add support for inferringFariborz Jahanian2013-10-081-14/+52
| | | | | | | | | properties of block pointer types. Also, remove strong lifetime attribute from property type in this migration. This is wip. // rdar://15082818 llvm-svn: 192226
* Revert 192220 as it fails on an assertionTimur Iskhodzhanov2013-10-087-172/+75
| | | | llvm-svn: 192225
* Abstract out parts of thunk emission code, add support for simple thunks ↵Timur Iskhodzhanov2013-10-087-75/+172
| | | | | | | | when using -cxx-abi microsoft Reviewed at http://llvm-reviews.chandlerc.com/D1787 llvm-svn: 192220
* Remove transient code I did not mean to check in.Ted Kremenek2013-10-081-12/+0
| | | | llvm-svn: 192211
* Fixed grammar. Thanks to Jordan Rose.Serge Pavlov2013-10-081-1/+1
| | | | llvm-svn: 192204
* Convert anachronistic use of 'void *' to 'DeclContext *' in Scope that was a ↵Ted Kremenek2013-10-089-35/+39
| | | | | | holdover from the long-dead Action interface. llvm-svn: 192203
* Fix an edge case in the template differ with default arguments.Benjamin Kramer2013-10-081-5/+10
| | | | | | | | In the test case one type is coming from a typedef with no default arg, the other has the default arg. Taking the default arg from the typedef crashes, so always use the real template paramter declaration. PR17510. llvm-svn: 192202
* Add fixits suggesting parenthesis around type name in expressions like sizeof.Serge Pavlov2013-10-081-0/+22
| | | | | | This fixes PR16992 - Fixit missing when "sizeof type" found. llvm-svn: 192200
* clang-format: Improve indentation when deriving from templated classes.Daniel Jasper2013-10-082-3/+4
| | | | | | | | | | | | | | | | | Before: struct aaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< // aaaaaaaaaaaaaaaa> {}; struct aaaaaaaaaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaa> {}; After: struct aaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< // aaaaaaaaaaaaaaaa> {}; struct aaaaaaaaaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaa> {}; llvm-svn: 192187
* Make InstantiatingTemplate depth checks clearerAlp Toker2013-10-085-24/+23
| | | | | | | | | | The bool conversion operator on InstantiatingTemplate never added value and only served to obfuscate the template instantiation routines. This replaces the conversion and its callers with an explicit isInvalid() function to make it clear what's going on at a glance. llvm-svn: 192177
* clang-format: Improve constructor initializer linewrapping.Daniel Jasper2013-10-082-12/+21
| | | | | | | | | Specifically make ConstructorInitializerAllOnOneLineOrOnePerLine work nicely with BreakConstructorInitializersBeforeComma. This fixes llvm.org/PR17395. llvm-svn: 192168
* Fix linkage calculation of auto member functions returning lambdasFaisal Vali2013-10-081-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described by Richard in https://groups.google.com/a/isocpp.org/d/msg/std-discussion/S1kmj0wF5-g/fb6agEYoL2IJ we should allow: template<typename S> struct A { template<typename T> static auto default_lambda() { return [](const T&) { return 42; }; } template<class U = decltype(default_lambda<S>())> U func(U u = default_lambda<S>()) { return u; } }; int run2 = A<double>{}.func()(3.14); int run3 = A<char>{}.func()('a'); This patch allows the code using the same trickery that was used to allow the code in non-member functions at namespace scope. Please see http://llvm-reviews.chandlerc.com/D1844 for richard's approval. llvm-svn: 192166
* [ms-cxxabi] Fix the calling convention for operator new in recordsReid Kleckner2013-10-085-30/+24
| | | | | | | | | | | | | | | | | | Summary: Operator new, new[], delete, and delete[] are all implicitly static when declared inside a record. CXXMethodDecl already knows this, but we need to account for that before we pick the calling convention for the function type. Fixes PR17371. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1761 llvm-svn: 192150
* Sema: Only merge typedef attributes if the previous decl is a typedefJustin Bogner2013-10-081-5/+5
| | | | | | | | | | | | In r186373, we started merging attributes on typedefs, but this causes us to try to merge attributes even if the previous declaration was not a typedef. Only merge the attributes if the previous decl was also a typedef. Fixes rdar://problem/15044218 llvm-svn: 192146
* TBAA: use the same format for scalar TBAA and struct-path aware TBAA.Manman Ren2013-10-083-19/+22
| | | | | | | | | | | | | | | | An updated version of r191586 with bug fix. Struct-path aware TBAA generates tags to specify the access path, while scalar TBAA only generates tags to scalar types. We should not generate a TBAA tag with null being the first field. When a TBAA type node is null, the tag should be null too. Make sure we don't decorate an instruction with a null TBAA tag. Added a testing case for the bug reported by Richard with -relaxed-aliasing and -fsanitizer=thread. llvm-svn: 192145
* Suppress useless -Wshadow warning when using _mm* macros from emmintrin.hTed Kremenek2013-10-071-0/+12
| | | | | | | | | | Fixes <rdar://problem/10679282>. I'm not completely satisfied with this patch. Sprinkling "diagnostic ignored" _Pragmas throughout this file is gross, but I couldn't suppress it for the entire file. llvm-svn: 192143
* Remove -ast-dump-xml.Richard Smith2013-10-076-1090/+0
| | | | llvm-svn: 192131
* ObjectiveC migrator: A typical implementation ofFariborz Jahanian2013-10-071-1/+0
| | | | | | | | 'default' methods in Foundation does not infer 'instancetype' for methods' result type. // rdar://15145218 llvm-svn: 192129
* Add support for WG21 N3599 (literal operator template for strings) as a GNURichard Smith2013-10-073-48/+135
| | | | | | | | | extension. The GCC folks have decided to support this even though the standard committee have not yet approved this feature. Patch by Hristo Venev! llvm-svn: 192128
* ObjectiveC modern rewriter. Rewrite typedefsFariborz Jahanian2013-10-071-0/+15
| | | | | | | declared locally in ObjectiveC containers. // rdar://15143875 llvm-svn: 192127
* Fix objectsize tests after r192117Matt Arsenault2013-10-072-3/+6
| | | | llvm-svn: 192120
* ObjectiveC: Warn when 'readonly' property has explicitFariborz Jahanian2013-10-071-118/+39
| | | | | | | ownership attribute (such as 'copy', 'assign' etc.) // rdar://15131088 llvm-svn: 192115
* [analyzer] ArrayRef-ize BugReporter::EmitBasicReport.Jordan Rose2013-10-078-34/+23
| | | | | | No functionality change. llvm-svn: 192114
* [analyzer] RetainCountChecker: add support for CFAutorelease.Jordan Rose2013-10-071-8/+22
| | | | | | <rdar://problems/13710586&13710643> llvm-svn: 192113
OpenPOWER on IntegriCloud