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
    • 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. Mar 19, 2011
  4. Mar 17, 2011
  5. Mar 15, 2011
  6. Mar 10, 2011
    • Ted Kremenek's avatar
      When doing reachability analysis for warnings issued under... · a099c595
      Ted Kremenek authored
      When doing reachability analysis for warnings issued under DiagRuntimeBehavior, don't construct a ParentMap or CFGStmtMap.
      Instead, create a small set of Stmt* -> CFGBlock* mappings during CFG construction for only the statements we care about
      relating to the diagnostics we want to check for reachability.
      
      llvm-svn: 127396
      a099c595
  7. Mar 03, 2011
  8. Mar 02, 2011
  9. Feb 23, 2011
  10. Feb 05, 2011
  11. Feb 03, 2011
  12. Feb 01, 2011
    • Ted Kremenek's avatar
      Add temporary hack to -Wuninitialize to create a separate CFG (for C++ code)... · 5b428844
      Ted Kremenek authored
      Add temporary hack to -Wuninitialize to create a separate CFG (for C++ code) that doesn't include implicit dtors.
      
      Implicit dtors confuse the ad hoc path-sensitivity of UninitializedValuesV2.cpp.  This isn't
      the ideal solution, as it will directly impact compile time, but should significantly reduce
      the noise of -Wuninitialized on some code bases.
      
      This immediately "fixes" the false positive reported in PR 9063, although this
      isn't the right fix in the long run.
      
      llvm-svn: 124667
      5b428844
  13. Jan 27, 2011
  14. Jan 26, 2011
    • Ted Kremenek's avatar
      Teach -Wreturn-type that destructors can appear · 5d068499
      Ted Kremenek authored
      after a 'return' in a CFGBlock.  This accidentally
      was working before, but the false assumption that
      'return' always appeared at the end of the block
      was uncovered by a recent change.
      
      llvm-svn: 124280
      5d068499
  15. Jan 25, 2011
  16. Jan 21, 2011
  17. Jan 18, 2011
  18. Jan 17, 2011
  19. Jan 16, 2011
  20. Jan 15, 2011
  21. Jan 08, 2011
    • Chandler Carruth's avatar
      Remove a kludge from analysis based warnings that used to detect · b35635e9
      Chandler Carruth authored
      temporaries with no-return destructors. The CFG now properly supports
      temporaries and implicit destructors which both makes this kludge no
      longer work, and conveniently removes the need for it.
      
      Turn on CFG handling of implicit destructors and initializers. Several
      ad-hoc benchmarks don't indicate any measurable performance impact from
      growing the CFG, and it fixes real correctness problems with warnings.
      
      As a result of turning on these CFG elements, we started to tickle an
      inf-loop in the unreachable code logic used for warnings. The fix is
      trivial.
      
      llvm-svn: 123056
      b35635e9
  22. Dec 15, 2010
    • Argyrios Kyrtzidis's avatar
      Fix diagnostic pragmas. · 1cb0de1d
      Argyrios Kyrtzidis authored
      Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state.
      Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect
      a lot of places, like C++ inline methods, template instantiations, the lexer, etc.
      
      Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location.
      
      Fixes rdar://8365684.
      
      llvm-svn: 121873
      1cb0de1d
  23. Dec 06, 2010
  24. Sep 16, 2010
  25. Sep 09, 2010
  26. Aug 26, 2010
  27. Aug 25, 2010
Loading