Commit Graph

51468 Commits

Author SHA1 Message Date
Chris Lattner 85b25bc344 implement rdar://6091492 - ?: with __builtin_constant_p as the operand is an i-c-e.
llvm-svn: 60934
2008-12-12 06:55:44 +00:00
Chris Lattner 10da53c60c use smarter error recovery for do/while.
llvm-svn: 60933
2008-12-12 06:35:28 +00:00
Chris Lattner c0081db332 apply the new error recovery smarts we have for if's to while's and switch's.
llvm-svn: 60932
2008-12-12 06:31:07 +00:00
Chris Lattner fce12fdf6f rename recovery-3 to recovery.c
llvm-svn: 60931
2008-12-12 06:21:41 +00:00
Chris Lattner 5b3ddc8ef9 merge recovery-1 into recovery-3.
llvm-svn: 60930
2008-12-12 06:21:18 +00:00
Chris Lattner bc2d77cdf2 merge recovery-2.c into recovery-3.c.
Substantially improve error recovery after broken if conditions by
parsing the full if when we have a semantic error instead of using
parser recovery techniques to recover from a semantic error.

This fixes rdar://6094870 - spurious error after invalid 'if' condition

llvm-svn: 60929
2008-12-12 06:19:11 +00:00
Chris Lattner d8980509b3 minor refactoring of ParseParenExpression
llvm-svn: 60928
2008-12-12 06:00:12 +00:00
Chris Lattner dca17ceb19 add expected diag
llvm-svn: 60927
2008-12-12 05:59:56 +00:00
Chris Lattner db44f532c0 add ownership.h to xcode project
llvm-svn: 60926
2008-12-12 05:54:54 +00:00
Anders Carlsson 8a472c3151 Work in preparation for VLAs. Make sure to restore the stack if necessary (Saving the stack isn't implemented right now :)
llvm-svn: 60925
2008-12-12 05:52:00 +00:00
Chris Lattner 053441f39d Fix rdar://6095061 - gcc allows __builtin_choose_expr as an lvalue
llvm-svn: 60924
2008-12-12 05:35:08 +00:00
Chris Lattner 54139445ba Testcase for something that already works. Clang agrees with Comeau,
and this makes sense.  likely a gcc bug that it doesn't diagnose the bad
restrict.

llvm-svn: 60923
2008-12-12 05:25:55 +00:00
Chris Lattner b4396f40a0 add codegen support for __func__ and friends, producing the same
output that GCC does.  rdar://6440297

llvm-svn: 60922
2008-12-12 05:18:02 +00:00
Chris Lattner f45c5ecb3b fix rdar://6097892 - gcc incompat: clang rejects __func__, __FUNCTION__, and __PRETTY_FUNCTION__ outside func
Yeah, this is "useful".

llvm-svn: 60921
2008-12-12 05:05:20 +00:00
Chris Lattner 81ed6805db Implement rdar://6138816 - [sema] named bitfields cannot have 0 width
llvm-svn: 60920
2008-12-12 04:56:04 +00:00
Chris Lattner e5a6d7ddae fix some incorrect links.
llvm-svn: 60919
2008-12-12 04:20:01 +00:00
Mikhail Glushenkov a6a9066848 Man page update.
llvm-svn: 60918
2008-12-12 02:34:56 +00:00
Douglas Gregor 1d248c53ab In C++, set the type of each of the enumerators in an enumeration to
the type of the enumeration once the enumeration has been defined.

Fix the overloading test-case to properly create enums that promote
the way we want them to.

Implement C++0x promotions from enumeration types to long
long/unsigned long long. We're using these promotions in Carbon.h
(since long long is a common extension).

Fixes PR clang/2954: http://llvm.org/bugs/show_bug.cgi?id=2954

llvm-svn: 60917
2008-12-12 02:00:36 +00:00
Mon P Wang 9c2d26d208 Added support for SELECT v8i8 v4i16 for X86 (MMX)
Added support for TRUNC v8i16 to v8i8 for X86 (MMX)

llvm-svn: 60916
2008-12-12 01:25:51 +00:00
Bill Wendling 1a317678bc Redo the arithmetic with overflow architecture. I was changing the semantics of
ISD::ADD to emit an implicit EFLAGS. This was horribly broken. Instead, replace
the intrinsic with an ISD::SADDO node. Then custom lower that into an
X86ISD::ADD node with a associated SETCC that checks the correct condition code
(overflow or carry). Then that gets lowered into the correct X86::ADDOvf
instruction.

Similar for SUB and MUL instructions.

llvm-svn: 60915
2008-12-12 00:56:36 +00:00
Mikhail Glushenkov 6932e2f368 Fix W3C validator errors.
llvm-svn: 60912
2008-12-11 23:43:14 +00:00
Ted Kremenek 864eb39233 PTH:
- Added a side-table per each token-cached file with the preprocessor conditional stack.  This tracks what #if's are matched with what #endifs and where their respective tokens are in the PTH file.  This will allow for quick skipping of excluded conditional branches in the Preprocessor.
- Performance testing shows the addition of this information (without actually utilizing it) leads to no performance regressions.

llvm-svn: 60911
2008-12-11 23:36:38 +00:00
Mikhail Glushenkov d9a7795abc Use correct file for the llvmc tutorial.
llvm-svn: 60910
2008-12-11 23:33:33 +00:00
Mikhail Glushenkov 6fd5513284 Update the auto-generated llvmc documentation.
llvm-svn: 60909
2008-12-11 23:24:40 +00:00
Chris Lattner ece9ae718b add annotation
llvm-svn: 60907
2008-12-11 23:11:52 +00:00
Sebastian Redl d65cea8dde Convert a big bunch of expression parsers to use smart pointers.
llvm-svn: 60906
2008-12-11 22:51:44 +00:00
Ted Kremenek ca153f7349 PTHLexer: Keep track of the location of the last '#' token and provide the means to jump ahead in the token stream.
llvm-svn: 60905
2008-12-11 22:41:47 +00:00
Sebastian Redl 90893187c4 Convert some more expression parsers to use smart pointers.
llvm-svn: 60904
2008-12-11 22:33:27 +00:00
Mikhail Glushenkov 4673023e71 Add a '-Wo,' option that passes options to opt.
llvm-svn: 60902
2008-12-11 22:19:14 +00:00
Evan Cheng a52c3b4b8b Fix a 80 col. violation.
llvm-svn: 60901
2008-12-11 22:02:02 +00:00
Sebastian Redl 59b5e517c7 Convert selected expression parsers to use smart pointers.
llvm-svn: 60900
2008-12-11 21:36:32 +00:00
Steve Naroff a5c0db8467 Rename a local predicate to avoid confusion with Type::isBlockPointerType().
llvm-svn: 60899
2008-12-11 21:05:33 +00:00
Steve Naroff 5ac4eac3b6 Fixup generated code for imported block decl refs.
Found while investigating <rdar://problem/6435837> clang ObjC rewriter: use Block_release instead of Block_destroy.

llvm-svn: 60898
2008-12-11 20:51:38 +00:00
Douglas Gregor 7a4fad1b0b Address some comments on the name lookup/DeclContext patch from Chris
llvm-svn: 60897
2008-12-11 20:41:00 +00:00
Ted Kremenek 67ab296d5c Remove unused ivar CurTokenIdx.
llvm-svn: 60896
2008-12-11 20:39:48 +00:00
Sebastian Redl bab9a4b5ea Convert the remaining statement parsers to smart pointers.
llvm-svn: 60895
2008-12-11 20:12:42 +00:00
Sebastian Redl b62406f6e4 Convert some more statement parsers to smart pointers.
llvm-svn: 60892
2008-12-11 19:48:14 +00:00
Misha Brukman 5039be7e27 * Removed stray </p> tag
* Whitespace cleanups

llvm-svn: 60891
2008-12-11 19:44:51 +00:00
Steve Naroff e4d722bf2f Fix <rdar://problem/6435842> clang ObjC rewriter: #include Block.h, Block_private.h or come up with #define to prevent double-definition
llvm-svn: 60890
2008-12-11 19:43:14 +00:00
Misha Brukman 586a15c995 * <div align=center> is not valid HTML 4.01 - removed alignment
* <sup> cannot appear inside a <pre> - replaced <pre> with <tt> and <br>
* Added standard "Notes" section
* Sprinkled fixed-width <tt> tags in a few places for consistency

llvm-svn: 60889
2008-12-11 19:37:04 +00:00
Sebastian Redl 042ad95d4e Convert a number of statement parsers to smart pointers.
llvm-svn: 60888
2008-12-11 19:30:53 +00:00
Steve Naroff 1fa7bd16c8 Fix <rdar://problem/6435382> clang ObjC rewriter: @property/@synthesize and blocks don't work together
llvm-svn: 60887
2008-12-11 19:29:16 +00:00
Misha Brukman 21a6370323 Removed warnings from HTML 4.01 validator: trailing slashes in <br> and <img>
tags are not needed in HTML, only XML.

llvm-svn: 60885
2008-12-11 18:23:24 +00:00
Misha Brukman 0091c26b2b Conform to the HTML 4.01 Strict specification.
llvm-svn: 60884
2008-12-11 18:14:06 +00:00
Douglas Gregor e029561346 Actually distinguish between RecordDecl::field_iterator and RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.
llvm-svn: 60883
2008-12-11 17:59:21 +00:00
Nick Lewycky 6a344e097c Sneaky, sneaky: move the -1 to the outside of the SMax. Reinstate the
optimization of SGE/SLE with unit stride, now that it works properly.

llvm-svn: 60881
2008-12-11 17:40:14 +00:00
Misha Brukman 86242e1990 Global replace of yellow W3C "valid HTML/CSS" icons with blue ones.
llvm-svn: 60880
2008-12-11 17:34:48 +00:00
Misha Brukman 4e71ec11b0 * Fixed formatting of command descriptions to be consistent:
- descriptions on new line
  - no terminating period
* Changed the W3C logos from yellow to blue to not stand out

llvm-svn: 60879
2008-12-11 17:12:52 +00:00
Douglas Gregor 91f84216f7 Unifies the name-lookup mechanisms used in various parts of the AST
and separates lexical name lookup from qualified name lookup. In
particular:
  * Make DeclContext the central data structure for storing and
    looking up declarations within existing declarations, e.g., members
    of structs/unions/classes, enumerators in C++0x enums, members of
    C++ namespaces, and (later) members of Objective-C
    interfaces/implementations. DeclContext uses a lazily-constructed
    data structure optimized for fast lookup (array for small contexts,
    hash table for larger contexts). 

  * Implement C++ qualified name lookup in terms of lookup into
    DeclContext.

  * Implement C++ unqualified name lookup in terms of
    qualified+unqualified name lookup (since unqualified lookup is not
    purely lexical in C++!)

  * Limit the use of the chains of declarations stored in
    IdentifierInfo to those names declared lexically.

  * Eliminate CXXFieldDecl, collapsing its behavior into
    FieldDecl. (FieldDecl is now a ScopedDecl).

  * Make RecordDecl into a DeclContext and eliminates its
    Members/NumMembers fields (since one can just iterate through the
    DeclContext to get the fields).

llvm-svn: 60878
2008-12-11 16:49:14 +00:00
Torok Edwin 32bfb5de34 fix grammar, thanks Duncan!
llvm-svn: 60875
2008-12-11 11:44:49 +00:00