summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Formatter: Detect ObjC method expressions after unary operators.Nico Weber2013-02-052-6/+36
| | | | llvm-svn: 174384
* Initial support for formatting ObjC method declarations/calls.Daniel Jasper2013-02-054-38/+117
| | | | | | | | | | | | | | | | We can now format stuff like: - (void)doSomethingWith:(GTMFoo *)theFoo rect:(NSRect)theRect interval:(float)theInterval { [myObject doFooWith:arg1 // name:arg2 error:arg3]; } This seems to fix everything mentioned in llvm.org/PR14939. llvm-svn: 174364
* Fix some linebreak decisions in Google format.Daniel Jasper2013-02-052-8/+17
| | | | | | | | | | | | | | | | | | Before: f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaa); aaaaaaa(aaaaaaaaaaaaa, aaaaaaaaaaaaa, aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaa)); After: f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaa); aaaaaaa(aaaaaaaaaaaaa, aaaaaaaaaaaaa, aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaa)); llvm-svn: 174363
* Fix formatting regression introduced by r174307.Daniel Jasper2013-02-052-0/+4
| | | | | | | | | | In preprocessor definitions, we would not parse all the tokens and thus not annotate them anymore. This led to a wrong formatting of comments in google style: #endif // HEADER_GUARD -- requires two spaces llvm-svn: 174361
* Fix typo in commentArnaud A. de Grandmaison2013-02-051-2/+2
| | | | llvm-svn: 174359
* TextDiagnostic.cpp: Suppress a warning to use ptrdiff_t on i686-clang. ↵NAKAMURA Takumi2013-02-051-1/+1
| | | | | | [-Wsign-compare] llvm-svn: 174353
* Driver and option support for -gsplit-dwarf. This is a part ofEric Christopher2013-02-0510-10/+130
| | | | | | the DWARF5 split dwarf proposal. llvm-svn: 174349
* Spaces instead of tabs.Eric Christopher2013-02-051-3/+3
| | | | llvm-svn: 174348
* Revert "Remove sparse text on diagnostic options. These are not really ↵Ted Kremenek2013-02-051-0/+21
| | | | | | | | documented anywhere, and they really aren't for normal users." I changed my mind. We should just document these in the man page. llvm-svn: 174344
* Remove dead code related to the now defunct PCH stat cache.Ted Kremenek2013-02-053-64/+1
| | | | llvm-svn: 174342
* Test for virtual instead of pure here. It has the exact same effect, and JohnNick Lewycky2013-02-051-1/+1
| | | | | | claims it will improve performance. llvm-svn: 174341
* PR15095: Use more correct source locations for the InitListExpr we fake up forRichard Smith2013-02-054-4/+54
| | | | | | vector initialization. Patch by John Stratton! llvm-svn: 174339
* Remove sparse text on diagnostic options. These are not really documented ↵Ted Kremenek2013-02-051-21/+0
| | | | | | anywhere, and they really aren't for normal users. llvm-svn: 174338
* Add some missing diagnostics for C++11 narrowing conversions.Richard Smith2013-02-056-25/+33
| | | | llvm-svn: 174337
* Implements the convenience matcher findAll.Manuel Klimek2013-02-043-0/+85
| | | | | | | | | | | We found that findAll has been implemented incorrectly multiple times by various people using the matchers. To prevent further wasted development effort, it makes sense to add it as convenience matcher implemented as eachOf(m, forEachDescendant(m)). This patch also updates the docs with the new matchers. llvm-svn: 174320
* Add an eachOf matcher.Manuel Klimek2013-02-043-3/+88
| | | | | | | | | eachOf gives closure on the forEach and forEachDescendant matchers. Before, it was impossible to implement a findAll matcher, as matching the node or any of its descendants was not expressible (since anyOf only triggers the first match). llvm-svn: 174315
* Improve handling of trailing block commentsDaniel Jasper2013-02-042-5/+10
| | | | | | This is a follow up to r174309 to actually make it work. llvm-svn: 174314
* Improve formatting of stream operators.Daniel Jasper2013-02-042-0/+11
| | | | | | | | | | | | | | | If there are string literals on either side of a '<<', chances are high that they represent logically separate concepts. Otherwise, the author could just have just a single literal (possible split over multiple lines). So, we can now nicely format things like: cout << "somepacket = {\n" << " val a = " << ValueA << "\n" << " val b = " << ValueB << "\n" << "}"; llvm-svn: 174310
* Improve handling of trailing block comments.Daniel Jasper2013-02-043-11/+19
| | | | | | | | | | We can now (even in non-bin-packing modes) format: someFunction(1, /* comment 1 */ 2, /* comment 2 */ 3, /* comment 3 */ aaa); llvm-svn: 174309
* Fix an error in formatting of for-loops.Daniel Jasper2013-02-043-5/+22
| | | | | | | | | | | | | | | | Two minor changes: * Slight penalty for breaking at "," as opposed to ";". * Don't apply bin-packing rules to for-loops. Before: for (int aaaaaa = aaaaaaaaaa; aaaaaa < bbbbbbbb; ++aaaaaa, ++ccccccccccccccc) {} After: for (int aaaaaa = aaaaaaaaaa; aaaaaa < bbbbbbbb; ++aaaaaa, ++ccccccccccccccc) {} llvm-svn: 174308
* Restructuring of token annotation for formatting.Daniel Jasper2013-02-045-228/+254
| | | | | | | | | | This combines several changes: * Calculation token type (e.g. for * and &) in the AnnotatingParser. * Calculate the scope binding strength in the AnnotatingParser. * Let <> and [] scopes bind stronger than () and {} scopes. * Add minimal debugging output. llvm-svn: 174307
* clang/Analysis: Fix r174245, a valgrind error in ↵NAKAMURA Takumi2013-02-041-0/+1
| | | | | | AnalysisDeclContext::getBody(bool &IsAutosynthesized), to initialize IsAutosynthesized explicitly. llvm-svn: 174303
* DeclPrinter: fix CXXConstructExpr printing with implicit default argumentDmitri Gribenko2013-02-032-1/+19
| | | | | | | | | | | | | | | | | | | | | | | This is an improvement of r173630, that handles the following case: struct VirualDestrClass { VirualDestrClass(int arg); virtual ~VirualDestrClass(); }; struct ConstrWithCleanupsClass { ConstrWithCleanupsClass(const VirualDestrClass& cplx = VirualDestrClass(42)); }; ConstrWithCleanupsClass cwcNoArg; That was printed as: ConstrWithCleanupsClass cwcNoArg(); llvm-svn: 174296
* Drop value names from test to get -Asserts builds back to green.Benjamin Kramer2013-02-031-2/+2
| | | | llvm-svn: 174294
* CodeGen: Implement hint values for dynamic_cast as described in the Itanium ↵Benjamin Kramer2013-02-032-2/+112
| | | | | | | | | | | | | | | C++ ABI. This can yield dramatic speedups of dynamic_cast for simple inheritance trees, at least with libsupc++. Neither libcxxabi nor libcxxrt make use of this hint currently, it was never implemented because clang didn't support it. There was some concern about the number of class hierarchy walks this change introduces. If it turns out to be an issue we can add caching either at the cast pair level or even deeper, but we also do a lot of walks in Sema so this codepath is probably fairly optimized already. llvm-svn: 174293
* CodeGen: Remove unnecessary const_casts. No functionality change.Benjamin Kramer2013-02-031-7/+3
| | | | llvm-svn: 174292
* Fix bug in formatting of nested initializers.Daniel Jasper2013-02-032-1/+6
| | | | | | | | | | | | | We can now format: SomeArrayOfSomeType a = { { { 1, 2, 3 } }, { { 1, 2, 3 } }, { { 111111111111111111111111111111, 222222222222222222222222222222, 333333333333333333333333333333 } }, { { 1, 2, 3 } }, { { 1, 2, 3 } } }; Before, we did strange things there. llvm-svn: 174291
* Comment to XML conversion: replace string comparison with command ID comparisonDmitri Gribenko2013-02-031-3/+8
| | | | llvm-svn: 174290
* CodeGen: Mark the runtime function __dynamic_cast as readonly & nounwind.Benjamin Kramer2013-02-032-5/+12
| | | | | | This allows the optimizer to CSE dynamic_casts. llvm-svn: 174289
* Remove unneeded const_castsDmitri Gribenko2013-02-033-13/+7
| | | | llvm-svn: 174287
* libclang: wrap CXString implementation into 'namespace cxstring'Dmitri Gribenko2013-02-031-19/+24
| | | | | | This removes quite a few 'cxstring::' qualifications where they are obvious. llvm-svn: 174286
* libclang: remove 'using namespace cxstring'Dmitri Gribenko2013-02-0310-13/+3
| | | | llvm-svn: 174285
* libclang: migrate IndexingDeclVisitor to ConstDeclVisitorDmitri Gribenko2013-02-031-36/+38
| | | | llvm-svn: 174284
* libclang: remove unneeded const_castDmitri Gribenko2013-02-031-1/+1
| | | | llvm-svn: 174283
* Constify ASTContext::getObjContainingInterfaceDmitri Gribenko2013-02-032-5/+9
| | | | llvm-svn: 174282
* libclang: migrate USRGenerator to ConstDeclVisitorDmitri Gribenko2013-02-031-59/+62
| | | | llvm-svn: 174281
* libclang: remove unneeded const_castsDmitri Gribenko2013-02-032-4/+3
| | | | llvm-svn: 174280
* clang/test/CodeGenCXX/debug-info-class.cpp: Tweak to unbreak test for a few ↵NAKAMURA Takumi2013-02-031-2/+6
| | | | | | | | | | targets. - Relax a expression for arm-gnueabi. - Exclude msvc to limit target triplets to add limited a few targets. Feel free to remove actions if guys thought they redundant. llvm-svn: 174278
* Revert "[analyzer] Model trivial copy/move ctors with an aggregate bind."Jordan Rose2013-02-025-183/+17
| | | | | | | | | | | ...again. The problem has not been fixed and our internal buildbot is still getting hangs. This reverts r174212, originally applied in r173951, then reverted in r174069. Will not re-apply until the entire project analyzes successfully on my local machine. llvm-svn: 174265
* libclang: introduce cxstring::{createRef,createDup} for StringRefsDmitri Gribenko2013-02-0211-90/+111
| | | | | | Also migrate all clients from the old API. llvm-svn: 174263
* PR15132: Replace "address expression must be an lvalue or a functionRichard Smith2013-02-0212-28/+53
| | | | | | | | | | | | | | designator" diagnostic with more correct and more human-friendly "cannot take address of rvalue of type 'T'". For the case of & &T::f, provide a custom diagnostic, rather than unhelpfully saying "cannot take address of rvalue of type '<overloaded function type>'". For the case of &array_temporary, treat it just like a class temporary (including allowing it as an extension); the existing diagnostic wording for the class temporary case works fine. llvm-svn: 174262
* Correctly classify T{} as an array temporary if T is an array of class type ↵Richard Smith2013-02-022-15/+21
| | | | | | with nontrivial destructor. llvm-svn: 174261
* Add some horrible Perl code to teach scan-build to recursively walk a ↵Ted Kremenek2013-02-021-9/+22
| | | | | | directory for HTML files. llvm-svn: 174260
* Don't forget to run destructors when we create an array temporary of class type.Richard Smith2013-02-024-11/+81
| | | | llvm-svn: 174257
* Revert "Update checker build to checker-271."Ted Kremenek2013-02-022-15/+1
| | | | | | Turns out we didn't update scan-build to work with HTML files in nested directories. llvm-svn: 174256
* Fixed another whitespace issue... *sigh*.Michael Gottesman2013-02-021-3/+3
| | | | llvm-svn: 174255
* Fixed whitespace.Michael Gottesman2013-02-021-1/+1
| | | | llvm-svn: 174254
* On platforms which do not support ARC natively, do not mark ↵Michael Gottesman2013-02-022-7/+37
| | | | | | | | | objc_retain/objc_release as "nonlazybind". rdar://13108298. rdar://13129783. llvm-svn: 174253
* Update checker build to checker-271.Ted Kremenek2013-02-022-1/+15
| | | | llvm-svn: 174252
* Revert r174246, accidentally committed.David Blaikie2013-02-024-20/+2
| | | | | | This reverts commit 1513eb9284c23acfd19cf742b95996fbb11ca741. llvm-svn: 174249
OpenPOWER on IntegriCloud