summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Use new Triple::getMacOSXVersion function.Bob Wilson2012-01-311-31/+6
| | | | llvm-svn: 149439
* arc migrator: twik previous patch to exclude user providedFariborz Jahanian2012-01-311-1/+1
| | | | | | explicit type cast. // rdar://10521744 llvm-svn: 149437
* arc migrator: Do not attempt to migrate to bridge casts which Fariborz Jahanian2012-01-311-0/+15
| | | | | | | cancel out each other. Leave it alone so users can take a look (unmigrated code forces error diagnostic). // rdar://10521744 llvm-svn: 149435
* Split compiler builtin module into "stdlib" builtins and "intrinsic"Douglas Gregor2012-01-312-38/+56
| | | | | | | | builds, and bring mm_alloc.h into the fold. Start playing some tricks with these builtin modules to mirror the include_next tricks that the headers already perform. llvm-svn: 149434
* Fix more fallout from the introduction of "macosx" and "ios" triples.Bob Wilson2012-01-311-10/+37
| | | | | | | | | | | | The Darwin toolchain constructor was assuming that all Darwin triples would have an OS string starting with "darwin". Triples starting with "macosx" would misinterpret the version number, and "ios" triples would completely miss the version number (or worse) because the OS name is not 6 characters long. We lose some sanity checking of triple strings here, since the Triple.getOSVersion function doesn't do all the checking that the previous code did, but this still seems like a step in the right direction. llvm-svn: 149422
* [analyzer] Add checks for common anti-patterns in strncat.Anna Zaks2012-01-314-8/+215
| | | | | | | (Since this is syntax only, might be a good candidate for turning into a compiler warning.) llvm-svn: 149407
* [analyzer] Change the warning to suggest 'strlcat/strlcpy' asAnna Zaks2012-01-311-2/+2
| | | | | | replacements for 'starcat/strcpy' instead of 'strncat/strncpy'. llvm-svn: 149406
* Fix 80-column violation.Chad Rosier2012-01-311-1/+2
| | | | llvm-svn: 149405
* Revert r149359. This was a hack to a problem with an easy workaround, and ↵Ted Kremenek2012-01-311-14/+4
| | | | | | it doesn't feel like general solution. llvm-svn: 149404
* Pacify gcc's -Wreturn-type.Matt Beaumont-Gay2012-01-311-0/+1
| | | | | | | A separate unreachable message will make it easier to debug if either of the unreachables is reached. llvm-svn: 149402
* Support @compatibility_alias at run time (GNUstep Runtime)David Chisnall2012-01-314-2/+63
| | | | | | Patch by Niels Grewe! llvm-svn: 149401
* fix a crash on:Chris Lattner2012-01-311-1/+2
| | | | | | | | | | __has_builtin in an empty file, as we were overwriting the EOF token. Overwriting an arbitrary token never seems like a good idea in the error case. This fixes a bug reported on the GCC list :) llvm-svn: 149397
* FormatCheckers should emit all diagnostics using EmitFormatDiagnostic().Jean-Daniel Dupas2012-01-311-15/+21
| | | | llvm-svn: 149394
* Format string warnings: don't a.k.a. wchar_t with wchar_t.Hans Wennborg2012-01-311-1/+1
| | | | | | | | | | | This fixes the case where Clang would output: error: format specifies type 'wchar_t *' (aka 'wchar_t *') ArgTypeResult::getRepresentativeTypeName needs to take into account that wchar_t can be a built-in type (as opposed to in C, where it is a typedef). llvm-svn: 149387
* [CFG] Removed unused local variable.Erik Verbruggen2012-01-311-2/+0
| | | | llvm-svn: 149385
* Don't zero terminate the bitmap twice.Benjamin Kramer2012-01-311-1/+1
| | | | llvm-svn: 149377
* constexpr: the result of a relational operator between pointers to void isRichard Smith2012-01-311-0/+12
| | | | | | | unspecified unless the pointers are equal; therefore, such a comparison is not a constant expression unless the pointers are equal. llvm-svn: 149366
* ConstantArray::get() (for strings) is going away, useChris Lattner2012-01-316-42/+41
| | | | | | | | | | | | ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149363
* Don't warn about -Wshorten-64-to-32 in unreachable code. Fixes ↵Ted Kremenek2012-01-311-4/+14
| | | | | | <rdar://problem/10759934>. Apparently this is a common idiom in Linux (among other places). llvm-svn: 149359
* Make a bunch of local functions 'static'.Ted Kremenek2012-01-311-22/+23
| | | | llvm-svn: 149358
* enhance some optimization logic to handle ConstantDataSequentialChris Lattner2012-01-311-9/+26
| | | | | | as well as ConstantArray. llvm-svn: 149347
* constexpr: catch a collection of integral undefined behaviors:Richard Smith2012-01-311-10/+57
| | | | | | | | | -INT_MIN and INT_MIN / -1 Shift by a negative or too large quantity Left shift of negative value Overflow in left shift llvm-svn: 149344
* Reapply r149311 which I reverted by mistake.Argyrios Kyrtzidis2012-01-313-22/+24
| | | | | | | | | | Original log: Convert ProgramStateRef to a smart pointer for managing the reference counts of ProgramStates. This leads to a slight memory improvement, and a simplification of the logic for managing ProgramState objects. # Please enter the commit message for your changes. Lines starting llvm-svn: 149339
* Revert r149083 which is not the direction we're going in the ClangChandler Carruth2012-01-315-98/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver based on discussions with Doug Gregor. There are several issues: 1) The patch was not reviewed prior to commit and there were review comments. 2) The design of the functionality (triple-prefixed tool invocation) isn't the design we want for Clang going forward: it focuses on the "user triple" rather than on the "toolchain triple", and forces that bit of state into the API of every single toolchain instead of handling it automatically in the common base classes. 3) The tests provided are not stable. They fail on a few Linux variants (Gentoo among them) and on mingw32 and some other environments. I *am* interested in the Clang driver being able to invoke triple-prefixed tools, but we need to design that feature the right way. This patch just extends the previous hack without fixing the underlying problems with it. I'm working on a new design for this that I will mail for review by tomorrow. I am aware that this removes functionality that NetBSD relies on, but this is ToT, not a release. This functionality hasn't been properly designed, implemented, and tested yet. We can't "regress" until we get something that really works, both with the immediate use cases and with long term maintenance of the Clang driver. For reference, the original commit log: Keep track of the original target the user specified before normalization. This used to be captured in DefaultTargetTriple and is used for the (optional) $triple-$tool lookup for cross-compilation. Do this properly by making it an attribute of the toolchain and use it in combination with the computed triple as index for the toolchain lookup. llvm-svn: 149337
* Revert r149311 which failed to compile.Argyrios Kyrtzidis2012-01-313-24/+22
| | | | | | | | | Original log: Convert ProgramStateRef to a smart pointer for managing the reference counts of ProgramStates. This leads to a slight memory improvement, and a simplification of the logic for managing ProgramState objects. llvm-svn: 149336
* Fix "long double" and __SIZE_TYPE__ on powerpc, now with test fix.Nico Weber2012-01-311-1/+5
| | | | | | Fixes PR11867. Patch from Jeremy Huddleston! llvm-svn: 149334
* constexpr: remove integral conversion overflow checking introduced in r149286.Richard Smith2012-01-311-7/+0
| | | | | | | As Eli points out, this is implementation-defined, and the way we define it makes this fine. llvm-svn: 149327
* Let %S, %ls, %C match 16bit types in NSStrings.Nico Weber2012-01-312-4/+12
| | | | | | As discussed at http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120130/052200.html llvm-svn: 149325
* Clean up switch in Expr::CanThrow. No functional change.Eli Friedman2012-01-311-22/+75
| | | | llvm-svn: 149321
* Minor refactor within ExplodedGraph::reclaimRecentlyAllocatedNodes(). No ↵Ted Kremenek2012-01-311-64/+76
| | | | | | functionality change. llvm-svn: 149320
* Convert checker over to using ProgramStateRef.Ted Kremenek2012-01-311-4/+4
| | | | llvm-svn: 149319
* Convert ProgramStateRef to a smart pointer for managing the reference counts ↵Ted Kremenek2012-01-313-22/+24
| | | | | | | | of ProgramStates. This leads to a slight memory improvement, and a simplification of the logic for managing ProgramState objects. llvm-svn: 149311
* Revert r149285, it breaks test/Preprocessor/init.c.Nico Weber2012-01-301-5/+1
| | | | llvm-svn: 149301
* test for a v-table dispatch that consumes anFariborz Jahanian2012-01-301-2/+16
| | | | | | | argument. twik to support the test case. // rdar://10444476 llvm-svn: 149298
* constexpr: disallow signed integer overflow in integral conversions in constantRichard Smith2012-01-302-12/+33
| | | | | | expressions in C++11. llvm-svn: 149286
* Fix "long double" and __SIZE_TYPE__ on powerpc.Nico Weber2012-01-301-1/+5
| | | | | | Fixes PR11867. Patch from Jeremy Huddleston! llvm-svn: 149285
* Remove tgmath.h from the module map for now, because it currently causes aDouglas Gregor2012-01-301-4/+1
| | | | | | | cyclic module dependency due to its inclusion of math.h and complex.h. I'll take another shot at it later. llvm-svn: 149283
* objc-arc: Perform null check on receiver before sending methods whichFariborz Jahanian2012-01-301-3/+52
| | | | | | | | | consume one or more of their arguments. If not done, this will cause a leak as method will not consume the argument when receiver is null. In this patch, the null path releases consumed argument. // rdar://10444474 llvm-svn: 149279
* [analyzer] Rename the checker as per Ted's comment. Remove the referenceAnna Zaks2012-01-302-5/+6
| | | | | | from the driver. llvm-svn: 149276
* Disable "non literal format string" for NSString that result from a macro ↵Jean-Daniel Dupas2012-01-301-0/+7
| | | | | | | | | expansion. This is to prevent diagnostic when using NSLocalizedString or CFCopyLocalizedString macros which are usually used in place of NS and CF strings literals. llvm-svn: 149268
* [analyzer] Make osx.cocos.CFContainersSyntax a default checker.Anna Zaks2012-01-301-4/+4
| | | | llvm-svn: 149258
* Fix typo spotted by Sebastian. Thanks!Douglas Gregor2012-01-301-1/+1
| | | | llvm-svn: 149257
* Per discussion on cxx-abi-dev, don't drop leading zeroes from theJohn McCall2012-01-301-9/+33
| | | | | | | | | mangling of floating-point literals. I just went ahead and reimplemented toString() here; if someone wants to generalize the library routine to do this, or feels strongly that we should be post-processing, please feel free. llvm-svn: 149256
* SmallBitVectorize the deduced parameter set.Benjamin Kramer2012-01-303-30/+22
| | | | llvm-svn: 149253
* Remove long dead code for handling vector shift by immediate builtins.Craig Topper2012-01-301-107/+0
| | | | llvm-svn: 149237
* Update on format attribute handling.Jean-Daniel Dupas2012-01-301-58/+40
| | | | | | | - Remove the printf0 special handling as we treat it as printf anyway. - Perform basic checks (non-literal, empty) for all formats and not only printf/scanf. llvm-svn: 149236
* Remove custom handling for cmpsd/cmpss/cmppd/cmpps builtins. The builtins ↵Craig Topper2012-01-301-16/+0
| | | | | | are now in IntrinsicsX86.td. llvm-svn: 149235
* Cleanup 3dnow builtin handling. Most of them were already handled by LLVM ↵Craig Topper2012-01-302-118/+2
| | | | | | connecting intrinsics and builtins in IntrinsicsX86.td. llvm-svn: 149233
* [analyzer] Add index out of bounds check for CFArrayGetArrayAtIndex.Anna Zaks2012-01-304-2/+170
| | | | llvm-svn: 149228
* Introduce TargetInfo::hasFeature() to query various feature names inDouglas Gregor2012-01-303-3/+185
| | | | | | | | | | | | | | each of the targets. Use this for module requirements, so that we can pin the availability of certain modules to certain target features, e.g., provide a module for xmmintrin.h only when SSE support is available. Use these feature names to provide a nearly-complete module map for Clang's built-in headers. Only mm_alloc.h and unwind.h are missing, and those two are fairly specialized at the moment. Finishes <rdar://problem/10710060>. llvm-svn: 149227
OpenPOWER on IntegriCloud