summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* objc-arc: Support objc_arc_weak_unavailable on thoseFariborz Jahanian2011-07-067-1/+67
| | | | | | | classes which are incompatible with weak references. // rdar://9693477 llvm-svn: 134522
* Don't try to type-check a copy construction of an exceptionDouglas Gregor2011-07-062-1/+18
| | | | | | | declaration with dependent type. Fixes PR10232 / <rdar://problem/9700653>. llvm-svn: 134515
* Update docs to remove reference to OverloadedFunctionDecl and replace it ↵Jonathan D. Turner2011-07-061-4/+4
| | | | | | with DeclContext::lookup_result. llvm-svn: 134514
* Keep track of when "unrecoverable" errors occur, then allowDouglas Gregor2011-07-065-5/+32
| | | | | | | clang_saveTranslationUnit() to save a PCH file if the only errors it contains are recoverable errors. Fixes <rdar://problem/9727804>. llvm-svn: 134503
* SmallVectorize a critical vector.Benjamin Kramer2011-07-061-1/+1
| | | | | | | The small number of elements was determined by taking the median file length in clang+llvm and /usr/include on OS X with xcode installed. llvm-svn: 134496
* libclang: Allow callers of clang_saveTranslationUnit() to distinguishDouglas Gregor2011-07-065-13/+73
| | | | | | | between different classes of errors. Addresses most of <rdar://problem/9660328>. llvm-svn: 134495
* Build up statistics about the work done for analysis based warnings.Chandler Carruth2011-07-068-17/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Special detail is added for uninitialized variable analysis as this has serious performance problems than need to be tracked. Computing some of this data is expensive, for example walking the CFG to determine its size. To avoid doing that unless the stats data is going to be used, we thread a bit into the Sema object to track whether detailed stats should be collected or not. This bit is used to avoid computations whereever the computations are likely to be more expensive than checking the state of the flag. Thus, counters are in some cases unconditionally updated, but the more expensive (and less frequent) aggregation steps are skipped. With this patch, we're able to see that for 'gcc.c': *** Analysis Based Warnings Stats: 232 functions analyzed (0 w/o CFGs). 7151 CFG blocks built. 30 average CFG blocks per function. 1167 max CFG blocks per function. 163 functions analyzed for uninitialiazed variables 640 variables analyzed. 3 average variables per function. 94 max variables per function. 96409 block visits. 591 average block visits per function. 61546 max block visits per function. And for the reduced testcase in PR10183: *** Analysis Based Warnings Stats: 98 functions analyzed (0 w/o CFGs). 8526 CFG blocks built. 87 average CFG blocks per function. 7277 max CFG blocks per function. 68 functions analyzed for uninitialiazed variables 1359 variables analyzed. 19 average variables per function. 1196 max variables per function. 2540494 block visits. 37360 average block visits per function. 2536495 max block visits per function. That last number is the somewhat scary one that indicates the problem in PR10183. llvm-svn: 134494
* Teach the static analyzer's interpretation of Cocoa conventions toDouglas Gregor2011-07-064-8/+39
| | | | | | | obey the objc_method_family attribute when provided. Fixes <rdar://problem/9726279>. llvm-svn: 134493
* Use attributes from the definition (if available) whenRafael Espindola2011-07-063-3/+24
| | | | | | | | instantiating functions. Fixes PR10272. llvm-svn: 134491
* Fix C&P errorJoerg Sonnenberger2011-07-061-1/+1
| | | | llvm-svn: 134490
* When tree-transforming an expression sequence, always flag expandedJohn McCall2011-07-062-5/+18
| | | | | | | | | | variadic argument pack expansions as having changed, rather than doing it for each changed expansion, which leaves out zero-argument packs with catastrophic consequences. Fixes PR10260. llvm-svn: 134483
* Fixed enum types can be complete without actually being valid to useJohn McCall2011-07-065-7/+54
| | | | | | | as scope specifiers; diagnose the attempt, rather than letting it go to an assert. The rest of PR10264. llvm-svn: 134479
* Properly protect colons when parsing a nested-name-specifier as partJohn McCall2011-07-062-11/+27
| | | | | | | of an enum specifier in dialects which permit fixed underlying types. Fixes the rejects-valid part of PR10264. llvm-svn: 134468
* Improve the Python bindings for libclang in a few ways, from EliDouglas Gregor2011-07-067-12/+44
| | | | | | | | | | | | | | | | | Bendersky. Specifically: * Implemented a new function in libclang: clang_isAttribute * Fixing TranslationUnit.get_includes to only go through the argument * buffer when it contains something. This fixed a crash on Windows * clang_getFileName returns CXString, not char*. Made appropriate * fixes in cindex.py - now the relevant tests pass and we can see the * full locations correctly again (previously there was garbage in * place of the file name) * Exposed clang_getCursorDisplayName to the python bindings llvm-svn: 134460
* Somehow the -fgnu-runtime option itself got lost in all that shuffling.John McCall2011-07-062-2/+9
| | | | | | Restore it. llvm-svn: 134459
* Call objc_terminate() instead of abort() when a cleanup throws anJohn McCall2011-07-069-4/+68
| | | | | | | exception in Objective-C; in Objective-C++ we still use std::terminate(). This is only available in very recent runtimes. llvm-svn: 134456
* Missing header from last commit; accidental change.John McCall2011-07-062-1/+39
| | | | llvm-svn: 134455
* Added a missing case label.Fariborz Jahanian2011-07-061-0/+1
| | | | llvm-svn: 134454
* Change the driver's logic about Objective-C runtimes: abstract out aJohn McCall2011-07-0655-128/+171
| | | | | | | | | | | | structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. llvm-svn: 134453
* objc-arc: enforce performSelector rules in rejecting retaining selectorsFariborz Jahanian2011-07-057-1/+132
| | | | | | | passed to it, and unknown selectors causing potential leak. // rdar://9659270 llvm-svn: 134449
* Add the ObjC ARC optimization passes manually, now that they're notDan Gohman2011-07-053-7/+45
| | | | | | hardwired into the default pass list. llvm-svn: 134445
* Remove unused member of Builtin::Info.Eli Friedman2011-07-053-24/+15
| | | | llvm-svn: 134443
* Testcase for r134441.Devang Patel2011-07-051-0/+35
| | | | llvm-svn: 134442
* Drop "soft" argument that would be considered as file argument by cc1.Joerg Sonnenberger2011-07-051-1/+0
| | | | llvm-svn: 134438
* Look through parenthesized declarators when determining whether anDouglas Gregor2011-07-052-1/+9
| | | | | | | instantiated function template was written with a prototype or via some kind of typedef. Fixes PR10273 / <rdar://problem/9723679>. llvm-svn: 134426
* Hook up mipsel-netbsd and mipsel-freebsd for OS specific handling.Joerg Sonnenberger2011-07-051-4/+11
| | | | llvm-svn: 134425
* Use OS-specific configuration for mips-netbsd and mips-freebsd.Joerg Sonnenberger2011-07-051-4/+11
| | | | llvm-svn: 134422
* Some documentation fixes for the parser, from John FreemanDouglas Gregor2011-07-052-27/+2
| | | | llvm-svn: 134419
* StringRef'ize clang::drive::Option::getName(), from Zach Wheeler!Douglas Gregor2011-07-054-14/+15
| | | | llvm-svn: 134418
* Clean up and refactor ParseFunctionDeclarator to reduce codeDouglas Gregor2011-07-052-254/+197
| | | | | | repetition and better reflect the actual grammar, from John Freeman! llvm-svn: 134417
* ActOnCXXConditionDeclaration should take into account thatDouglas Gregor2011-07-052-1/+13
| | | | | | ActOnDeclarator can return NULL. Fixes PR10270, from Hans Wennborg! llvm-svn: 134416
* Don't define __CONSTANT_CFSTRINGS__ with -fno-constant-cfstrings issue.Fariborz Jahanian2011-07-051-1/+2
| | | | | | Patch by Jean-Daniel Dupas. llvm-svn: 134414
* Don't define _BIG_ENDIAN for NetBSD/PowerPC.Joerg Sonnenberger2011-07-051-1/+2
| | | | llvm-svn: 134411
* Fix indentationJoerg Sonnenberger2011-07-051-3/+3
| | | | llvm-svn: 134410
* Teach Clang's <float.h> to also include MinGW's <float.h>, which provides ↵Douglas Gregor2011-07-051-0/+42
| | | | | | additional system definitions, from Ruben Van Boxem llvm-svn: 134407
* Update header-search paths for MinGW, from Ruben Van BoxemDouglas Gregor2011-07-051-0/+2
| | | | llvm-svn: 134406
* Don't overread the buffer when an %x escape in inline asm ends prematurely.Benjamin Kramer2011-07-051-0/+4
| | | | | | Tested by valgrind & Sema/asm.c. llvm-svn: 134404
* Initialize member.Benjamin Kramer2011-07-051-1/+2
| | | | llvm-svn: 134403
* Add explicit default case for -Wswitch-enum.Joerg Sonnenberger2011-07-041-0/+2
| | | | llvm-svn: 134399
* Use switch(os) style consistently. Add a bunch of NetBSD branches.Joerg Sonnenberger2011-07-041-10/+27
| | | | llvm-svn: 134393
* On PowerPC, both FreeBSD and NetBSD use ints for (s)size_tJoerg Sonnenberger2011-07-041-1/+5
| | | | llvm-svn: 134392
* Remove unused parameter from ActOnDeclarator.Anders Carlsson2011-07-042-5/+3
| | | | llvm-svn: 134377
* Switch the Decl and Stmt stats printing to use llvm::errs() instead ofChandler Carruth2011-07-042-15/+16
| | | | | | | fprintf, and to be more consistent in formatting with the other stats printing routines. llvm-svn: 134374
* Start switching the AST stats printing to use llvm::errs() instead ofChandler Carruth2011-07-042-27/+28
| | | | | | fprintf. There is more cleanup to be done to the AST stats printing... llvm-svn: 134373
* fix typoChris Lattner2011-07-031-1/+1
| | | | llvm-svn: 134361
* Rewritten fix in r134139 to conform evaluation result to original evaluation ↵Abramo Bagnara2011-07-021-11/+21
| | | | | | context. llvm-svn: 134320
* Fix a typo, remove a tab, canonicalize some spacing. No functional change.Nick Lewycky2011-07-021-3/+3
| | | | llvm-svn: 134305
* Reorganize builtins to separate out builtins which require MMX registers. ↵Eli Friedman2011-07-021-38/+44
| | | | | | No functional change. llvm-svn: 134304
* When producing -Wuninitialized Fix-Its for pointers, prefer " = NULL"Douglas Gregor2011-07-021-1/+9
| | | | | | over "= 0". Fixes <rdar://problem/9714386>. llvm-svn: 134302
* Don't use x86_mmx where it isn't necessary.Eli Friedman2011-07-022-6/+4
| | | | | | The start of some work on getting -mno-mmx working the way we want it to. llvm-svn: 134300
OpenPOWER on IntegriCloud