summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix OpenMP recovery with trailing tokens following the pragmaAlp Toker2013-12-183-0/+20
| | | | | | | | The recovery was failing due to a missing case in SkipUntil(). Also add back tests from r197553 that were reverted in the previous commit. llvm-svn: 197598
* Revert "[OPENMP] Fix for parsing OpenMP directives with extra braces, ↵Alp Toker2013-12-186-86/+41
| | | | | | | | | | | brackets and parens" These parser changes were redundant. The same or better recovery can be achieved with a one-line fix to SkipUntil() due to land in the next commit. This reverts commit r197553. llvm-svn: 197597
* Adding a win32-targeted test into Tooling/multi-jobs.cpp, to make sure it ↵Artyom Skrobov2013-12-181-0/+1
| | | | | | | | doesn't get broken again (prompted by NAKAMURA Takumi) llvm-svn: 197596
* check-clang: Fixup r197576, to replace CMAKE_CFG_INTDIR on clang_tools_dir.NAKAMURA Takumi2013-12-181-0/+1
| | | | llvm-svn: 197593
* OpenCL: Do not force 64 bit floats for (embedded) targets with only 32bit ↵Pekka Jaaskelainen2013-12-181-2/+8
| | | | | | floats. llvm-svn: 197592
* ObjectiveC. Fixes the sentence in a diagnostic.Fariborz Jahanian2013-12-182-2/+2
| | | | | | // rdar://15397430 llvm-svn: 197586
* clang-format parts of the file.Rafael Espindola2013-12-181-18/+9
| | | | | | | I am about to send a patch for review touching these and clang-formating first makes the patch much easier to read. llvm-svn: 197585
* Implement the MSABI and SysVABI calling conventions for Objective-C method ↵Aaron Ballman2013-12-182-4/+13
| | | | | | declarations. This appears to be an omission from r189644. llvm-svn: 197584
* Adding some comments about AST node requirements for attributes which create ↵Aaron Ballman2013-12-181-0/+5
| | | | | | AST nodes but never actually make use of them. No functional changes. llvm-svn: 197582
* Whitespace cleanup.Rafael Espindola2013-12-181-2/+2
| | | | llvm-svn: 197580
* Remove OpenCL-specific type keywords and specifiersAlp Toker2013-12-1811-161/+22
| | | | | | | | | | | | | | | This commit kills off custom type specifier and keyword handling of OpenCL C data types. Although the OpenCL spec describes them as keywords, we can handle them more elegantly as predefined types. This should provide better error correction and code completion as well as simplifying the implementation. The primary intention is however to simplify the C/C++ parser and save some packed bits on AST structures that had been extended in r170432 just for OpenCL. llvm-svn: 197578
* Add -f64:32:64 to the darwin ppc32 DataLayout.Rafael Espindola2013-12-182-5/+3
| | | | | | A f64 inside a struct can be 32 bit aligned on darwin. llvm-svn: 197577
* check-clang: Introduce clang_tools_dir in lit.site.cfg, for clang separated ↵NAKAMURA Takumi2013-12-184-1/+8
| | | | | | from llvm. llvm-svn: 197576
* clang/test/CMakeLists.txt: Prune CLANG_SOURCE_DIR and CLANG_BINARY_DIR. They ↵NAKAMURA Takumi2013-12-181-3/+0
| | | | | | are set at top. llvm-svn: 197575
* clang-format: Fix indentation corner case.Daniel Jasper2013-12-182-1/+8
| | | | | | | | | | | | | | | | | | | | | | Before: aaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); aaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(); After: aaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); aaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(); Probably still not ideal, but should be a step into the right direction. llvm-svn: 197557
* [OPENMP] Fix for parsing OpenMP directives with extra braces, brackets and ↵Alexey Bataev2013-12-186-41/+86
| | | | | | parens llvm-svn: 197553
* clang-format: Fix ObjC method expr in binary expressions.Daniel Jasper2013-12-182-1/+3
| | | | | | | | | | | | | | Before: bool a = ([aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaa || [aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaaaaa); After: bool a = ([aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaa || [aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaaaaa); This fixes llvm.org/PR18271. llvm-svn: 197552
* Use arm-nacl-gnueabi instead of arm-nacl to match the previous tests.Rafael Espindola2013-12-181-1/+1
| | | | llvm-svn: 197550
* Split this test into one per supporter nacl arch.Rafael Espindola2013-12-181-3/+13
| | | | | | | | | Right now clang produces the same DataLayout for all of them, but it could, for example, add 'n' specifications when the end architecture is given. No functionality change, this should just make future changes easier to read. llvm-svn: 197549
* Print the 'p' specification before the 'i' specification.Rafael Espindola2013-12-182-3/+2
| | | | | | No functionality change. llvm-svn: 197548
* Fix comment-code function name mismatchHans Wennborg2013-12-181-2/+2
| | | | llvm-svn: 197544
* clang-format-diff.py: add the OpenCL file extensionAlp Toker2013-12-181-1/+1
| | | | | | It's handled correctly as a C-family language. llvm-svn: 197542
* ObjectiveC. typo fix in my last patch,Fariborz Jahanian2013-12-183-6/+4
| | | | | | per Jordan's review. llvm-svn: 197540
* Add a 's' specifications to AArch64.Rafael Espindola2013-12-172-4/+2
| | | | | | | | This has no functionality change as clang adds explicit alignment info for byval arguments. The only difference is that now the clang produced DataLayout string for AArch64 is identical to the LLVM produced one. llvm-svn: 197538
* Move some more test-and-consumes over to TryConsumeToken()Alp Toker2013-12-171-36/+20
| | | | llvm-svn: 197537
* Objctive-C. warn if dealloc is being overridden inFariborz Jahanian2013-12-174-2/+30
| | | | | | a category implementation. // rdar://15397430 llvm-svn: 197534
* Documentation comment parsing: when checking if we have typedef to somethingDmitri Gribenko2013-12-172-0/+17
| | | | | | | that we consider a function for the purposes of checking \param and \returns, look through reference types. llvm-svn: 197530
* Documentation comment parsing: allow \param and \returns on std::function,Dmitri Gribenko2013-12-172-0/+57
| | | | | | boost::function and similar function-like objects llvm-svn: 197528
* None of these attributes currently make use of an AST node, so setting ↵Aaron Ballman2013-12-171-0/+9
| | | | | | ASTNode = 0 to reduce complexity. No functional change intended. llvm-svn: 197525
* Use triples that match the -target-abi option.Rafael Espindola2013-12-171-2/+2
| | | | llvm-svn: 197522
* Use the integrated assembler by default on FreeBSD/ppc and ppc64.Roman Divacky2013-12-171-1/+6
| | | | llvm-svn: 197521
* [ms-cxxabi] The 'most derived' ctor parameter usually comes lastReid Kleckner2013-12-1710-107/+170
| | | | | | | | | | | | | | Unlike Itanium's VTTs, the 'most derived' boolean or bitfield is the last parameter for non-variadic constructors, rather than the second. For variadic constructors, the 'most derived' parameter comes after the 'this' parameter. This affects constructor calls and constructor decls in a variety of places. Reviewers: timurrrr Differential Revision: http://llvm-reviews.chandlerc.com/D2405 llvm-svn: 197518
* Documentation comment parsing: rearrange tests to clarify the intent of ↵Dmitri Gribenko2013-12-171-14/+22
| | | | | | these tests llvm-svn: 197517
* Fix line endings in microsoft-dtor-lookup-cxx11.cppHans Wennborg2013-12-171-13/+13
| | | | llvm-svn: 197516
* 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
OpenPOWER on IntegriCloud