Skip to content
  1. Feb 27, 2009
  2. Feb 26, 2009
    • Douglas Gregor's avatar
      Make the type associated with a ClassTemplateSpecializationDecl be a · d56a91e8
      Douglas Gregor authored
      nicely sugared type that shows how the user wrote the actual
      specialization. This sugared type won't actually show up until we
      start doing instantiations.
      
      llvm-svn: 65577
      d56a91e8
    • Douglas Gregor's avatar
      Introduce code modification hints into the diagnostics system. When we · 87f95b0a
      Douglas Gregor authored
      know how to recover from an error, we can attach a hint to the
      diagnostic that states how to modify the code, which can be one of:
      
        - Insert some new code (a text string) at a particular source
          location
        - Remove the code within a given range
        - Replace the code within a given range with some new code (a text
          string)
      
      Right now, we use these hints to annotate diagnostic information. For
      example, if one uses the '>>' in a template argument in C++98, as in
      this code:
      
        template<int I> class B { };
        B<1000 >> 2> *b1;
      
      we'll warn that the behavior will change in C++0x. The fix is to
      insert parenthese, so we use code insertion annotations to illustrate
      where the parentheses go:
      
      test.cpp:10:10: warning: use of right-shift operator ('>>') in template
      argument will require parentheses in C++0x
        B<1000 >> 2> *b1;
               ^
          (        )
      
      
      Use of these annotations is partially implemented for HTML
      diagnostics, but it's not (yet) producing valid HTML, which may be
      related to PR2386, so it has been #if 0'd out.
      
      In this future, we could consider hooking this mechanism up to the
      rewriter to actually try to fix these problems during compilation (or,
      after a compilation whose only errors have fixes). For now, however, I
      suggest that we use these code modification hints whenever we can, so
      that we get better diagnostics now and will have better coverage when
      we find better ways to use this information.
      
      This also fixes PR3410 by placing the complaint about missing tokens
      just after the previous token (rather than at the location of the next
      token).
      
      llvm-svn: 65570
      87f95b0a
    • Daniel Dunbar's avatar
      Drop uses of getAsPointerLikeType. · b566c6c7
      Daniel Dunbar authored
       - No functionality change.
      
      llvm-svn: 65563
      b566c6c7
    • Steve Naroff's avatar
      Fix <rdar://problem/6574319> clang issues error on 'readonly' property with a... · de68001e
      Steve Naroff authored
      Fix <rdar://problem/6574319> clang issues error on 'readonly' property with a defaul setter attribute.
      
      Needed to make isPropertyReadonly() non-const (for this fix to compile). I imagine there's a way to retain the const-ness, however I have more important fish to fry.
      
      llvm-svn: 65562
      de68001e
    • Steve Naroff's avatar
      Fix <rdar://problem/6614945> method not found. · 42ab0dd1
      Steve Naroff authored
      This was a fairly recent regression.
      
      llvm-svn: 65547
      42ab0dd1
    • Steve Naroff's avatar
      Fix http://llvm.org/bugs/show_bug.cgi?id=3544. · b162f170
      Steve Naroff authored
      The code for looking up local/private method in Sema::ActOnInstanceMessage() was not handling categories properly. Sema::ActOnClassMessage() didn't have this bug.
      Created a helper with the correct logic and changed both methods to use it.
      
      llvm-svn: 65532
      b162f170
    • Sebastian Redl's avatar
      8d2ccae2
    • Eli Friedman's avatar
      Zap the Sema constant initializer checking code that we aren't using · 4f294cfe
      Eli Friedman authored
      anymore.  If we want to reuse bits and pieces to add strict checking for 
      constant initializers, we can dig them out of SVN history; the existing 
      code won't be useful as-is.
      
      llvm-svn: 65502
      4f294cfe
    • Eli Friedman's avatar
      Fix for PR3663/3669: use TryToFixInvalidVariablyModifiedType for · adf40d4b
      Eli Friedman authored
      variable declarations where applicable.  Also, a few fixes to 
      TryToFixInvalidVariablyModifiedType for issues that this exposed.
      
      llvm-svn: 65500
      adf40d4b
  3. Feb 25, 2009
  4. Feb 24, 2009
  5. Feb 23, 2009
  6. Feb 22, 2009
    • Steve Naroff's avatar
      Minor cleanup, replace bool with qual_empty(). · d2c44d22
      Steve Naroff authored
      llvm-svn: 65293
      d2c44d22
    • Steve Naroff's avatar
      Contains the following (related to problems found while investigting... · c4173fa7
      Steve Naroff authored
      Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's).
      
      - Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default).
      - Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol).
      - Changed several test cases to jive with the above changes.
      
      llvm-svn: 65292
      c4173fa7
    • Eli Friedman's avatar
      Throw the switch to exclusively use Evaluate (along with the small · 7bfab368
      Eli Friedman authored
      helper isConstantInitializer) to check whether an initializer is 
      constant.  This passes tests, but it's possible that it'll cause 
      regressions with real-world code.
      
      Future work:
      1. The diagnostics obtained this way are lower quality at the moment; 
      some work both here and in Evaluate is needed for accurate diagnostics.
      2. We probably need some extra code when we're in -pedantic mode so we 
      can strictly enforce the rules in C99 6.6p7.
      3. Dead code cleanup (this should wait until after 2, because we might 
      want to re-use some of the code).
      
      llvm-svn: 65265
      7bfab368
Loading