summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* ASTContext: Refactor implicit record creationAlp Toker2013-12-172-77/+40
| | | | | | | | Tidy up built-in record creation to reduce code duplication. Continuation of r197336. llvm-svn: 197452
* ObjectiveC migrator. Fixes a bug when protocolFariborz Jahanian2013-12-171-1/+3
| | | | | | conformance is inferred. // rdar://15515206 llvm-svn: 197448
* For -Wconsumed, walk the namespaces to find if the top most namespace is "std"Richard Trieu2013-12-171-2/+13
| | | | | | | to determine if a move function is the std::move function. This allows functions like std::__1::move to also be treated a the move function. llvm-svn: 197445
* Reorder these DataLayout entries to match the order LLVM uses.Rafael Espindola2013-12-171-9/+4
| | | | | | | This completes the cleanup/refactoring of DataLayout on the clang side. Next is figuring out the differences between the llvm and clang produced strings llvm-svn: 197442
* clang/lib/Headers/CMakeLists.txt: Revert part of r197395. It should not be ↵NAKAMURA Takumi2013-12-171-1/+1
| | | | | | staged yet. llvm-svn: 197441
* The preferred alignment defaults to the ABI one. Omit it if it is the same.Rafael Espindola2013-12-161-77/+77
| | | | llvm-svn: 197440
* Remove another default I missed before.Rafael Espindola2013-12-161-1/+1
| | | | llvm-svn: 197437
* ObjectiveC. Further improvements of useFariborz Jahanian2013-12-164-23/+40
| | | | | | | | | | of objc_bridge_related attribute; eliminate unnecessary diagnostics which is issued elsewhere, fixit now produces a valid AST tree per convention. This results in some simplification in handling of this attribute as well. // rdar://15499111 llvm-svn: 197436
* Clang DataLayout string cleanup: don't print other defaults.Rafael Espindola2013-12-161-2/+2
| | | | | | I missed these in previous commits. llvm-svn: 197435
* Remove dead data.Rafael Espindola2013-12-161-1/+1
| | | | | | | The f80:128:128 was followed by a f80:32:32 and so never used. Looks like this was there since r91746. llvm-svn: 197433
* Clang DataLayout string cleanup: don't print the pointer defaults.Rafael Espindola2013-12-161-11/+11
| | | | llvm-svn: 197430
* Clang DataLayout string cleanup: don't print the aggregate defaults.Rafael Espindola2013-12-161-6/+6
| | | | llvm-svn: 197429
* Fix PR18260 - Make std::move handling in -Wconsumed only trigger on std::moveRichard Trieu2013-12-161-1/+2
| | | | llvm-svn: 197428
* Clang DataLayout string cleanup: don't print the vector defaults.Rafael Espindola2013-12-161-29/+29
| | | | llvm-svn: 197427
* Clang DataLayout string cleanup: don't print the FP defaults.Rafael Espindola2013-12-161-42/+42
| | | | llvm-svn: 197422
* Clang DataLayout string cleanup: don't print the integer defaults.Rafael Espindola2013-12-161-44/+44
| | | | llvm-svn: 197421
* Revert "Maybe add new warning for shadowing simple tag types"Kaelyn Uhrain2013-12-161-7/+1
| | | | | | | | | This reverts commit 2b43f500cfea10a8c59c986dcfc24fd08eecc77d. This was accidentally committed because I failed to notice my client wasn't clean prior to submitting a fix for a crasher. llvm-svn: 197410
* Make Sema::BuildCXXNestedNameSpecifier correctly clear the previousKaelyn Uhrain2013-12-161-0/+2
| | | | | | | | CXXScopeSpec when necessary while performing typo correction. This fixes the crash reported in PR18213 (the problem existed since r185487, and r193020 made it easier to hit). llvm-svn: 197409
* Maybe add new warning for shadowing simple tag typesKaelyn Uhrain2013-12-161-1/+7
| | | | llvm-svn: 197408
* Support EABIHF environment on ARM.Joerg Sonnenberger2013-12-162-1/+16
| | | | llvm-svn: 197406
* GNUEABIHF is the same as GNUEABI for anything not float/double related,Joerg Sonnenberger2013-12-161-0/+1
| | | | | | so use the same exception size as GNUEABI does. llvm-svn: 197404
* Add bit_FXSAVE as an alias for bit_FXSR, for gcc compat.Nico Weber2013-12-161-0/+1
| | | | llvm-svn: 197399
* [CMake] Introduce CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.NAKAMURA Takumi2013-12-161-1/+1
| | | | llvm-svn: 197395
* clang-format: Keep trailing annotations together.Daniel Jasper2013-12-162-6/+14
| | | | | | | | | | | | | | | | Before: virtual void aaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa aaaa, aaaaaaaaaaa aaaaa) const override; virtual void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() const override; After: virtual void aaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa aaaa, aaaaaaaaaaa aaaaa) const override; virtual void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() const override; llvm-svn: 197391
* Revert "Modules: Make missing headers in a module.map a warning not an error."Daniel Jasper2013-12-162-11/+18
| | | | | | This was committed accidentally. llvm-svn: 197389
* Modules: Make missing headers in a module.map a warning not an error.Daniel Jasper2013-12-162-18/+11
| | | | | | | | | | | | | | | | Instead, mark the module as unavailable so that clang errors as soon as someone tries to build this module. A better long-term strategy might be to not stat the header files at all while reading the module map and instead read them only when the module is being built (there is a corresponding FIXME in parseHeaderDecl()). However, it seems non-trivial to get there and this would be a temporary solution to unblock us. Also changed the implementation to reuse the same DiagnosticsEngine as otherwise warnings can't be enabled or disabled with command-line flags. llvm-svn: 197388
* Always break before the colon in constructor initializers, whenAlexander Kornienko2013-12-163-9/+11
| | | | | | | | | | | BreakConstructorInitializersBeforeComma is true. This option is used in WebKit style, so this also ensures initializer lists are not put on a single line, as per the WebKit coding guidelines. Patch by Florian Sowade! llvm-svn: 197386
* clang-format: Fix formatting of function type parameters.Daniel Jasper2013-12-161-5/+10
| | | | | | | | | Before: void f() { typedef void (*f)(int * a); } After: void f() { typedef void (*f)(int *a); } llvm-svn: 197369
* clang-format: Improve handling of raw string literals.Daniel Jasper2013-12-163-4/+11
| | | | | | | | | | | | | | | | Especially try to keep existing line breaks before raw string literals, as the code author might have aligned content to it. Thereby, clang-format now keeps things like: parseStyle(R"( BasedOnStyle: Google, ColumnLimit: 100)"); parseStyle( R"(BasedOnStyle: Google, ColumnLimit: 100)"); llvm-svn: 197368
* Stop crashing on empty asm input constraintsDuncan P. N. Exon Smith2013-12-161-0/+3
| | | | | | | | | | An empty string for an ASM input constraint is invalid, and will crash during clang CodeGen. Change TargetInfo::validateInputConstraint to reject an empty string. <rdar://problem/15552191> llvm-svn: 197362
* Delete dead code.Rafael Espindola2013-12-151-2/+0
| | | | | | This is always overwritten by the one in NaClTargetInfo. llvm-svn: 197346
* Allow target-specific attributes to share a spelling between different ↵Aaron Ballman2013-12-151-23/+32
| | | | | | | | | | attributes via the ParseKind field. Attributes will be given a common parsed attribute identifier (the AttributeList::AT_* enum), but retain distinct Attr subclasses. This new functionality is used to implement the ARM and MSP430 interrupt attribute. Patch reviewed by Richard Smith over IRC. llvm-svn: 197343
* ASTContext: Declare builtin types implicitlyAlp Toker2013-12-152-195/+71
| | | | | | | | | | | | | | __builtin_va_list and friends have been showing up where they shouldn't for way to long, making unwanted appearences in -ast-print, tooling and source level visitors and even the hello world tutorial on the clang website. This commit factors down the implicit typedef and record creation facilities to ensure they're marked implicit. Also fixes a unit test that was testing incorrect behaviour, and removes old hacks in the DeclPrinter that tried to skip implicit declarations manually. llvm-svn: 197336
* Lexer: Issue -Wbackslash-newline-escape for line commentsAlp Toker2013-12-141-1/+8
| | | | | | | | | | | | The warning for backslash and newline separated by whitespace was missed in this code path. backslash<whitespace><newline> is handled differently from compiler to compiler so it's important to warn consistently where there's ambiguity. Matches similar handling of block comments and non-comment lines. llvm-svn: 197331
* CompilationDatabase.cpp:stripPositionalArgs(): Match not "no-integrated-as" ↵NAKAMURA Takumi2013-12-141-1/+2
| | | | | | but "-no-integrated-as", it really fixes r197229. llvm-svn: 197309
* PR18246: When performing template argument deduction to decide which templateRichard Smith2013-12-141-3/+3
| | | | | | | | | | is specialized by an explicit specialization, start from the first declaration in case we've got a member of a class template (redeclarations might not number the template parameters the same way). Our recover here is still far from ideal. llvm-svn: 197305
* Revert "Don't require -re suffix on -verify directives with regexes."Alp Toker2013-12-141-3/+19
| | | | | | | | | | This patch was submitted to the list for review and didn't receive a LGTM. (In fact one explicit objection and one query were raised.) This reverts commit r197295. llvm-svn: 197299
* PR18232: implement instantiation for class-scope explicit specializations ofRichard Smith2013-12-142-3/+139
| | | | | | class templates (a Microsoft extension). llvm-svn: 197298
* Don't require -re suffix on -verify directives with regexes.Hans Wennborg2013-12-141-19/+3
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2392 llvm-svn: 197295
* Quick-Fix pointer arithmetic when performing multi-D new-array initialization.Faisal Vali2013-12-141-3/+23
| | | | | | | | | | | | | | | | | | clang still doesn't emit the right llvm code when initializing multi-D arrays it seems. For e.g. the following code would still crash for me on Windows 7, 64 bit: auto f4 = new int[100][200][300]{{{1,2,3}, {4, 5, 6}}, {{10, 20, 30}}}; It seems that the final new loop that iterates through each outermost array and memsets it to zero gets confused with its final ptr arithmetic. This patch ensures that it converts the pointer to the allocated type (int [200][300]) before incrementing it (instead of using the base type: 'int'). Richard somewhat squeamishly approved the patch (as a quick fix to potentially make it into 3.4) - while exhorting for a more optimized fix in the future. http://llvm-reviews.chandlerc.com/D2398 Thanks Richard! llvm-svn: 197294
* Remove an unused parameter and include after r197273Alp Toker2013-12-133-5/+3
| | | | llvm-svn: 197274
* Eliminate BinaryTypeTraitExprAlp Toker2013-12-1316-171/+41
| | | | | | | | | | | | | | | | | There's nothing special about type traits accepting two arguments. This commit eliminates BinaryTypeTraitExpr and switches all related handling over to TypeTraitExpr. Also fixes a CodeGen failure with variadic type traits appearing in a non-constant expression. The BTT/TT prefix and evaluation code is retained as-is for now but will soon be further cleaned up. This is part of the ongoing work to unify type traits. llvm-svn: 197273
* Delete dead code.Rafael Espindola2013-12-131-17/+0
| | | | llvm-svn: 197270
* Every target sets DescriptionString. Assert that.Rafael Espindola2013-12-131-2/+1
| | | | llvm-svn: 197268
* Use a: and s: instead of a0: and s0: in the DataLayout strings.Rafael Espindola2013-12-131-13/+13
| | | | | | They are equivalent and the size of 'a' and 's' is unused. llvm-svn: 197256
* Objective-C. Do not issue warning when 'readonly'Fariborz Jahanian2013-12-131-30/+7
| | | | | | | | | | | | | | property declaration has a memory management attribute (retain, copy, etc.). Sich properties are usually overridden to become 'readwrite' via a class extension (which require the memory management attribute specified). In the absence of class extension override, memory management attribute is needed to produce correct Code Gen. for the property getter in any case and this warning becomes confusing to user. // rdar://15641300 llvm-svn: 197251
* Fix raw lex crash and -frewrite-includes noeol-at-eof failureAlp Toker2013-12-132-6/+7
| | | | | | Raw lexers don't have a preprocessor so we need to null check. llvm-svn: 197245
* [OpenCL] Produce an error when the work group and vec type hint attributesJoey Gouly2013-12-131-0/+19
| | | | | | | | are used on non-kernel functions. Reviewed by Aaron over IRC! llvm-svn: 197243
* clang-check to ignore -no-integrated-as because certain drivers can't handle itArtyom Skrobov2013-12-131-2/+6
| | | | llvm-svn: 197229
* Refine 'objc_protocol_requires_explicit_implementation' attribute to better ↵Ted Kremenek2013-12-131-3/+4
| | | | | | handle indirect protocols. llvm-svn: 197209
OpenPOWER on IntegriCloud