Commit Graph

57228 Commits

Author SHA1 Message Date
Fariborz Jahanian 78be1651e2 Nonfragile ivar synthesis with property is in a continuation
class.

llvm-svn: 68234
2009-04-01 19:37:34 +00:00
Daniel Dunbar d854c8d8a6 Driver: Add freebsd::Link
- Patch by Ed Schouten!

llvm-svn: 68233
2009-04-01 19:36:32 +00:00
Ted Kremenek 3278893a1a Update CMake file. Patch by Brian Diekelman!
llvm-svn: 68232
2009-04-01 19:11:05 +00:00
Daniel Dunbar dae1d347df Support CCC_ADD_ARGS in new driver.
llvm-svn: 68231
2009-04-01 19:08:46 +00:00
Douglas Gregor b4b81d8ab1 Revert r68221, -ftrapv support, which causes several regressions in
Clang's test suite.

llvm-svn: 68230
2009-04-01 18:59:55 +00:00
Evan Cheng 856e339241 Recognize arm triplets.
llvm-svn: 68229
2009-04-01 18:54:56 +00:00
Ted Kremenek ed47d79cc2 BugReporter: for extensive path diagnostics:
- When processing BlockEdges with terminators, using the condition as the
  control-flow point for terminators that are expressions (e.g., '&&', '?')
- When processing events, allow intra-compound statement "jumping"

llvm-svn: 68228
2009-04-01 18:48:52 +00:00
Dan Gohman cff6953c45 Use CHAR_BIT instead of hard-coding 8 in several places where it
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.

llvm-svn: 68227
2009-04-01 18:45:54 +00:00
Daniel Dunbar 7fdda1d695 Split PTH tests from carbon.c into separate test.
llvm-svn: 68223
2009-04-01 18:25:32 +00:00
Ted Kremenek 061cf25072 Constify method to make VC++ happy. Patch by Brian Diekelman!
llvm-svn: 68222
2009-04-01 18:24:22 +00:00
Mike Stump fbc8c132ba Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is.

llvm-svn: 68221
2009-04-01 18:19:33 +00:00
Daniel Dunbar 9ff631039c Forgot to remove trailing &&
llvm-svn: 68220
2009-04-01 18:11:41 +00:00
Dan Gohman 0170402fe8 Use LLVM type names instead of C type names in comments, to be
less ambiguous and less C-specific.

llvm-svn: 68219
2009-04-01 18:10:16 +00:00
Bob Wilson cf1ec2cc68 Fix PR3862: Recognize some ARM-specific constraints for immediates in inline
assembly.

llvm-svn: 68218
2009-04-01 17:58:54 +00:00
Ted Kremenek 9ce13241ff BugReporter: for extensive PathDiagnostic generation, add control-flow from the
start of the function/method.

llvm-svn: 68217
2009-04-01 17:52:26 +00:00
Ted Kremenek 45a75f718c BugReporter: For the "extensive" PathDiagnostic generation algorithm, elide most
intra-compound statement jumps unless they are between terminators (i.e.,
branches).

llvm-svn: 68216
2009-04-01 17:18:21 +00:00
Daniel Dunbar f46945b274 Ted & I crossed paths here, these tests are in cocoa-pth.m now.
llvm-svn: 68215
2009-04-01 16:59:39 +00:00
Fariborz Jahanian 95c802cc03 Removed the test case, as Chris did have a test case in the patch.
llvm-svn: 68214
2009-04-01 16:53:37 +00:00
Fariborz Jahanian df3a9f92b3 Test case for Chris's patch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=68177

llvm-svn: 68213
2009-04-01 16:51:23 +00:00
Douglas Gregor 7c15b9c9a0 Add testcase for -Wmissing-prototypes
llvm-svn: 68212
2009-04-01 16:38:48 +00:00
Dan Gohman c4971721ea Revert r68172. It caused regressions in
Applications/Burg/burg
  Applications/ClamAV/clamscan
and many other tests.

