Skip to content
  1. Jul 03, 2013
    • Daniel Jasper's avatar
      Prevent error message when formatting an empty file. · 09573741
      Daniel Jasper authored
      This fixes llvm.org/PR16514.
      
      llvm-svn: 185531
      09573741
    • Daniel Jasper's avatar
      Don't insert confusing line breaks in comparisons. · 7ae41cdd
      Daniel Jasper authored
      In general, clang-format breaks after an operator if the LHS spans
      multiple lines. Otherwise, this can lead to confusing effects and
      effectively hide the operator precendence, e.g. in
      
      if (aaaaaaaaaaaaaa ==
              bbbbbbbbbbbbbb && c) { ...
      
      This patch removes this rule for comparisons, if the LHS is not a binary
      expression itself as many users were wondering why clang-format inserts
      an unnecessary linebreak.
      
      Before:
      if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
              aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) >
          5) { ...
      
      After:
      if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
              aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) > 5) { ...
      
      In the long run, we might:
      - Want to do this for other binary expressions as well.
      - Do this only if the RHS is short or even only if it is a literal.
      
      llvm-svn: 185530
      7ae41cdd
    • Pavel Labath's avatar
      [analyzer] Improve handling of noreturn destructors · f77e7368
      Pavel Labath authored
      Summary:
      The analyzer incorrectly handled noreturn destructors which were hidden inside
      function calls. This happened because NoReturnFunctionChecker only listened for
      PostStmt events, which are not executed for destructor calls. I've changed it to
      listen to PostCall events, which should catch both cases.
      
      Reviewers: jordan_rose
      
      CC: cfe-commits
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1056
      
      llvm-svn: 185522
      f77e7368
    • Serge Pavlov's avatar
      Fixed test options. · b4bbae07
      Serge Pavlov authored
      llvm-svn: 185493
      b4bbae07
    • Kaelyn Uhrain's avatar
      Allow typo correction to try removing nested name specifiers. · 10413a46
      Kaelyn Uhrain authored
      The removal is tried by retrying the failed lookup of a correction
      candidate with either the MemberContext or SS (CXXScopeSpecifier) or
      both set to NULL if they weren't already. If the candidate identifier
      is then looked up successfully, make a note in the candidate that the
      SourceRange should include any existing nested name specifier even if
      the candidate isn't adding a different one (i.e. the candidate has a
      NULL NestedNameSpecifier).
      
      Also tweak the diagnostic messages to differentiate between a suggestion
      that just replaces the identifer but leaves the existing nested name
      specifier intact and one that replaces the entire qualified identifier,
      in cases where the suggested replacement is unqualified.
      
      llvm-svn: 185487
      10413a46
    • Kaelyn Uhrain's avatar
      Look for corrections in enclosing namespaces that require a global NestedNameSpecifier. · b18b0c0f
      Kaelyn Uhrain authored
      CorrectTypo will now see and consider those corrections that are effectively
      shadowed by other declarations in a closer context when resolved via an
      unqualified lookup. This involves adding any parent namespaces to the set of
      namespaces as fully-qualified name specifiers, and also adding potential
      corrections that passed name lookup but were rejected by the given
      CorrectionCandidateCallback into the set of failed corrections that should be
      tried with the set of namespace specifiers.
      
      llvm-svn: 185486
      b18b0c0f
    • Manman Ren's avatar
      Debug Info: set default to gdwarf-2 for Darwin. · 38db0920
      Manman Ren authored
      Darwin systems currently do not support dwarf version 3 or above. When we are
      ready, we can bump the default to gdwarf-4 for Darwin.
      
      For other systems, the default is dwarf version 3, if everything goes smoothly,
      we can bump the version to 4.
      
      rdar://13591116
      
      llvm-svn: 185483
      38db0920
  2. Jul 02, 2013
  3. Jul 01, 2013
Loading