Skip to content
  1. Jan 16, 2008
  2. Jan 07, 2008
  3. Jan 04, 2008
  4. Dec 29, 2007
  5. Dec 12, 2007
    • Ted Kremenek's avatar
      TargetInfo no longer includes a reference to SourceManager. · 1daa3cfb
      Ted Kremenek authored
      Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
      Added many utility methods to FullSourceLoc to provide shorthand for:
      
          FullLoc.getManager().someMethod(FullLoc.getLocation());
          
      instead we have:
      
          FullLoc.someMethod();
          
      Modified TextDiagnostics (and related classes) to use this short-hand.
      
      llvm-svn: 44957
      1daa3cfb
  6. Dec 11, 2007
    • Ted Kremenek's avatar
      Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now · d4e5fbac
      Ted Kremenek authored
      SourceManager is passed by reference, allowing the SourceManager to be
      associated with a specific translation unit, and not the entire execution
      of the driver.
      
      Modified all users of Diagnostics to comply with this new interface.
      
      Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
      eventually be associated with a single translation unit (just like
      SourceManager).
      
      Made the SourceManager reference in ASTContext private. Provided accessor
      getSourceManager() for clients to use instead. Modified clients to comply with
      new interface.
      
      llvm-svn: 44878
      d4e5fbac
  7. Dec 07, 2007
  8. Nov 30, 2007
    • Anders Carlsson's avatar
      Initialize CurMethodDecl to 0. · 3b754452
      Anders Carlsson authored
      llvm-svn: 44463
      3b754452
    • Steve Naroff's avatar
      · 205ec3d0
      Steve Naroff authored
      Yesterday, I simplified how we stream top-level decls.
      
      After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).
      
      TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...
      llvm-svn: 44445
      205ec3d0
  9. Nov 28, 2007
    • Steve Naroff's avatar
      · 197616c3
      Steve Naroff authored
      Several fixes/simplifications surrounding how we stream top-level decl AST's.
      
      The following code...
      
      typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR;
      
      struct Y { int A; };
      
      struct X { int A; } D; 
      
      struct X E, F;
      
      ...now produces the following output...
      
      > ../../Debug/bin/clang xx.c -ast-print
      Read top-level tag decl: 'cssm_data'
      typedef struct cssm_data CSSM_DATA;
      typedef struct cssm_data *CSSM_DATA_PTR;
      Read top-level tag decl: 'Y'
      Read top-level tag decl: 'X'
      Read top-level variable decl: 'D'
      Read top-level variable decl: 'E'
      Read top-level variable decl: 'F'
      
      ...which is much more accurate than the previous -ast-print output...
      
      typedef struct cssm_data CSSM_DATA;
      typedef struct cssm_data CSSM_DATA;
      Read top-level variable decl: 'D'
      Read top-level variable decl: 'E'
      Read top-level variable decl: 'E'
      
      llvm-svn: 44421
      197616c3
  10. Oct 31, 2007
    • Steve Naroff's avatar
      · 6d40db0d
      Steve Naroff authored
      Implement a more sensible strategy for ObjC built-in types (addressing a long standing FIXME in Sema::GetObjcIdType()).
      
      This removes several gross hacks to work around the previous "lazy" behavior.
      
      Two notes:
      - MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME.
      - I didn't convert Sema::GetObjcProtoType() yet.
      
      llvm-svn: 43567
      6d40db0d
    • Anders Carlsson's avatar
      Encode Class, SEL and Objective-C objects. · f56a7aee
      Anders Carlsson authored
      llvm-svn: 43540
      f56a7aee
  11. Oct 30, 2007
  12. Oct 17, 2007
  13. Oct 16, 2007
  14. Oct 15, 2007
    • Steve Naroff's avatar
      · 66e9f331
      Steve Naroff authored
      Added ASTContext::setObjcIdType/getObjcIdType(), set by Sema.
      
      Also noticed ASTContext::BuiltinVaListType wasn't being initialized to the null type (so I set it).
      
      llvm-svn: 42983
      66e9f331
  15. Oct 11, 2007
    • Steve Naroff's avatar
      Refinements to Sema::GetObjcIdType()... · 783a7a06
      Steve Naroff authored
      - Cache the typedef, not the type (avoids importing AST/Type.h).
      - Emit an error if "id" cannot be found.
      - Comment the routine and add a FIXME to reconsider how we emulate GCC's new fangled behavior. This isn't a priority for now, since almost no code depends on having "id" built-in.
      - Add a test.
      
      llvm-svn: 42845
      783a7a06
  16. Oct 10, 2007
    • Steve Naroff's avatar
      · 7f549f18
      Steve Naroff authored
      - Make sure default return/argument types (for methods) default to "id".
      - Cache the "id" type in Sema...initialize ObjcIdType and TUScope (oops).
      - Fix ActOnInstanceMessage to allow for "id" type receivers...still work to do (next).
      
      llvm-svn: 42842
      7f549f18
    • Steve Naroff's avatar
      · c62adb6d
      Steve Naroff authored
      Make sure methods with no return type default to "id".
      
      This fixes a crasher in Sema::MatchTwoMethodDeclarations(), identified by selector-overload.m (just added).
      
      Added Action::ActOnTranslationUnitScope() and renamed Action::PopScope to ActOnPopScope.
      
      Added a Translation Unit Scope instance variable to Sema (will be very useful to ObjC-related actions, since ObjC declarations are always file-scoped).
      
      llvm-svn: 42817
      c62adb6d
  17. Aug 31, 2007
  18. Aug 10, 2007
  19. Jun 16, 2007
    • Chris Lattner's avatar
      Finally bite the bullet and make the major change: split the clang namespace · 23b7eb67
      Chris Lattner authored
      out of the llvm namespace.  This makes the clang namespace be a sibling of
      llvm instead of being a child.
      
      The good thing about this is that it makes many things unambiguous.  The
      bad things is that many things in the llvm namespace (notably data structures
      like smallvector) now require an llvm:: qualifier.  IMO, libsystem and libsupport
      should be split out of llvm into their own namespace in the future, which will fix
      this issue.
      
      llvm-svn: 39659
      23b7eb67
  20. May 19, 2007
    • Steve Naroff's avatar
      Bug #: · 71ce2e06
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      An important, but truly mind numbing change.
      
      Added 6 flavors of Sema::Diag() that take 1 or two SourceRanges. Considered
      adding 3 flavors (using default args), however this wasn't as clear.
      
      Removed 2 flavors of Sema::Diag() that took LexerToken's (they weren't used).
      
      Changed all the typechecking routines to pass the appropriate range(s).
      
      Hacked the diagnostic machinery and driver to acccommodate the new data.
      
      What's left? A FIXME in clang.c to use the ranges. Chris offered to do the
      honors:-) Which includes taking us to the end of an identifier:-)
      
      llvm-svn: 39456
      71ce2e06
  21. May 16, 2007
  22. May 13, 2007
    • Steve Naroff's avatar
      Bug #: · 094046fd
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      Two bug fixes to CheckIncrementDecrementOperand:
      - removed "constantOne" usage and simply use Context.IntTy.
      - fix the last constraint check...the lvalue test needs to be on the
      expression, not the type! (duh).
      
      llvm-svn: 39442
      094046fd
  23. May 07, 2007
    • Steve Naroff's avatar
      Bug #: · 35d8515b
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      - Unified CheckSimpleAssignmentOperands/CheckCompoundAssignmentOperands
      into one function, named CheckAssignmentOperands. One less function to maintain.
      - Converted the unary check functions (ParseUnaryOp and friends) to have
      the same API as their binary counterparts.
      - Implemented CheckIndirectionOperand (was stubbed). While testing, noticed
      that Expr::isModifiableLvalue was incomplete (fixed and referenced draft).
      - Added constantOne instance variable to Sema.
      - Removed CheckArithmeticOperand (the code was so simple that it is now
      part of ParseUnaryOp). The name wasn't great anyway:-)
      
      llvm-svn: 39435
      35d8515b
  24. Apr 06, 2007
    • Steve Naroff's avatar
      Bug #: · e5aa9be0
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      -Changed the name of TypeRef to QualType. Many diffs.
      -Changed the QualType constructor to require Quals be passed. This makes the code a bit
      more verbose, however will make the code easier to work on. Given the complexity
      of types, this should help spot bogosities.
      -Changed the Expr constructor to require a QualType. Same motivation.
      
      llvm-svn: 39395
      e5aa9be0
  25. Mar 30, 2007
    • Steve Naroff's avatar
      Bug #: · bc2f0993
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      Implement ++/-- typechecking for pre/post unary expressions. This includes:
      
      - added isLvalue, isModifiableLvalue (on TypeRef, Type, and RecordType).
      - added isRealType, isRealFloatingType, isComplexType.
      - hacked Diag to take a TypeRef (I was sick of writing the 2 line "setup":-)
      In addition, this will likely lead to less bugs...I already had written code
      that was doing a getAsString on "Type" (which is wrong...since it doesn't include
      any qualifiers).
      - Changed UnaryOperator to take a TypeRef...pass it the right stuff.
      - Removed redundant ternary expressions in several predicates.
      - A couple diagnostics.
      
      llvm-svn: 39369
      bc2f0993
  26. Mar 23, 2007
    • Steve Naroff's avatar
      Bug #: · f1e53698
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      
      Type Checking...round 2. This checkin "breaks" parsing carbon.h. I imagine
      that this will be true for the next week or so. Nevertheless, this round of
      changes includes the following:
      
      - Hacked various Expr classes to pass the appropriate TypeRef. Still have
      a few more classes to touch.
      - Implement type checking for ParseArraySubscriptExpr and ParseMemberReferenceExpr.
      - Added a debug hook to derive the class name for Stmt/Expr nodes. Currently a
      linear search...could easily optimize if important.
      - Changed the name of TaggedType->TagType. Now we have TagType and TagDecl (which
      are easier to remember).
      - Fixed a bug in StringLiteral conversion I did a couple weeks ago. hadError was
      not initialized (oops).
      - changed Sema::Diag to return true. This streamlines the type checking code
      considerably.
      - Added many diagnositics.
      
      This should be it!
      
      llvm-svn: 39361
      f1e53698
  27. Mar 06, 2007
    • Steve Naroff's avatar
      Bug #: · 8160ea20
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      More code to parse numeric constants. This checkin includes:
      - Feedback from Chris.
      - Support for parsing floating point constants.
      - Moved the code to "Sema". Changed API in Action.
      - More/better error diagnostics.
      
      At this point, the parsing support should be largely complete. Next step
      is to work on filling in sensible values (in IntegerLiteral/FloatLiteral).
      
      llvm-svn: 39349
      8160ea20
  28. Feb 28, 2007
    • Steve Naroff's avatar
      · 2c055d2b
      Steve Naroff authored
      Go back to having the clang driver create ASTContext explicitly, passing
      it to Sema/ASTStreamer (separating the lifetime of ASTContext from
      the lifetime of Sema). One day it might be useful to consider creating
      a context object implicitly if one isn't provided (using default arguments in
      Sema's constructor). At this point, adding this convenience isn't necessary.
      
      llvm-svn: 39346
      2c055d2b
    • Steve Naroff's avatar
      Make Sema's use of the preprocessor explicit (rather than assume · 38d31b47
      Steve Naroff authored
      the prerocessor will be available via ASTContext).
      - Removed the public data member "PP" in ASTContext.
      - Changed ASTContext's contructor to take TargetInfo/IdentifierTable explicitly.
      - Implicitly create an ASTContext in Sema's constructor. This simplifies
      the clients job (and makes ASTContext more private).
      --As a side effect, added a "PrintStats" hook to Sema.
      
      To support this level of encapsulation, ASTContext is always dynamically
      allocated (by Sema). Previously, ASTContext was being allocated on the
      stack. I don't believe this should be a performance issue (since ASTContext
      is fairly course grain and tied to the lifetime of Sema currently).
      
      llvm-svn: 39345
      38d31b47
  29. Nov 20, 2006
  30. Nov 10, 2006
Loading