Commit Graph

55449 Commits

Author SHA1 Message Date
Chris Lattner 9605a55076 minor wording changes.
llvm-svn: 65648
2009-02-27 19:31:12 +00:00
Chris Lattner 7b0ec8a9df upgrade various 'implicit int' warnings from an ext-warn to warning when not
in C89 mode.  This makes it enabled by default instead of only enabled with
-pedantic.  Clang defaults to c99 mode, so people will see this more often
than with GCC, but they can always use -std=c89 if they really want c89.

llvm-svn: 65647
2009-02-27 18:53:28 +00:00
Chris Lattner de39c3efcb cleanup
llvm-svn: 65646
2009-02-27 18:38:20 +00:00
Chris Lattner e0c511688e cleanup
llvm-svn: 65645
2009-02-27 18:35:46 +00:00
Mike Stump 5b9a3d54b6 Silence warnings.
llvm-svn: 65644
2009-02-27 18:32:39 +00:00
Devang Patel 843cc34d81 It is possible that subprgoram definition is only encoding return value directly, instsad of an DIArray of all argument types.
llvm-svn: 65643
2009-02-27 18:05:21 +00:00
Ted Kremenek 9723bcf60f When checking printf-arguments for functions with '__attribute__ ((format (printf, X, Y)))'
set HasVAListArg to true when 'Y' is 0 (i.e., ignore the data arguments).

This fixes <rdar://problem/6623513>.

llvm-svn: 65642
2009-02-27 17:58:43 +00:00
Douglas Gregor 96977da72c Clean up and document code modification hints.
llvm-svn: 65641
2009-02-27 17:53:17 +00:00
Chris Lattner 7094c15d7e change a diagnostic message from something pedantically correct but
useless to something more vague but hopefully more clear.
rdar://6624173

llvm-svn: 65639
2009-02-27 17:15:01 +00:00
Daniel Dunbar 13454cfcb0 Oops, Ted beat me to it. I'll just play angry god and remove his version!
llvm-svn: 65638
2009-02-27 17:10:38 +00:00
Daniel Dunbar 8d42281150 Add coverage of "member of anonymous union redeclares ..." diagnostic.
llvm-svn: 65637
2009-02-27 17:07:01 +00:00
Ted Kremenek dd34e06eeb Add test case for PR 3675.
llvm-svn: 65635
2009-02-27 16:48:08 +00:00
Gabor Greif 97084b8481 group friendship
llvm-svn: 65633
2009-02-27 15:46:23 +00:00
Rafael Espindola 000421eade Refactor TLS code and add some tests. The tests and expected results are:
pic |  declaration | linkage  | visibility |

!pic |  declaration | external | default    | tls1.ll     tls2.ll     | local exec
 pic |  declaration | external | default    | tls1-pic.ll tls2-pic.ll | general dynamic
!pic | !declaration | external | default    | tls3.ll     tls4.ll     | initial exec
 pic | !declaration | external | default    | tls3-pic.ll tls4-pic.ll | general dynamic

!pic |  declaration | external | hidden     | tls7.ll     tls8.ll     | local exec
 pic |  declaration | external | hidden     | X                       | local dynamic
!pic | !declaration | external | hidden     | tls9.ll     tls10.ll    | local exec
 pic | !declaration | external | hidden     | X                       | local dynamic

!pic |  declaration | internal | default    | tls5.ll     tls6.ll     | local exec
 pic |  declaration | internal | default    | X                       | local dynamic

The ones marked with an X have not been implemented since local dynamic is not implemented.

llvm-svn: 65632
2009-02-27 13:37:18 +00:00
Gabor Greif b4b608c617 document ilist_traits
llvm-svn: 65631
2009-02-27 13:28:07 +00:00
Gabor Greif 8243b8c1e5 Expand a bit on iplist. If you are more expert on this class, please review!
llvm-svn: 65630
2009-02-27 12:02:19 +00:00
Gabor Greif d5575adbc4 update ilist documentation and add some blurb on ilist_node
llvm-svn: 65629
2009-02-27 11:37:41 +00:00
Gabor Greif 97b7ea6a14 update year
llvm-svn: 65628
2009-02-27 11:28:46 +00:00
Gabor Greif 3e2acf9508 fix comments
llvm-svn: 65627
2009-02-27 09:33:37 +00:00
Gabor Greif bf4da856e4 Introduce a new technique for merging BasicBlock with Instruction sentinel by superposition.
This looks dangerous, but isn't because the sentinel is accessed in special way only,
namely the Next and Prev fields of it, and these are guaranteed to exist.

llvm-svn: 65626
2009-02-27 08:41:37 +00:00
Ted Kremenek 918ae24edd Update checker build.
llvm-svn: 65625
2009-02-27 07:16:04 +00:00
Ted Kremenek c11fae8977 Update release notes for static analyzer.
llvm-svn: 65624
2009-02-27 07:01:32 +00:00
Mikhail Glushenkov f6281fb47c 'append_cmd' should split its argument.
Makes '(append_cmd "-foo a b c")' work.

llvm-svn: 65623
2009-02-27 06:46:55 +00:00
Eli Friedman 988a16b9b8 Change the AST generated for offsetof a bit so that it looks like a
normal expression, and change Evaluate and IRGen to evaluate it like a 
normal expression.  This simplifies the code significantly, and fixes 
PR3396.

llvm-svn: 65622
2009-02-27 06:44:11 +00:00
Nick Lewycky 34709f84d8 Silence compiler warning about use of uninitialized variables (in reality these
are always set by reference on the path that uses them.) No functional change.

