Skip to content
  1. Apr 05, 2011
    • Chandler Carruth's avatar
      Separate the logic for issuing the initialization fixit hint from the · 7a037202
      Chandler Carruth authored
      diagnostic emission. The fixit hint, when suggested, typically has
      nothing to do with the nature or form of the reference.
      
      llvm-svn: 128899
      7a037202
    • Chandler Carruth's avatar
      Begin refactoring the uninitialized warning code that I uglied up. This · 895904da
      Chandler Carruth authored
      extracts a function to handle the emission of the diagnostic separately
      from the walking over the set of uninitialized uses.
      
      Also updates the naming used within this extracted function to be a bit
      more consistent with the rest of Clang's naming patterns.
      
      The next step will be breaking this apart so that we can go through
      different functions rather than tracking so many boolean variables.
      
      llvm-svn: 128898
      895904da
    • Chandler Carruth's avatar
      Fix PR9624 by explicitly disabling uninitialized warnings for direct self-init: · b5d4831f
      Chandler Carruth authored
        int x = x;
      
      GCC disables its warnings on this construct as a way of indicating that
      the programmer intentionally wants the variable to be uninitialized.
      Only the warning on the initializer is turned off in this iteration.
      
      This makes the code a lot more ugly, but starts commenting the
      surprising behavior here. This is a WIP, I want to refactor it
      substantially for clarity, and to determine whether subsequent warnings
      should be suppressed or not.
      
      llvm-svn: 128894
      b5d4831f
    • Chandler Carruth's avatar
      Cleanup the style of some of this code prior to functional changes. · 4e02182a
      Chandler Carruth authored
      I think this moves the code in the desired direction of the new style
      recommendations (and style conventional in Clang), but if anyone prefers
      the previous style, or has other suggestions just chime in and I'll
      follow up.
      
      llvm-svn: 128878
      4e02182a
    • Chandler Carruth's avatar
      Refactor one helper function to merely forward to another so that there · 7f3654f6
      Chandler Carruth authored
      is a single implementation. No functionality change intended.
      
      llvm-svn: 128877
      7f3654f6
    • Ted Kremenek's avatar
      Fix PR 9626 (duplicated self-init warnings under -Wuninitialized) with... · 37881934
      Ted Kremenek authored
      Fix PR 9626 (duplicated self-init warnings under -Wuninitialized) with numerous CFG and UninitializedValues analysis changes:
      
      1) Change the CFG to include the DeclStmt for conditional variables, instead of using the condition itself as a faux DeclStmt.
      2) Update ExprEngine (the static analyzer) to understand (1), so not to regress.
      3) Update UninitializedValues.cpp to initialize all tracked variables to Uninitialized at the start of the function/method.
      4) Only use the SelfReferenceChecker (SemaDecl.cpp) on global variables, leaving the dataflow analysis to handle other cases.
      
      The combination of (1) and (3) allows the dataflow-based -Wuninitialized to find self-init problems when the initializer
      contained control-flow.
      
      llvm-svn: 128858
      37881934
  2. Apr 04, 2011
  3. Apr 02, 2011
  4. Apr 01, 2011
    • Chandler Carruth's avatar
      Fix an error in TreeTransform where we failed to copy the TemplateName's · 3d7e3daa
      Chandler Carruth authored
      location into a TemplateSpecializationTypeLoc. These were found using
      a hand-written program to inspect every source location in
      TemplateSpecializationTypeLocs and Valgrind. I don't know of any way to
      test them in Clang's existing test suite sadly.
      
      Example code that triggers the ElaboratedType case:
        template <typename T> struct X1 {
          template <typename U> struct X1_1 {
            int x;
          };
        };
      
        template <typename T, typename U> struct X2 {
          typename X1<T>::template X1_1<U> B;
        };
      
        X2<char, int> x2;
      
      The other fix was simply spotted by inspection. I audited all constructions of
      [Dependent]TemplateSpecializationTypeLocs in TreeTransform.h, and the rest set
      the TemplateNameLoc properly.
      
      llvm-svn: 128702
      3d7e3daa
  5. Mar 31, 2011
  6. Mar 30, 2011
  7. Mar 29, 2011
  8. Mar 28, 2011
  9. Mar 27, 2011
  10. Mar 26, 2011
  11. Mar 25, 2011
Loading