summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use the simpler is_directory.Rafael Espindola2013-07-172-4/+2
| | | | llvm-svn: 186487
* More code conformance.Fariborz Jahanian2013-07-171-1/+1
| | | | llvm-svn: 186474
* ObjectiveC migrator: When adding conforming protocol,Fariborz Jahanian2013-07-171-1/+22
| | | | | | | only add outer-most conforming protocols as adding others are redundant. llvm-svn: 186473
* Avoid breaking non-trailing block comments.Alexander Kornienko2013-07-161-1/+1
| | | | | | | | | | | | | | | | Motivating example: // column limit -------------------> void ffffffffffff(int aaaaaa /* test */); Formatting before the patch: void ffffffffffff(int aaaaaa /* test */); Formatting after the patch: void ffffffffffff(int aaaaaa /* test */); llvm-svn: 186471
* Make Expr::isConstantInitializer match IRGen.Eli Friedman2013-07-165-52/+86
| | | | | | | | | | Sema needs to be able to accurately determine what will be emitted as a constant initializer and what will not, so we get accurate errors in C and accurate -Wglobal-constructors warnings in C++. This makes Expr::isConstantInitializer match CGExprConstant as closely as possible. llvm-svn: 186464
* [arcmt] Remove some dead code.Argyrios Kyrtzidis2013-07-161-27/+14
| | | | | | Patch by Rafael Espíndola. llvm-svn: 186462
* ObjectiveC migrator. If a class implements a protocol'sFariborz Jahanian2013-07-161-9/+14
| | | | | | properties, then class conforms to that protocol. llvm-svn: 186460
* Don't break line comments with escaped newlines.Alexander Kornienko2013-07-162-2/+25
| | | | | | | | | | | | | | | | | | | | Summary: These can appear when comments contain command lines with quoted line breaks. As the text (including escaped newlines and '//' from consecutive lines) is a single line comment, we used to break it even when it didn't exceed column limit. This is a temporary solution, in the future we may want to support this case completely - at least adjust leading whitespace when changing indentation of the first line. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1146 llvm-svn: 186456
* clang-format: Improve handling of unterminated string literals.Daniel Jasper2013-07-163-29/+44
| | | | | | | Before, clang-format would simply eat these as they were recognized as whitespace. With this patch, they are mostly left alone. llvm-svn: 186454
* Fix crash on complex constant zero.Eli Friedman2013-07-161-3/+3
| | | | | | Fixes <rdar://problem/14442543>. llvm-svn: 186452
* Update for llvm API change.Rafael Espindola2013-07-168-28/+22
| | | | llvm-svn: 186448
* ObjectiveC migration: complete migrating classFariborz Jahanian2013-07-161-22/+22
| | | | | | | declaration to include list of protocols class conforms to. llvm-svn: 186443
* Fix formatting. No functional change.Craig Topper2013-07-161-7/+5
| | | | llvm-svn: 186437
* Revamp the formatting of C++11 braced init lists.Daniel Jasper2013-07-162-7/+9
| | | | | | | | | | | | | | The fundamental concept is: Format as if the braced init list was a function call (with parentheses replaced by braces). If there is no name/type before the opening brace (e.g. if the braced list is nested), assume a zero-length identifier just before the opening brace. This behavior is gated on a new style flag, which for now replaces the SpacesInBracedLists style flag. Activate this style flag for Google style to reflect recent style guide changes. llvm-svn: 186433
* Add more types to ASTNodeKind. Refactor common instantiation code.Samuel Benzaquen2013-07-161-0/+2
| | | | | | | | | | | | | | Summary: Add support for CXXCtorInitializer and TemplateArgument types to ASTNodeKind. This change is to support more matchers from clang/ASTMatchers/ASTMatchers.h in the dynamic layer (clang/ASTMatchers/Dynamic). Reviewers: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1143 llvm-svn: 186422
* This patch removes unused parameter allProperties and converts remainingFariborz Jahanian2013-07-162-14/+7
| | | | | | | parameters in ArrayRef'ize Sema::ActOnAtEnd to ArrayRef. Patch by Robert Wilhelm. llvm-svn: 186421
* Remove unnecessary assignment.Manuel Klimek2013-07-161-1/+0
| | | | llvm-svn: 186412
* Fixes another hard to test problem with iterator invalidation.Manuel Klimek2013-07-161-60/+69
| | | | | | | | | | As every match call can recursively call back into the memoized match via a nested traversal matcher (for example: stmt(hasAncestor(stmt(hasDescendant(stmt(hasDescendant(stmt()))))))), and every memoization step might clear the cache, we must not store iterators into the result cache when calling match on a submatcher. llvm-svn: 186411
* clang-format: Improve detection of function types.Daniel Jasper2013-07-161-1/+3
| | | | | | | | | | This fixes an incorrect detection that led to a formatting error. Before: some_var = function (*some_pointer_var)[0]; After: some_var = function(*some_pointer_var)[0]; llvm-svn: 186402
* ARM: implement low-level intrinsics for the atomic exclusive operations.Tim Northover2013-07-162-6/+166
| | | | | | | | | | | | This adds three overloaded intrinsics to Clang: T __builtin_arm_ldrex(const volatile T *addr) int __builtin_arm_strex(T val, volatile T *addr) void __builtin_arm_clrex() The intent is that these do what users would expect when given most sensible types. Currently, "sensible" translates to ints, floats and pointers. llvm-svn: 186394
* Limit number of bits in size representation so that bit size fit 64 bits.Serge Pavlov2013-07-161-5/+6
| | | | | | This fixes PR8256 and some others. llvm-svn: 186385
* Add 'const' qualifiers to static const char* variables.Craig Topper2013-07-161-2/+2
| | | | llvm-svn: 186383
* Merge attributes on typedef decls.Eli Friedman2013-07-161-0/+2
| | | | | | | | | Not completely sure this is right, but it's clearly better than what we did before this commit (effectively dropping the attribute). <rdar://problem/14413117> llvm-svn: 186373
* Fix alignment of class derived from empty class.Eli Friedman2013-07-161-3/+4
| | | | | | | | | The record layout code didn't properly take into account that an empty class at offset 0 can have an alignment greater than 1. Patch by Andrea Di Biagio. llvm-svn: 186370
* ObjC migrator: build conforming interfaceFariborz Jahanian2013-07-162-1/+48
| | | | | | declaration (not yet used). wip. llvm-svn: 186369
* Fix member refs with using decl + anonymous union.Eli Friedman2013-07-161-10/+14
| | | | | | | | | | Make sure we call BuildFieldReferenceExpr with the appropriate decl when a member of an anonymous union is made public with a using decl. Also, fix a crash on invalid field access into an anonymous union. Fixes PR16630. llvm-svn: 186367
* ObjC migrator: finding conforming protocolFariborz Jahanian2013-07-152-2/+76
| | | | | | candidates for each class. wip. llvm-svn: 186349
* Move the "->" to "." fixit from r186128 into a separate note sinceKaelyn Uhrain2013-07-151-5/+3
| | | | | | | | recovery is not attempted with the fixit. Also move the associated test case from FixIt/fixit.cpp to SemaCXX/member-expr.cpp since the fixit is no longer automatically applied. llvm-svn: 186342
* Add support for type traversal matchers.Samuel Benzaquen2013-07-152-30/+20
| | | | | | | | | | | | | | | Summary: Fixup the type traversal macros/matchers to specify the supported types. Make the marshallers a little more generic to support any variadic function. Update the doc script. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1023 llvm-svn: 186340
* Re-revert r86040, which was un-reverted in r186199.Chandler Carruth2013-07-154-21/+25
| | | | | | | | | | | | | | | This breaks the build of basic patterns with repeated friend declarations. See the added test case in SemaCXX/friend.cpp or the test case reported to the original commit log. Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186331
* clang-format: Improve c-style cast detection.Daniel Jasper2013-07-151-2/+3
| | | | | | | | | | | Before: #define x ((int) - 1) #define p(q) ((int *) & q) After: #define x ((int)-1) #define p(q) ((int *)&q) llvm-svn: 186324
* Improvement of change r186320.Daniel Jasper2013-07-152-8/+8
| | | | | | | | | | | | | | | | Fixed a test that by now passed for the wrong reason. Before: llvm::outs() << "aaaaaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: llvm::outs() << "aaaaaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa); Also reformatted Format.cpp with the latest changes (1 formatting fix and 1 layout change of a <<-chain). llvm-svn: 186322
* Improve formatting of operator<< chains.Daniel Jasper2013-07-152-2/+2
| | | | | | | | | | | | | Before: llvm::outs() << "aaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaaaaa << "aaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaaaaa << "aaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaaaaa; After: llvm::outs() << "aaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaaaaa << "aaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaaaaa << "aaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaaaaa; llvm-svn: 186320
* Replacing an empty switch with its moral equivalent. No functional changes ↵Aaron Ballman2013-07-151-7/+3
| | | | | | intended. llvm-svn: 186318
* Add 'static' and 'const' qualifiers to some arrays of strings.Craig Topper2013-07-154-7/+7
| | | | llvm-svn: 186314
* Fix to PR12262 - assertion when substituting explicit template argumentsSerge Pavlov2013-07-152-0/+13
| | | | | | | | does not substitute a sizeof-pack expression. The solution is proposed by Richard Smith. Differential Revision: http://llvm-reviews.chandlerc.com/D869 llvm-svn: 186306
* Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).Craig Topper2013-07-158-14/+16
| | | | llvm-svn: 186300
* Reformat line.Eric Christopher2013-07-141-2/+1
| | | | llvm-svn: 186294
* Move BlockLiteralGeneric earlier in CGDebugInfo and removeEric Christopher2013-07-142-8/+4
| | | | | | | BlockLiteralGenericSet and replace with a call to isType() on the BlockLiteralGeneric. llvm-svn: 186293
* Update a few comments and reformat a decl for clarity.Eric Christopher2013-07-141-3/+4
| | | | llvm-svn: 186292
* Replace C++0x in a comment with C++11Craig Topper2013-07-141-1/+1
| | | | llvm-svn: 186287
* Change cxx0x to cxx11 in diagnostic name.Craig Topper2013-07-141-1/+1
| | | | llvm-svn: 186286
* Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector ↵Craig Topper2013-07-142-3/+3
| | | | | | size. llvm-svn: 186284
* Add missing include guards into headers in lib/Headers. While it may appearRichard Smith2013-07-144-0/+19
| | | | | | | | | | | | | | | | that these headers should not be included more than once, they are in fact included twice when building our builtins module (in order for it to generate submodules for them), and without this, any modular build enabling AVX and including any builtin header fails. Testing this is tricky because including any of these headers in a modular build is liable to fail, due to unrelated builtin headers in the same module including headers which might not be available on the system running the tests. Suggestion on that front are welcome (but we're getting close to being able to run a buildbot that has modules enabled for all tests, which would nicely solve the testing problem). llvm-svn: 186275
* If an unimported submodule of an imported module contains a declaration of aRichard Smith2013-07-141-1/+5
| | | | | | | global allocation or deallocation function, that should not cause that global allocation or deallocation function to become unavailable. llvm-svn: 186270
* Serialization support for TagDecl::IsCompleteDefinitionRequiredDavid Blaikie2013-07-142-0/+4
| | | | | | Requested by Richard Smith in post-commit review of r186262 llvm-svn: 186266
* PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to ↵David Blaikie2013-07-137-35/+28
| | | | | | | | | | | | | | | emit the full definition of a type in -flimit-debug-info This simplifies the core benefit of -flimit-debug-info by taking a more systematic approach to avoid emitting debug info definitions for types that only require declarations. The previous ad-hoc approach (3 cases removed in this patch) had many holes. The general approach (adding a bit to TagDecl and callback through ASTConsumer) has been discussed with Richard Smith - though always open to revision. llvm-svn: 186262
* Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENTDavid Blaikie2013-07-132-0/+2
| | | | | | | | | | | Test coverage for non-dependent pack expansions doesn't demonstrate a failure prior to this patch (a follow-up commit improving debug info will cover this commit specifically) but covers a related hole in our test coverage. Reviewed by Richard Smith & Eli Friedman. llvm-svn: 186261
* Simplify getTypeInfoImpl handling of 'non-canonical unless dependent' types.David Blaikie2013-07-131-26/+4
| | | | | | | | | These types are not dependent in this context, so just look through the sugar. Review by Richard Smith & Eli Friedman. llvm-svn: 186260
* Fixes a typo caught by Arthur O'DwyerFariborz Jahanian2013-07-131-2/+2
| | | | llvm-svn: 186249
OpenPOWER on IntegriCloud