llvm-svn: 68211
2009-04-01 16:37:47 +00:00
Douglas Gregor 60f3c95926 Add some examples of Fix-it hints to our documentation
llvm-svn: 68210
2009-04-01 16:24:40 +00:00
Misha Brukman 23fe17f55b Fixed spelling.
llvm-svn: 68209
2009-04-01 16:13:29 +00:00
Steve Naroff 29cae66bde Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.
#ifdef'd out the 5 conversion routines that we don't currently need.

Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this.

Expect to remove the FIXME today...

llvm-svn: 68208
2009-04-01 15:50:34 +00:00
Douglas Gregor 2e0757f319 Give Type::getDesugaredType a "for-display" mode that can apply more
heuristics to determine when it's useful to desugar a type for display
to the user. Introduce two C++-specific heuristics:

  - For a qualified type (like "foo::bar"), only produce a new
    desugred type if desugaring the qualified type ("bar", in this
    case) produces something interesting. For example, if "foo::bar"
    refers to a class named "bar", don't desugar. However, if
    "foo::bar" refers to a typedef of something else, desugar to that
    something else. This gives some useful desugaring such as
    "foo::bar (aka 'int')".
  - Don't desugar class template specialization types like
    "basic_string<char>" down to their underlying "class
    basic_string<char, char_traits<char>, allocator<char>>, etc.";
    it's better just to leave such types alone. 

Update diagnostics.html with some discussion and examples of type
preservation in C++, showing qualified names and class template
specialization types.

llvm-svn: 68207
2009-04-01 15:47:24 +00:00
Ted Kremenek d28577651e CMake: Have generated Xcode projects also contain the LLVM header files.
llvm-svn: 68206
2009-04-01 15:40:21 +00:00
Daniel Dunbar f524eff37d Add cocoa-pth.c test case, this got lost in shuffling PTH test cases.
llvm-svn: 68205
2009-04-01 15:36:37 +00:00
Ted Kremenek 455de13de1 Re-enable PTH testing for cocoa.h and carbon.h. This tests that PTH works on
real-world header files and these tests have caught serious bugs in the past.

llvm-svn: 68204
2009-04-01 15:28:20 +00:00
Steve Naroff e14b368fa9 More "prep" work for handling UTF16 CFString.
Patch by Jean-Daniel Dupas. Thanks!

llvm-svn: 68203
2009-04-01 13:55:36 +00:00
Steve Naroff c94adda157 ProcessUCNEscape(): Incorportate some feedback from Chris.
llvm-svn: 68198
2009-04-01 11:09:15 +00:00
Daniel Dunbar e80bd1897c x86-32 Darwin ABI: Handle small structures correctly.
- Small structures are returned in a register if: 
    1. They fit nicely in a  register.
    2. All fields fit nicely in a register.
   (more or less)

 - We now pass the first 5000 ABITests if unions are disabled.

 - <rdar://problem/6497882> [irgen] x86-32 ABI compatibility with
   small structs

llvm-svn: 68197
2009-04-01 07:45:00 +00:00
Daniel Dunbar 58e2971bb0 x86-32 Darwin ABI: Single element arrays can be part of "single
element structures", which have different ABI rules.
 - Current return-arguments-32 status is: 1 out of 1000 failures (-7)

 - Also, vectors inside "single element structs" require special
   handling.

llvm-svn: 68196
2009-04-01 07:08:38 +00:00
Ted Kremenek 8b0dba358a Fix: <rdar://problem/6740387>. Sending nil to an object that returns a struct
should only be an error if that value is consumed. This fix was largely
accomplished by moving 'isConsumedExpr' back to ParentMap.

llvm-svn: 68195
2009-04-01 06:52:48 +00:00
Chris Lattner 3088a31e96 remove ASTContext::buildObjCInterfaceType, which breaks canonical
types.  It is no longer needed now that the code generator 
re-lays-out interfaces if they are defines after being laid out
from a forward decl.

llvm-svn: 68194
2009-04-01 06:23:52 +00:00
Ted Kremenek 0bb0909233 - Changed PathDiagnosticPiece::getLocation() to return a PathDiagnosticLocation
instead of a FullSourceLoc. This resulted in a bunch of small edits in various
  clients.
