summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Generalize ObjCMissingSuperCallChecker.Jordan Rose2012-12-132-47/+200
| | | | | | | | We now check a few methods for UIResponder, NSResponder, and NSDocument. Patch by Julian Mayer! llvm-svn: 170089
* Using CanQualType::getAs<ArrayType> is unsafe; fix the code currently using it,Eli Friedman2012-12-135-65/+30
| | | | | | and make sure additional uses don't get introduced. <rdar://problem/12858424>. llvm-svn: 170081
* docs: More reST conversion.Sean Silva2012-12-1323-3425/+3249
| | | | | | Sorry for the large commit, but it is much faster to convert in batches. llvm-svn: 170067
* [analyzer] Fix a self-init checker false positive.Anna Zaks2012-12-132-2/+32
| | | | | | | | | | | This is a Band-Aid fix to a false positive, where we complain about not initializing self to [super init], where self is not coming from the init method, but is coming from the caller to init. The proper solution would be to associate the self and it's state with the enclosing init. llvm-svn: 170059
* objc: DOn't complain if a (SEL) expression is typecastFariborz Jahanian2012-12-132-0/+5
| | | | | | to (SEL). Fixes // rdar://12859590 llvm-svn: 170058
* Add missing check for error return from DefaultLvalueConversion. Fixes ↵Eli Friedman2012-12-132-0/+13
| | | | | | <rdar://problem/12857416>. llvm-svn: 170056
* More hacking on mapDiagnosticRanges to make it handle more cases.Eli Friedman2012-12-132-26/+95
| | | | | | | | | | | | | | | | | | | | | | | | This still isn't quite right, but it fixes a crash. I factored out findCommonParent because we need it on the result of getImmediateExpansionRange: for a function macro, the beginning and end of an expansion range can come out of different macros/macro arguments, which means the resulting range is a complete mess to handle consistently. I also made some changes to how findCommonParent works; it works somewhat better in some cases, and somewhat worse in others, but I think overall it's a better balance. I'm coming to the conclusion that mapDiagnosticRanges isn't using the right algorithm, though: chasing the caret is fundamentally more complicated than any algorithm which only considers one FileID for the caret can handle because each SourceLocation doesn't really have a single parent. We need to follow the same path of choosing expansion locations and spelling locations which the caret used to come up with the correct range in the general case. Fixes <rdar://problem/12847524>. llvm-svn: 170049
* docs: Convert some docs to reST.Sean Silva2012-12-1213-3328/+2952
| | | | | | | | | | | | | | | Converts: LanguageExtensions LibASTMatchers LibTooling PCHInternals ThreadSanitizer Tooling Patch by Mykhailo Pustovit! (with minor edits by Dmitri Gribenko and Sean Silva) llvm-svn: 170048
* docs: Another test commit (sphinx autoupdating).Daniel Dunbar2012-12-121-1/+1
| | | | llvm-svn: 170047
* docs: Test commit (sphinx autoupdating).Daniel Dunbar2012-12-121-1/+1
| | | | llvm-svn: 170046
* docs: Initial Sphinx setup for Clang.Sean Silva2012-12-125-0/+616
| | | | | | | | | | | | I don't think this will be visible just yet on <clang.llvm.org/docs/> since I don't think that the necessary server-side setup has taken place. Don't shoot me over the theme. I don't want to duplicate LLVM's theme into the clang repo at the moment, so I just used one of Sphinx's default themes. llvm-svn: 170042
* [arcmt] When capturing ARC errors, have a sanity check to make sureArgyrios Kyrtzidis2012-12-121-1/+2
| | | | | | the diagnostic has a valid location. llvm-svn: 170040
* [objc] For the ARC error that is emitted when a synthesized property ↵Argyrios Kyrtzidis2012-12-127-40/+59
| | | | | | | | | | | | | | | implementation has inconsistent ownership with the backing ivar, point the error location to the ivar. Pointing to the ivar (instead of the @synthesize) is better since this is where a fix is needed. Also provide the location of @synthesize via a note. This also fixes the problem where an auto-synthesized property would emit an error without any location. llvm-svn: 170039
* [ms-inline asm] Test case for r170037.Chad Rosier2012-12-121-1/+4
| | | | llvm-svn: 170038
* Rewrite calls to bitcast unprototyped functions when emitting a definition.John McCall2012-12-123-78/+123
| | | | | | | | | | | | My variadics patch, r169588, changed these calls to typically be bitcasts rather than calls to a supposedly variadic function. This totally subverted a hack where we intentionally dropped excess arguments from such calls in order to appease the inliner and a "warning" from the optimizer. This patch extends the hack to also work with bitcasts, as well as teaching it to rewrite invokes. llvm-svn: 170034
* [driver] Don't warn about an unused -flto option.Chad Rosier2012-12-121-0/+4
| | | | | | rdar://12851905 llvm-svn: 170010
* [analyzer] Don't crash running destructors for multidimensional arrays.Jordan Rose2012-12-122-1/+29
| | | | | | | | | | We don't handle array destructors correctly yet, but we now apply the same hack (explicitly destroy the first element, implicitly invalidate the rest) for multidimensional arrays that we already use for linear arrays. <rdar://problem/12858542> llvm-svn: 170000
* Marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue Chad Rosier2012-12-126-13/+18
| | | | | | | | | | call sites as tail calls unconditionally. While it's theoretically true that this is just an optimization, it's an optimization that we very much want to happen even at -O0, or else ARC applications become substantially harder to debug. See r169796 for the llvm/fast-isel side of things. rdar://12553082 llvm-svn: 169996
* PR14581: Make SourceLocation::printToString work, or it will always return ↵Benjamin Kramer2012-12-121-1/+1
| | | | | | | | an empty string. No test case, this is debugging code. llvm-svn: 169980
* Speeds up parsing of global declarations in cases where the warningManuel Klimek2012-12-121-1/+4
| | | | | | | | | | is switched of by about 0.8% (tested with int i<N>). Additionally, this puts computing the diagnostic class into the hot path more when parsing, in preparation for upcoming optimizations in this area. llvm-svn: 169976
* clang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to ↵NAKAMURA Takumi2012-12-121-1/+2
| | | | | | | | llvm::sys::PathSeparator, that is ';' in Win32 hosts. Thanks to Bogon Kim! llvm-svn: 169964
* Don't warn about disabled macro expansion if we see the name of a ↵Richard Smith2012-12-122-4/+7
| | | | | | function-like macro which isn't immediately followed by '('. FreeBSD's stdio.h #defines foo(x) to (foo)(x), apparently. llvm-svn: 169960
* [libclang] Make sure tokens from preprocessor directives are annotated as such,Argyrios Kyrtzidis2012-12-122-12/+36
| | | | | | | | even if the directive is inside a declaration. Fixes rdar://11548788 & http://llvm.org/PR12970 llvm-svn: 169949
* Fix line ending is tests. No functional change.Richard Trieu2012-12-122-37/+37
| | | | llvm-svn: 169947
* clang/test: Suppress two tests on win32 for now, since, not sure, in r169829 ↵NAKAMURA Takumi2012-12-122-0/+6
| | | | | | | | to r169831. "ansi-escape-sequences" is easy convenient to exclude win32. Please be patient. llvm-svn: 169945
* Try to fix Win32 failuresDouglas Gregor2012-12-111-1/+1
| | | | llvm-svn: 169923
* Don't use 'touch' in this test; it may be the cause of Windows-related failures.Douglas Gregor2012-12-111-1/+1
| | | | llvm-svn: 169922
* Use @import rather than @__experimental_modules_import, since theDouglas Gregor2012-12-1170-131/+131
| | | | | | latter is rather a mess to type. llvm-svn: 169919
* Add SPIR32/SPIR64 targets to ClangGuy Benyei2012-12-113-0/+141
| | | | llvm-svn: 169917
* Add -fslp-vectorize to enable bb-vectorizeHal Finkel2012-12-113-0/+25
| | | | | | | | | | | Add -fslp-vectorize (with -ftree-slp-vectorize as an alias for gcc compatibility) to provide a way to enable the basic-block vectorization pass. This uses the same acronym as gcc, superword-level parallelism (SLP), also common in the literature, to refer to basic-block vectorization. Nadav suggested this as a follow-up to the adding of -fvectorize. llvm-svn: 169909
* objective-C blocks: Check for record type when deciding if Fariborz Jahanian2012-12-112-1/+8
| | | | | | | byref variable requires extended layout info. to prevent a crash involving arrays declared __block. // rdar://12787751 llvm-svn: 169908
* Don't complain about incomplete implementations for methods that areDouglas Gregor2012-12-112-2/+13
| | | | | | unavailable due to availability attributes. <rdar://problem/12798237> llvm-svn: 169903
* Speed up looking up static diagnostic infos.Benjamin Kramer2012-12-111-8/+41
| | | | | | | | | | | Instead of doing a binary search over the whole diagnostic table (which weighs a whopping 48k on x86_64), use the existing enums to compute the index in the table. This avoids loading any unneeded data from the table and avoids littering CPU caches with it. This code is in a hot path for code with many diagnostics. 1% speedup on -fsyntax-only gcc.c, which emits a lot of warnings. llvm-svn: 169890
* [driver] Add the -ftree-vectorize flag as a alias of -fvectorize to maintainChad Rosier2012-12-112-0/+6
| | | | | | | compatibility with gcc. rdar://12839978 llvm-svn: 169888
* Fix a copypasto bug. Also rename the parameter in question to not shadow theMatt Beaumont-Gay2012-12-111-3/+3
| | | | | | | | 'file' builtin, and fix up a docstring a little. Hat tip to Sebastian Kreft Carreno at Google for noticing the bug. llvm-svn: 169887
* [driver] Add the -fvectorize flag to enable the loop vectorization passes.Chad Rosier2012-12-113-0/+19
| | | | | | rdar://12839978 llvm-svn: 169885
* StmtDumper coding style changesAlexander Kornienko2012-12-111-105/+131
| | | | | | | | | | | | | | | | | | | | | Summary: A few small coding style changes for StmtDumper, including: - rename Dump* methods to dump* - uninline some methods - comment fixes - whitespace fixes Please review and commit if okay. Reviewers: alexfh Reviewed By: alexfh CC: cfe-commits, alexfh, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D190 llvm-svn: 169866
* Rename StmtDumper::DumpSubTree() to dumpStmt()Alexander Kornienko2012-12-111-86/+84
| | | | | | | | | | | | | | | | | Summary: Also rename DumpDeclarator() to dumpDecl(). Once Decl dumping is added, these will be the two main methods of the class, so this is just for consistency in naming. There was a DumpStmt() method already, but there was no point in having it, so I have merged it into VisitStmt(). Similarly, DumpExpr() is merged into VisitExpr(). Reviewers: alexfh Reviewed By: alexfh CC: cfe-commits, alexfh Differential Revision: http://llvm-reviews.chandlerc.com/D156 llvm-svn: 169865
* Extend stat query APIs to explicitly specify if the query is forArgyrios Kyrtzidis2012-12-117-36/+35
| | | | | | | | | | a file or directory, allowing just a stat call if a file descriptor is not needed. Doing just 'stat' is faster than 'open/fstat/close'. This has the effect of cutting down system time for validating the input files of a PCH. llvm-svn: 169831
* [PCH] Remove redundant stat call when validating the input files.Argyrios Kyrtzidis2012-12-111-11/+2
| | | | | | This became redundant after we removed the stat cache. llvm-svn: 169830
* [PCH] When writing out the list of input files, avoid emitting duplicateArgyrios Kyrtzidis2012-12-111-1/+6
| | | | | | | | | entries of the same file. This can happen because the file was "included" multiple times and is referenced by multiple SLocEntries. llvm-svn: 169829
* clang/test/Driver/linker-opts.c: Fix XFAIL that I removed win32.NAKAMURA Takumi2012-12-111-0/+1
| | | | | | Sorry for my 3rd commit :( llvm-svn: 169827
* clang/test/Driver/debug-options-as.c: Fixup not to use prefix=S. I didn't ↵NAKAMURA Takumi2012-12-111-3/+3
| | | | | | know "REQUIRES:" would match --check-prefix=S ... llvm-svn: 169826
* clang/test/Driver: Introduce the feature "clang-driver", set if gcc driver ↵NAKAMURA Takumi2012-12-118-5/+14
| | | | | | | | is not used. It is not set at targetting cygming. See PR12920. llvm-svn: 169824
* BackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"NAKAMURA Takumi2012-12-111-0/+1
| | | | | | llvm/Target/TargetMachine.h will not provide "llvm/TargetTransformInfo.h" any more. llvm-svn: 169816
* Add tests for a corner case of when to relax all instructions:Rafael Espindola2012-12-112-0/+8
| | | | | | | | | | | | | | | | We don't want to relax all instructions in $ clang -c test.s since most users don't pass -O when using the driver to assemble. On the other hand, -save-temps should not change the output unnecessary, so in $ clang -c test.c -save-temps we should relax all instructions. llvm-svn: 169815
* PR14558: Compute triviality of special members (etc) at the end of the classRichard Smith2012-12-115-103/+149
| | | | | | | | | definition, rather than at the end of the definition of the set of nested classes. We still defer checking of the user-specified exception specification to the end of the nesting -- we can't check that until we've parsed the in-class initializers for non-static data members. llvm-svn: 169805
* [analyzer] Don't generate a summary for "freeWhenDone" if method isAnna Zaks2012-12-112-0/+18
| | | | | | | | | inlined. Fixes a false positive that occurs if a user writes their own initWithBytesNoCopy:freeWhenDone wrapper. llvm-svn: 169795
* Remove until I can fix this.Bill Wendling2012-12-101-20/+0
| | | | llvm-svn: 169778
* Add support to Darwin for the -export_dynamic' flag to the linker.Bill Wendling2012-12-101-0/+3
| | | | llvm-svn: 169775
OpenPOWER on IntegriCloud