Skip to content
Snippets Groups Projects
  1. Aug 14, 2014
  2. Aug 09, 2014
  3. Aug 05, 2014
  4. Jul 29, 2014
  5. Jul 25, 2014
  6. Jul 24, 2014
  7. Jul 21, 2014
  8. Jul 18, 2014
    • Tyler Nowicki's avatar
      Recommit: Handle diagnostic warnings in Frontend diagnostic handler. · f123d908
      Tyler Nowicki authored
      Clang uses a diagnostic handler to grab diagnostic messages so it can print them
      with the line of source code they refer to. This patch extends this to handle
      optimization failures that were added to llvm to produce a warning when
      loop vectorization is explicitly specified (using a pragma clang loop directive)
      but fails.
      
      Update renames warning flag name to avoid indicating the flag's severity and
      adds a test.
      
      Reviewed by Alp Toker
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213400 91177308-0d34-0410-b5e6-96231b3b80d8
      f123d908
  9. Jul 17, 2014
  10. Jul 16, 2014
  11. Jun 26, 2014
  12. Jun 22, 2014
  13. Jun 16, 2014
  14. Jun 10, 2014
  15. Jun 06, 2014
  16. Jun 03, 2014
  17. May 29, 2014
  18. May 28, 2014
  19. May 14, 2014
  20. May 08, 2014
  21. May 05, 2014
  22. Apr 23, 2014
  23. Apr 22, 2014
  24. Apr 16, 2014
  25. Apr 15, 2014
  26. Apr 05, 2014
  27. Apr 04, 2014
  28. Mar 26, 2014
  29. Mar 21, 2014
  30. Mar 15, 2014
    • Ted Kremenek's avatar
      Further refine -Wunreachable-code groups so that -Wno-unreachable-code-break... · 2ce2d86e
      Ted Kremenek authored
      Further refine -Wunreachable-code groups so that -Wno-unreachable-code-break doesn't turn off all unreachable code warnings.
      
      Also relax unreachable 'break' and 'return' to not check for being
      preceded by a call to 'noreturn'.  That turns out to not be so
      interesting in practice.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204000 91177308-0d34-0410-b5e6-96231b3b80d8
      2ce2d86e
    • Ted Kremenek's avatar
      Start breaking -Wunreachable-code up into different diagnostic groups. · 5f5ef979
      Ted Kremenek authored
      Recent work on -Wunreachable-code has focused on suppressing uninteresting
      unreachable code that center around "configuration values", but
      there are still some set of cases that are sometimes interesting
      or uninteresting depending on the codebase.  For example, a dead
      "break" statement may not be interesting for a particular codebase,
      potentially because it is auto-generated or simply because code
      is written defensively.
      
      To address these workflow differences, -Wunreachable-code is now
      broken into several diagnostic groups:
      
      -Wunreachable-code: intended to be a reasonable "default" for
      most users.
      
      and then other groups that turn on more aggressive checking:
      
      -Wunreachable-code-break: warn about dead break statements
      
      -Wunreachable-code-trivial-return: warn about dead return statements
      that return "trivial" values (e.g., return 0).  Other return
      statements that return non-trivial values are still reported
      under -Wunreachable-code (this is an area subject to more refinement).
      
      -Wunreachable-code-aggressive: supergroup that enables all these
      groups.
      
      The goal is to eventually make -Wunreachable-code good enough to
      either be in -Wall or on-by-default, thus finessing these warnings
      into different groups helps achieve maximum signal for more users.
      
      TODO: the tests need to be updated to reflect this extra control
      via diagnostic flags.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203994 91177308-0d34-0410-b5e6-96231b3b80d8
      5f5ef979
  31. Mar 11, 2014
  32. Mar 05, 2014
  33. Feb 28, 2014
    • Tobias Grosser's avatar
      Add 'remark' diagnostic type in 'clang' · 9762c971
      Tobias Grosser authored
      A 'remark' is information that is not an error or a warning, but rather some
      additional information provided to the user. In contrast to a 'note' a 'remark'
      is an independent diagnostic, whereas a 'note' always depends on another
      diagnostic.
      
      A typical use case for remark nodes is information provided to the user, e.g.
      information provided by the vectorizer about loops that have been vectorized.
      
      This patch provides the initial implementation of 'remarks'. It includes the
      actual definiton of the remark nodes, their printing as well as basic parameter
      handling. We are reusing the existing diagnostic parameters which means a remark
      can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to
      an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade
      remarks.
      
      This patch is by intention minimal in terms of parameter handling. More
      experience and more discussions will most likely lead to further enhancements
      in the parameter handling.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202475 91177308-0d34-0410-b5e6-96231b3b80d8
      9762c971
    • Richard Smith's avatar
      Add a -Wclass-varargs to warn on objects of any class type being passed... · 93fe5668
      Richard Smith authored
      Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as:
      
        const char *format = "%s";
        std::experimental::string_view view = "foo";
        printf(format, view);
      
      In this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202461 91177308-0d34-0410-b5e6-96231b3b80d8
      93fe5668
  34. Feb 27, 2014
    • John McCall's avatar
      Diagnose attempts to apply ms_struct to records with base classes · f56a925b
      John McCall authored
      or virtual functions, but permit that error to be downgraded to
      a warning (with -Wno-error=incompatible-ms-struct), and officially
      support this kind of dual, ABI-mixing layout.
      
      The basic problem here is that projects which use ms_struct are often
      not very circumspect about what types they annotate; for example,
      some projects enable the pragma in a prefix header and then only
      selectively disable it around system header inclusions.  They may
      only care about binary compatibility with MSVC for a subset of
      those structs, but that doesn't mean they have no binary
      compatibility concerns at all for the rest; thus we are essentially
      forced into supporting this hybrid ABI.  But it's reasonable for
      us to at least point out the places where we're not making
      any guarantees.
      
      The original diagnostic was for dynamic classes, i.e. those with
      virtual functions or virtual bases; I've extended it to include
      all classes with bases, because we are not actually making any
      attempt to duplicate MSVC's base subobject layout in ms_struct
      (and it is indeed quite different from Itanium, even for
      non-virtual bases).
      
      rdar://16178895
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202427 91177308-0d34-0410-b5e6-96231b3b80d8
      f56a925b
  35. Feb 26, 2014
    • Richard Trieu's avatar
      PR16074, implement warnings to catch pointer to boolean true and pointer to · 2a66e6e5
      Richard Trieu authored
      null comparison when the pointer is known to be non-null.
      
      This catches the array to pointer decay, function to pointer decay and
      address of variables.  This does not catch address of function since this
      has been previously used to silence a warning.
      
      Pointer to bool conversion is under -Wbool-conversion.
      Pointer to null comparison is under -Wtautological-pointer-compare, a sub-group
      of -Wtautological-compare.
      
      void foo() {
        int arr[5];
        int x;
        // warn on these conditionals
        if (foo);
        if (arr);
        if (&x);
        if (foo == null);
        if (arr == null);
        if (&x == null);
      
        if (&foo);  // no warning
      }
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202216 91177308-0d34-0410-b5e6-96231b3b80d8
      2a66e6e5
Loading