- Updated BugReporter to include an alternate PathDiagnostic generation
  algorithm for PathDiagnosticClients desiring more control-flow pieces.

llvm-svn: 68193
2009-04-01 06:13:56 +00:00
Daniel Dunbar cd76e673eb x86-32 Darwin ABI: Handle direct return of vectors.
- Current return-arguments-32 status is: 8 out of 1000 failures (-7)

llvm-svn: 68192
2009-04-01 06:13:08 +00:00
Zhongxing Xu 034247130e Update docs.
llvm-svn: 68191
2009-04-01 06:01:08 +00:00
Zhongxing Xu dcb7a35294 Adjust doc format.
llvm-svn: 68190
2009-04-01 05:26:39 +00:00
Daniel Dunbar 386ef885bb Pull clang-cc code for generating PTH files based on the input type.
- <rdar://problem/6741594> [pth] don't abuse -x to drive pth
   generation

 - Simpler, and fixes PR3915.

Cleanup test cases for PTH:
 - Update to use -emit-pth

 - Removed PTH test of carbon.c and cocoa.mm; these didn't actually
   verify anything, and since PTH is token based the extra coverage
   (over cocoa.m) isn't particularly helpful.

 - Split PTH tests in cocoa.m to cocoa-pth.m, solely to increase
   available parallelism when running tests.

Ted, could you update the PTH test cases (include-pth.c and
cocoa-pth.m) to have some sort of positive check that the PTH is
getting used? "# of PTH cache hits" or "tokens read from PTH cache"
statistics would work great. :)

llvm-svn: 68189
2009-04-01 05:09:09 +00:00
Zhongxing Xu 1b1d3f6b0c update docs.
llvm-svn: 68188
2009-04-01 05:05:22 +00:00
Nick Lewycky 9a196c0119 Detect that we're building from a git checkout like we do for cvs and svn.
Based on a patch by Nicolas Trangez on the unladen-swallow mailing list!

llvm-svn: 68187
2009-04-01 04:39:25 +00:00
Daniel Dunbar f77e292a0f Fix a subtle bug where the cleanup scope entries had a dangling block reference
- <rdar://problem/6732143> Crash when generating @synchronize for
   zero-cost exception

 - Thanks to Anders for helping track down the problem.

llvm-svn: 68186
2009-04-01 04:37:47 +00:00
Ted Kremenek 1b37951f36 CFG: For 'if(...) {}' (empty body) construct an empty CFGBlock so that we can
distinguish between the true and false branches for path-sensitive analyses.

llvm-svn: 68185
2009-04-01 03:52:47 +00:00
Daniel Dunbar 2ec6e8e2ba Remove a FIXME, use -emit-pth to drive PTH generation.
-  c.f. r68164

llvm-svn: 68184
2009-04-01 03:28:10 +00:00
Zhongxing Xu c473a44507 Update docs.
llvm-svn: 68183
2009-04-01 03:23:38 +00:00
Daniel Dunbar ae8bca038d Tweak/cleanup darwin::Link a bit, add several FIXMES, and improve test
case.

llvm-svn: 68182
2009-04-01 03:17:40 +00:00
Eli Friedman 1c3fb22cad Fix pascal string support; testcase from mailing list message.
llvm-svn: 68181
2009-04-01 03:17:08 +00:00
Eli Friedman 706e0a14e2 Follow gcc's example and warn by default on unknown escapes. Inspired
by mailing list message about "\phello" style strings.

llvm-svn: 68180
2009-04-01 02:59:02 +00:00
Eli Friedman 84ae509ac3 Fix test failure on Linux by forcing the triple to OS X.
llvm-svn: 68179
2009-04-01 02:55:21 +00:00
Eli Friedman a331a63397 Flip diagnostic from Warning to ExtWarn so that it's an error
with -pedantic-errors.  This fixes the C99 part of PR3919.

llvm-svn: 68178
2009-04-01 02:48:25 +00:00