summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Objective-C. Make diagnostics and fix-its consistent Fariborz Jahanian2013-12-177-19/+57
| | | | | | | | when diagnosing casting of a cstring literal to NSString in default and -fobjc-arc mode. // rdar://14106083 llvm-svn: 197515
* 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-172-26/+13
| | | | | | | | | | | | 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-173-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | 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-172-12/+12
| | | | llvm-svn: 197504
* The PS3 is a ppc64 and has 64 bit registers. Update DataLayout accordingly.Rafael Espindola2013-12-172-3/+2
| | | | llvm-svn: 197502
* Remove -f16:16:32 from the XCore DataLayout string.Rafael Espindola2013-12-172-2/+2
| | | | | | This makes it identical to the string llvm produces. llvm-svn: 197500
* Refactor and micro-optimize ConsumeToken()Alp Toker2013-12-176-147/+102
| | | | | | | | | | | | 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-174-73/+47
| | | | | | | | | | | 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
* Update comment of changed parameter of ModuleMap constructor.Daniel Jasper2013-12-171-2/+1
| | | | llvm-svn: 197495
* clang-format: Don't adapt local format to macros.Daniel Jasper2013-12-172-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-174-1/+21
| | | | llvm-svn: 197490
* Add missing file from r197485.Daniel Jasper2013-12-171-0/+2
| | | | | | (Yes, the irony is not lost on me :-) ). llvm-svn: 197486
* Modules: Don't warn upon missing headers while reading the module map.Daniel Jasper2013-12-1713-49/+86
| | | | | | | | | | | | | | | 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
* [CMake][Standalone] Import LLVM_LIT_TOOLS_DIR.NAKAMURA Takumi2013-12-171-0/+5
| | | | llvm-svn: 197461
* [CMake][Standalone] Fix llvm-tblgen's directory to use LLVM_TOOLS_BINARY_DIR ↵NAKAMURA Takumi2013-12-171-2/+2
| | | | | | | | | instead of LLVM_BINARY_DIR. LLVM_BINARY_DIR points OBJROOT. FIXME: llvm-config should show *real* bindir with --bindir. llvm-svn: 197460
* [CMake][Standalone] Fixup r197395 for standalone build.NAKAMURA Takumi2013-12-172-0/+12
| | | | | | Standalone scripts shall be rewritten. llvm-svn: 197459
* ASTContext: Refactor implicit record creationAlp Toker2013-12-173-77/+45
| | | | | | | | Tidy up built-in record creation to reduce code duplication. Continuation of r197336. llvm-svn: 197452
* Add a test for -fno-diagnostics-fixit-infoDmitri Gribenko2013-12-171-0/+16
| | | | llvm-svn: 197450
* ObjectiveC migrator. Fixes a bug when protocolFariborz Jahanian2013-12-173-1/+35
| | | | | | 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-172-2/+21
| | | | | | | 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-172-12/+7
| | | | | | | 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-162-113/+113
| | | | llvm-svn: 197440
* Remove another default I missed before.Rafael Espindola2013-12-162-2/+2
| | | | llvm-svn: 197437
* ObjectiveC. Further improvements of useFariborz Jahanian2013-12-169-52/+63
| | | | | | | | | | 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-162-3/+3
| | | | | | I missed these in previous commits. llvm-svn: 197435
* Remove dead data.Rafael Espindola2013-12-162-2/+2
| | | | | | | 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-162-22/+22
| | | | llvm-svn: 197430
* Clang DataLayout string cleanup: don't print the aggregate defaults.Rafael Espindola2013-12-162-12/+12
| | | | llvm-svn: 197429
* Fix PR18260 - Make std::move handling in -Wconsumed only trigger on std::moveRichard Trieu2013-12-162-1/+21
| | | | llvm-svn: 197428
* Clang DataLayout string cleanup: don't print the vector defaults.Rafael Espindola2013-12-162-57/+57
| | | | llvm-svn: 197427
* In a standalone Clang build, default to building tests, like LLVM doesDmitri Gribenko2013-12-161-0/+4
| | | | | | | LLVM_INCLUDE_TESTS is set in the top-level LLVM CMakeLists, which is not being executed when Clang is built in a separate directory. llvm-svn: 197423
* Clang DataLayout string cleanup: don't print the FP defaults.Rafael Espindola2013-12-162-77/+77
| | | | llvm-svn: 197422
* Clang DataLayout string cleanup: don't print the integer defaults.Rafael Espindola2013-12-162-80/+80
| | | | llvm-svn: 197421
* Misc test cleanups.Rafael Espindola2013-12-163-11/+6
| | | | | | | | * tbaa-struct.cpp always has a 64 bit pointer. * f32:32:32, f64:64:64 and f128:128:128 are defaults, don't assume they are printed. llvm-svn: 197415
* Revert "Maybe add new warning for shadowing simple tag types"Kaelyn Uhrain2013-12-162-11/+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-162-0/+20
| | | | | | | | 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-162-1/+11
| | | | 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
* [AArch64] Fix v1fx patterns for Floating-point Multiply Extend and ↵Chad Rosier2013-12-162-1/+30
| | | | | | Floating-point Compare to Zero. llvm-svn: 197403
* 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-163-4/+7
| | | | llvm-svn: 197395
* clang-format: Keep trailing annotations together.Daniel Jasper2013-12-163-6/+19
| | | | | | | | | | | | | | | | 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-168-23/+23
| | | | | | This was committed accidentally. llvm-svn: 197389
* Modules: Make missing headers in a module.map a warning not an error.Daniel Jasper2013-12-168-23/+23
| | | | | | | | | | | | | | | | 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-164-21/+67
| | | | | | | | | | | 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
* Added -iregex for case-insensitive regex to filter file names.Alexander Kornienko2013-12-161-5/+13
| | | | | | | | | | | | | | | | | Summary: -regex and -iregex both mimic options of the find utility. Made the default list of extensions case-insensitive, so that it's not only C and CPP extensions are accepted in upper case. Reviewers: djasper Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2415 llvm-svn: 197378
OpenPOWER on IntegriCloud