aboutsummaryrefslogtreecommitdiff
path: root/Sema
AgeCommit message (Collapse)Author
2008-02-15Don't call non-existent method... sorry about the spam; the fix seemed Eli Friedman
trivial, but I forgot that method doesn't exist yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47175 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Get rid of unused variable warning.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47174 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Split out incomplete arrays from VariableArrayType into Eli Friedman
IncompleteArrayType. This should make code dealing with both incomplete and variable length arrays much more readable, plus it allows properly making the distinction between isVariableArrayType() and isVariablyModifiedType(). The patch is a little big, but it's strightforward. so I don't think there should be any issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47165 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Part of clearing up the whole VariableArrayType + incomplete arrays Eli Friedman
thing. Some cleanups that can be done independently of the fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47158 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Get rid of AttributeList in the AST and use the new Attr class insteadAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47155 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Get rid of outdated code that masks type errors. Fixes PR2036.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47154 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13avoid making implicit casts that just remove typedefs.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47074 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13Use IgnoreParenCasts.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47041 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13Move IgnoreParenCasts to be a method on Expr.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47040 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12Fix unsafe static cast...Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46980 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11After yesterday's discussion ↵Steve Naroff
(http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-February/001044.html), decided not to change the semantics of Type::isIncompleteType(). This commit simply changes a couple comments to reflect this decision. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46970 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Get rid of bogus warnings when the second argument in va_start is either an ↵Anders Carlsson
implicit cast expr or a paren expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46950 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Add a comment/FIXME to an earlier change.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46947 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Fix http://llvm.org/bugs/show_bug.cgi?id=1988.Steve Naroff
Sema::CheckInitializerListTypes() needs to ignore invalid structures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Fix PR1992 by computing the right type for string literals, whichChris Lattner
is an array type not a pointer type. This requires updating some diags that change and updating the code generator to handle the proper form of strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-10Fix the type of conditionals involving void* to be self-consistent and Eli Friedman
spec-compliant. I'll put together some testcases in a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46937 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-10Add a diagnostics helper to remove some redundant code.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46936 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-09Fix spelling in comment.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46906 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-09Fix <rdar://problem/5733511> clang doesn't emit error for const array.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46905 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08A bunch-o changes to fix <rdar://problem/5716046> incomplete implementation ↵Steve Naroff
of ObjC class warning is incomplete As part of this fix, I made a low-level change to the text diagnostics machinery (to basically avoid printing duplicate source lines/carets when you have multiple diagnostics that refer to the same exact place). For now, this only happens with we don't have a source range (could be extended to support source ranges as well). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46897 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Fix indentation.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46873 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Detabify SemaExpr. My text editor defaults to 8 spaces per tab, so it Eli Friedman
gets kind of annoying. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46872 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Improve diagnostic for illegal array initialization.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46869 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Put back the top-level asm code; all tests pass now.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46868 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Back out 46855 for now, it causes test failures on Darwin.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46867 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Handle top-level asm declarations.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46855 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Add a FIXME for alternate address spaces.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46841 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Implement -fms-extensions. This allows us to fuzzy parse non-standard MS ↵Steve Naroff
constructs used in "windows.h". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46838 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06Make sure to propagate qualifiers through the member operator.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46830 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06move the codegen ASTConsumer out of the driver into libcodegen,Chris Lattner
eliminating a bunch of forwarding methods and generally simplifying things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46792 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06inform astconsumer about tagdecls as they are defined.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46788 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06pass the astconsumer into Sema's ctor, clean up some stuff in Chris Lattner
Sema::ActOnTranslationUnitScope. The various ObjC pieces at the top of Sema.cpp should be moved into SemaObjC or something. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46787 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06kill the ASTStreamer class, inlining it into its only client: clang::ParseASTChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46785 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Handle simple asm statements correctly.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05simplify some code.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46774 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04Add experimental support for address space qualified types. Address spaceChristopher Lamb
qualifiers use the __attribute__((address_space(id))) syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46691 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01Rename diagnostic to reflect it's role...Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46650 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01getPrimaryDecl can return null.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46638 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01It is allowed to get the address of an array subscript, even if the array ↵Anders Carlsson
has the register qualifier, if the array is really a pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46634 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01make some diagnostics more terse, update testcases.Chris Lattner
Fix Sema::ActOnInstanceMessage to correctly do things in terms of canonical types, fixing bogus errors like: NSDistantObject.m:10383:120: error: bad receiver type 'typeof((id<NSMutableCopying>)self)' id mess = ({ id __inv__ = ((void *)0); id __mb__ = _NSMessageBuilder((id <NSMutableCopying>)self, &__inv__); (void)[(__typeof__((id <NSMutableCopying>)self))__mb__ mutableCopyWithZone:((void *)0)]; if (!objc_collecting_enabled()) object_dispose(__mb__); __inv__; }); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46633 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01Sema::ActOnInstanceMessage is generally doing bad things with typedefs, butChris Lattner
here I fix just one. The loop that rips through pointers should use getAsPointerType() not static_cast<PointerType*> to get the pointee. This fixes a crash on a large testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Remainder of the __builtin_overload feedbackNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46601 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Hack Sema::MergeTypeDefDecl() to silently ignore duplicate typedef's in ↵Steve Naroff
system headers files. A bizarre, non-standard hook that many compilers appear to implement (sigh:-). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46583 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Implement first round of feedback on __builtin_overloadNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46572 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Add TODO marker so that it is easier to search.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Ignore __aligned__ with zero arguments in addition to __aligned__ with Eli Friedman
one argument. Lets stuff using pthread.h compile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46559 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Fix codegen for conditionals with incommpatible pointer types. Code Eli Friedman
that causes this isn't really correct, but if we're going to accept this, it should come up with a consistent AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46557 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Many refinements to Sema::MergeVarDecl(). This routine still needs some ↵Steve Naroff
re-work to fully handle tentative decls. This includes a fix to bz1908. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46540 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29Rewriting of @synchronized. This has one FIXME in it. But this should allow ↵Fariborz Jahanian
@sychronized to be rewritten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46533 91177308-0d34-0410-b5e6-96231b3b80d8