summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [Headers] Use standard builtin defines instead of typeof trickery.Daniel Dunbar2013-02-061-2/+2
| | | | | | | - The trickery can confuse more basic source processors, in particular the Unix conformance tool that wants to scan headers. llvm-svn: 174475
* Added test for r174461 that checks that the desired behavior also occurs in ↵Michael Gottesman2013-02-061-0/+8
| | | | | | | | ObjC++ alongside ObjC. \end paranoia. llvm-svn: 174471
* [analyzer]Revert part of r161511; suppresses leak false positives in C++Anna Zaks2013-02-064-23/+46
| | | | | | | | | | | This is a "quick fix". The underlining issue is that when a const pointer to a struct is passed into a function, we do not invalidate the pointer fields. This results in false positives that are common in C++ (since copy constructors are prevalent). (Silences two llvm false positives.) llvm-svn: 174468
* Adding armv7l default to cortex-a8Renato Golin2013-02-051-0/+1
| | | | llvm-svn: 174466
* Changed CGObjCMac.cpp to add the marker externally_initialized to ↵Michael Gottesman2013-02-055-8/+18
| | | | | | | | | | | | | SELECTOR_REFERENCES in both the fragile and non-fragile API. This is to ensure that GlobalOpt in LLVM does not attempt to look through a selector reference to a method var name at compile time. I also added a test/updated old tests that need to recognize the new keyword. rdar://12580965. llvm-svn: 174461
* Add note why we used a switch.Ted Kremenek2013-02-051-0/+1
| | | | llvm-svn: 174449
* Minor tweak to install docsDouglas Gregor2013-02-051-1/+1
| | | | llvm-svn: 174448
* Change subexpressions to be visited in the CFG from left-to-right.Ted Kremenek2013-02-058-129/+304
| | | | | | | | | | | | | | | | | This is a more natural order of evaluation, and it is very important for visualization in the static analyzer. Within Xcode, the arrows will not jump from right to left, which looks very visually jarring. It also provides a more natural location for dataflow-based diagnostics. Along the way, we found a case in the analyzer diagnostics where we needed to indicate that a variable was "captured" by a block. -fsyntax-only timings on sqlite3.c show no visible performance change, although this is just one test case. Fixes <rdar://problem/13016513> llvm-svn: 174447
* Remove an uninteresting noteDouglas Gregor2013-02-051-3/+0
| | | | llvm-svn: 174441
* [analyzer] Teach the analyzer to use a symbol for p when evaluatingAnna Zaks2013-02-052-11/+27
| | | | | | | | (void*)p. Addresses the false positives similar to the test case. llvm-svn: 174436
* [analyzer] add commentAnna Zaks2013-02-051-1/+5
| | | | llvm-svn: 174435
* [analyzer] Fix typo, better doxygen as per Jordan's feedback.Anna Zaks2013-02-051-3/+3
| | | | llvm-svn: 174434
* [analyzer] Add a doc describing the internals of RegionStore.Jordan Rose2013-02-051-0/+171
| | | | | | | | This is a text file with Markdown-ish formatting because we haven't decided where analyzer internal documents should go, but it's probably better to have this in source control than sitting on my local drive forever. llvm-svn: 174398
* [arcmt] Make sure the objc migrators work fine when used with a PCH.Argyrios Kyrtzidis2013-02-055-2/+74
| | | | | | rdar://13140508 llvm-svn: 174386
* [frontend] Don't put a PCH/PTH filename into the set of includes in the ↵Argyrios Kyrtzidis2013-02-054-18/+28
| | | | | | | | | | | | | preprocessor options; since only one of them is allowed in command-line, process them separately. Otherwise, if more than one is specified in the command-line, one is processed normally and the others are going to be treated and included as header files. Related to radar://13140508 llvm-svn: 174385
* 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
OpenPOWER on IntegriCloud