llvm-svn: 65621
2009-02-27 06:37:39 +00:00
Nick Lewycky d05f6870c3 Fix compiler warning about uninitialized variables. No functional change.
llvm-svn: 65620
2009-02-27 06:29:31 +00:00
Ted Kremenek 078b8879e7 Don't report 'Parser Rejects' for conftest files.
llvm-svn: 65619
2009-02-27 06:17:38 +00:00
Ted Kremenek 33b220510b Correctly check for ccc-analyzer in the same directory as scan-build.
llvm-svn: 65618
2009-02-27 06:17:05 +00:00
Eli Friedman 8f5f4ea466 Change the way clang generates union types a bit so it plays well
with the LLVM C backend.

llvm-svn: 65615
2009-02-27 04:53:40 +00:00
Eli Friedman 8d03f59479 Some additional ICE tests.
llvm-svn: 65614
2009-02-27 04:46:32 +00:00
Eli Friedman 4e7a241f49 Some minor improvements to Evaluate.
llvm-svn: 65613
2009-02-27 04:45:43 +00:00
Eli Friedman 2c7bd6b0ac Fix minor memory leak. Add comment describing what we need to do for
strict constant initializer checking.

llvm-svn: 65612
2009-02-27 04:17:12 +00:00
Eli Friedman 97e070ed68 Minor cleanup: use getDeclAlignInBytes helper.
llvm-svn: 65611
2009-02-27 04:11:37 +00:00
Eli Friedman 90afd3d4aa Make isICE assert when Evaluate can't evaluate an ICE, as suggested by
Daniel.  Some minor fixes/cleanup.  Allow __builtin_choose_expr, 
__real__, and __imag__ in ICEs, following gcc's example.

llvm-svn: 65610
2009-02-27 04:07:58 +00:00
Mike Stump ee5e376e32 The middle operand in ?: is optional, really.
llvm-svn: 65609
2009-02-27 03:16:57 +00:00
Dale Johannesen 4609dbe222 Alignment values for i64 and f64 on ppc64 were wrong,
possibly for the reason suggested by the comment.
No wonder it didn't work very well.  This unblocks
bootstrap with assertions on ppc.

llvm-svn: 65601
2009-02-27 00:56:35 +00:00
Evan Cheng 2ad43a97cc Make sure this test passes on linux-ppc.
llvm-svn: 65600
2009-02-27 00:51:50 +00:00
Dan Gohman b2f5eaefbe Update another test for the LoopInfo::print changes.
llvm-svn: 65598
2009-02-27 00:20:19 +00:00
Dan Gohman b4e896baed Update this test for the LoopInfo::print changes.
llvm-svn: 65597
2009-02-27 00:17:49 +00:00
Dan Gohman db716652d1 Make LoopInfo::print() identify header, exit, and latch blocks,
and print the loop depth.

llvm-svn: 65593
2009-02-27 00:05:54 +00:00
Evan Cheng 8d0b4d4fd6 MachineLICM CSE should match destination register classes; avoid hoisting implicit_def's.
llvm-svn: 65592
2009-02-27 00:02:22 +00:00
Douglas Gregor deaad8cc34 Create a new TypeNodes.def file that enumerates all of the types,
giving them rough classifications (normal types, never-canonical
types, always-dependent types, abstract type representations) and
making it far easier to make sure that we've hit all of the cases when
decoding types. 

Switched some switch() statements on the type class over to using this
mechanism, and filtering out those things we don't care about. For
example, CodeGen should never see always-dependent or non-canonical
types, while debug info generation should never see always-dependent
types. More switch() statements on the type class need to be moved 
over to using this approach, so that we'll get warnings when we add a
new type then fail to account for it somewhere in the compiler.

As part of this, some types have been renamed:

  TypeOfExpr -> TypeOfExprType
  FunctionTypeProto -> FunctionProtoType
  FunctionTypeNoProto -> FunctionNoProtoType

There shouldn't be any functionality change...

llvm-svn: 65591
2009-02-26 23:50:07 +00:00
Chris Lattner 007cb026c9 make ASTContext::WCharTy a bit more sensical. In C++, it is a disctint type,
but in C99 it is just another int type.

llvm-svn: 65590
2009-02-26 23:43:47 +00:00
Chris Lattner 012b339693 fix a bozobug.
llvm-svn: 65589
2009-02-26 23:42:47 +00:00
Chris Lattner 09e592ea33 rename test
llvm-svn: 65587
2009-02-26 23:36:18 +00:00
Chris Lattner 7ec0bb6bc0 ok, not as broken as I thought, just confusing. This allows
initialization of wchar_t arrays with wide strings, and generalizes
wchar_size.c to work on all targets.

llvm-svn: 65586
2009-02-26 23:36:02 +00:00
Chris Lattner a9196810b3 allow wide strings to initialize arrays compatible with wchar_t.
Unfortunately this doesn't work yet because wchar_t is completely
broken in C.

llvm-svn: 65585
2009-02-26 23:26:43 +00:00
Ted Kremenek 1b44ba4295 Pass -ffreestanding' to clang.
llvm-svn: 65584
2009-02-26 23:09:43 +00:00
Fariborz Jahanian 7285cf57a3 Do not issue bogus error on __weak/__strong ivar access.
llvm-svn: 65583
2009-02-26 23:05:51 +00:00
Chris Lattner d42c29f9a2 fix some sema problems with wide strings and hook up basic codegen for them.
llvm-svn: 65582
2009-02-26 23:01:51 +00:00