Skip to content
Snippets Groups Projects
  1. Jun 03, 2017
  2. Apr 01, 2017
  3. Dec 26, 2016
  4. Dec 07, 2016
  5. Nov 29, 2016
  6. Nov 28, 2016
  7. Jul 18, 2016
  8. Mar 16, 2016
  9. Jan 05, 2016
  10. Dec 29, 2015
  11. Dec 18, 2015
    • Richard Smith's avatar
      Split RequireCompleteType into a function that actually requires that the type · 5dbd903a
      Richard Smith authored
      is complete (with an error produced if not) and a function that merely queries
      whether the type is complete. Either way we'll trigger instantiation if
      necessary, but only the former will diagnose and recover from missing module
      imports.
      
      The intent of this change is to prevent a class of bugs where code would call
      RequireCompleteType(..., 0) and then ignore the result. With modules, we must
      check the return value and use it to determine whether the definition of the
      type is visible.
      
      This also fixes a debug info quality issue: calls to isCompleteType do not
      trigger the emission of debug information for a type in limited-debug-info
      mode. This allows us to avoid emitting debug information for type definitions
      in more cases where we believe it is safe to do so.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256049 91177308-0d34-0410-b5e6-96231b3b80d8
      5dbd903a
  12. Dec 17, 2015
  13. Oct 21, 2015
  14. Sep 21, 2015
  15. Sep 01, 2015
  16. Aug 27, 2015
  17. Aug 26, 2015
  18. Aug 03, 2015
  19. Jul 20, 2015
  20. Jul 14, 2015
  21. Jun 05, 2015
  22. Apr 27, 2015
  23. Mar 19, 2015
  24. Feb 04, 2015
  25. Feb 03, 2015
  26. Jan 22, 2015
  27. Jan 06, 2015
    • Saleem Abdulrasool's avatar
      Sema: analyze I,J,K,M,N,O constraints · 9e0e86b2
      Saleem Abdulrasool authored
      Add additional constraint checking for target specific behaviour for inline
      assembly constraints.  We would previously silently let all arguments through
      for these constraints.  In cases where the constraints were violated, we could
      end up failing to select instructions and triggering assertions or worse,
      silently ignoring instructions.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225244 91177308-0d34-0410-b5e6-96231b3b80d8
      9e0e86b2
  28. Dec 29, 2014
  29. Dec 11, 2014
  30. Oct 08, 2014
  31. Sep 22, 2014
  32. Sep 18, 2014
  33. Sep 06, 2014
    • Nico Weber's avatar
      Add -Wunused-local-typedef, a warning that finds unused local typedefs. · 4f2a6d6d
      Nico Weber authored
      The warning warns on TypedefNameDecls -- typedefs and C++11 using aliases --
      that are !isReferenced(). Since the isReferenced() bit on TypedefNameDecls
      wasn't used for anything before this warning it wasn't always set correctly,
      so this patch also adds a few missing MarkAnyDeclReferenced() calls in
      various places for TypedefNameDecls.
      
      This is made a bit complicated due to local typedefs possibly being used only
      after their local scope has closed. Consider:
      
          template <class T>
          void template_fun(T t) {
            typename T::Foo s3foo;  // YYY
            (void)s3foo;
          }
          void template_fun_user() {
            struct Local {
              typedef int Foo;  // XXX
            } p;
            template_fun(p);
          }
      
      Here the typedef in XXX is only used at end-of-translation unit, when YYY in
      template_fun() gets instantiated. To handle this, typedefs that are unused when
      their scope exits are added to a set of potentially unused typedefs, and that
      set gets checked at end-of-TU. Typedefs that are still unused at that point then
      get warned on. There's also serialization code for this set, so that the
      warning works with precompiled headers and modules. For modules, the warning
      is emitted when the module is built, for precompiled headers each time the
      header gets used.
      
      Finally, consider a function using C++14 auto return types to return a local
      type defined in a header:
      
          auto f() {
            struct S { typedef int a; };
            return S();
          }
      
      Here, the typedef escapes its local scope and could be used by only some
      translation units including the header. To not warn on this, add a
      RecursiveASTVisitor that marks all delcs on local types returned from auto
      functions as referenced. (Except if it's a function with internal linkage, or
      the decls are private and the local type has no friends -- in these cases, it
      _is_ safe to warn.)
      
      Several of the included testcases (most of the interesting ones) were provided
      by Richard Smith.
      
      (gcc's spelling -Wunused-local-typedefs is supported as an alias for this
      warning.)
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217298 91177308-0d34-0410-b5e6-96231b3b80d8
      4f2a6d6d
  34. Sep 05, 2014
  35. Aug 22, 2014
Loading