Skip to content
  1. Aug 21, 2012
  2. Aug 20, 2012
  3. Aug 18, 2012
    • Jordan Rose's avatar
      Allow -verify to be used with files that don't have an associated FileEntry. · 8c1ac0c3
      Jordan Rose authored
      In Debug builds, VerifyDiagnosticConsumer checks any files with diagnostics
      to make sure we got the chance to parse them for directives (expected-warning
      and friends). This check previously relied on every parsed file having a
      FileEntry, which broke the cling interpreter's test suite.
      
      This commit changes the extra debug checking to mark a file as unparsed
      as soon as we see a diagnostic from that file. At the very end, any files
      that are still marked as unparsed are checked for directives, and a fatal
      error is emitted (as before) if we find out that there were directives we
      missed. -verify directives should always live in actual parsed files, not
      in PCH or AST files.
      
      Patch by Andy Gibbs, with slight modifications by me.
      
      llvm-svn: 162171
      8c1ac0c3
    • John McCall's avatar
      When mangling a negative number, remember that negating it does not · dd61f2eb
      John McCall authored
      always yield a positive number.  Just print the negated result as an
      unsigned number.
      
      llvm-svn: 162163
      dd61f2eb
    • Richard Smith's avatar
      PR41111, PR5925, PR13210: Teach tentative parsing to annotate identifiers and · 4f605aff
      Richard Smith authored
      nested names as id-expressions, using the annot_primary_expr annotation, where
      possible. This removes some redundant lookups, and also allows us to
      typo-correct within tentative parsing, and to carry on disambiguating past an
      identifier which we can determine will fail lookup as both a type and as a
      non-type, allowing us to disambiguate more declarations (and thus offer
      improved error recovery for such cases).
      
      This also introduces to the parser the notion of a tentatively-declared name,
      which is an identifier which we *might* have seen a declaration for in a
      tentative parse (but only if we end up disambiguating the tokens as a
      declaration). This is necessary to correctly disambiguate cases where a
      variable is used within its own initializer.
      
      llvm-svn: 162159
      4f605aff
    • Jordan Rose's avatar
      [analyzer] Treat C++ 'throw' as a sink. · a4309c94
      Jordan Rose authored
      Our current handling of 'throw' is all CFG-based: it jumps to a 'catch' block
      if there is one and the function exit block if not. But this doesn't really
      get the right behavior when a function is inlined: execution will continue on
      the caller's side, which is always the wrong thing to do.
      
      Even within a single function, 'throw' completely skips any destructors that
      are to be run. This is essentially the same problem as @finally -- a CFGBlock
      that can have multiple entry points, whose exit points depend on whether it
      was entered normally or exceptionally.
      
      Representing 'throw' as a sink matches our current (non-)handling of @throw.
      It's not a perfect solution, but it's better than continuing analysis in an
      inconsistent or even impossible state.
      
      <rdar://problem/12113713>
      
      llvm-svn: 162157
      a4309c94
    • Jordan Rose's avatar
      [analyzer] Treat @throw as a sink (stop processing). · a97a9973
      Jordan Rose authored
      The CFG approximates @throw as a return statement, but that's not good
      enough in inlined functions. Moreover, since Objective-C exceptions are
      usually considered fatal, we should be suppressing leak warnings like we
      do for calls to noreturn functions (like abort()).
      
      The comments indicate that we were probably intending to do this all along;
      it may have been inadvertantly changed during a refactor at one point.
      
      llvm-svn: 162156
      a97a9973
    • Jordan Rose's avatar
      [analyzer] Remove obsolete GenericNodeBuilderRefCount from RetainCountChecker. · 9f61f8a9
      Jordan Rose authored
      This was once an adapter class between callbacks that had CheckerContexts
      and those that don't, but for a while now it's essentially just been a
      wrapper around a ProgramPointTag. We can just pass the tag around instead.
      
      No functionality change.
      
      llvm-svn: 162155
      9f61f8a9
    • Jordan Rose's avatar
      [analyzer] Use PointerUnion to implement ExplodedNode::NodeGroup. · 80547386
      Jordan Rose authored
      We shouldn't be reinventing our own wheels. This also paves the way for
      marking different kinds of sinks.
      
      No functionality change.
      
      llvm-svn: 162154
      80547386
    • Eric Christopher's avatar
      Reapply: · ff576013
      Eric Christopher authored
      Make isa part of objc_object at metadata generation time.
      
      Noticed on inspection.
      
      llvm-svn: 162145
      ff576013
    • Douglas Gregor's avatar
      When code completion is enabled, don't do any work in · c459b517
      Douglas Gregor authored
      Sema::ActOnEndOfTranslationUnit(). This is a (minor) optimization.
      
      llvm-svn: 162144
      c459b517
  4. Aug 17, 2012
Loading