summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix strange indentation and remove trailing whitespace on empty linesDmitri Gribenko2013-12-171-10/+10
| | | | llvm-svn: 197513
* Bring order to the OpenCL keywordsAlp Toker2013-12-171-19/+1
| | | | | | | | | | | | Avoid the gratuitous repurposing of C++ keyword 'private' by using a keyword alias. Also attempt to document the OpenCL keywords based on scraps of information found online. The purpose of this commit is to reduce impact on the C++ parser. llvm-svn: 197511
* [ms-cxxabi] Don't do destructor check on declarations if the dtor is deletedHans Wennborg2013-12-172-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | We would previously emit redundant diagnostics for the following code: struct S { virtual ~S() = delete; void operator delete(void*, int); void operator delete(void*, double); } s; First we would check on ~S() and error about the ambigous delete functions, and then we would error about using the deleted destructor. If the destructor is deleted, there's no need to check it. Also, move the check from Sema::ActOnFields to CheckCompleteCXXClass. These are run at almost the same time, called from ActOnFinishCXXMemberSpecification. However, CHeckCompleteCXXClass may mark a defaulted destructor as deleted, and if that's the case we don't want to check it. Differential Revision: http://llvm-reviews.chandlerc.com/D2421 llvm-svn: 197509
* Fix indentation from r197490 plus some typosAlp Toker2013-12-173-11/+10
| | | | llvm-svn: 197507
* Remove -f128:128 from the DataLayout strings. It is the default.Rafael Espindola2013-12-171-6/+6
| | | | llvm-svn: 197504
* The PS3 is a ppc64 and has 64 bit registers. Update DataLayout accordingly.Rafael Espindola2013-12-171-2/+1
| | | | llvm-svn: 197502
* Remove -f16:16:32 from the XCore DataLayout string.Rafael Espindola2013-12-171-1/+1
| | | | | | This makes it identical to the string llvm produces. llvm-svn: 197500
* Refactor and micro-optimize ConsumeToken()Alp Toker2013-12-175-140/+74
| | | | | | | | | | | | 1) Introduce TryConsumeToken() to handle the common test-and-consume pattern. This brings about readability improvements in the parser and optimizes to avoid redundant checks in the common case. 2) Eliminate the ConsumeCodeCompletionTok special case from ConsumeToken(). This was used by only one caller which has been switched over to the more appropriate ConsumeCodeCompletionToken() function. llvm-svn: 197497
* Simplify RevertibleTypeTraits as a form of contextual keywordAlp Toker2013-12-173-70/+37
| | | | | | | | | | | Now that we emit diagnostics for keyword-as-identifier hacks (-Wkeyword-compat) we can go ahead and simplify some of the old revertible keyword support. This commit adds a TryIdentKeywordUpgrade() function to mirror the recently added TryKeywordIdentFallback() and uses it to replace the hard-coded list of REVERTIBLE_TYPE_TRAITs. llvm-svn: 197496
* clang-format: Don't adapt local format to macros.Daniel Jasper2013-12-171-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Formatting this: void f() { // 1 space initial indent. int i; #define A \ int i; \ int j; int k; // Format this line. } void f() { #define A 1 // Format this line. } Before: void f() { // 1 space initial indent. int i; #define A \ int i; \ int j; int k; // Format this line. } void f() { #define A 1 // Format this line. } After: void f() { // 1 space initial indent. int i; #define A \ int i; \ int j; int k; // Format this line. } void f() { #define A 1 // Format this line. } llvm-svn: 197494
* LIBRARY_PATH environment variable should only be supported on a native compiler.Richard Barton2013-12-172-1/+17
| | | | llvm-svn: 197490
* Modules: Don't warn upon missing headers while reading the module map.Daniel Jasper2013-12-175-41/+55
| | | | | | | | | | | | | | | Instead, mark the module as unavailable so that clang errors as soon as someone tries to build this module. This works towards the long-term goal of not stat'ing 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 unblock us and moves us into the right direction. Also changed the implementation to reuse the same DiagnosticsEngine. llvm-svn: 197485
* 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
OpenPOWER on IntegriCloud