Skip to content
Snippets Groups Projects
  1. Feb 09, 2016
    • David Blaikie's avatar
      Simplify EnterTokenStream API to make it more robust for memory management · a3104319
      David Blaikie authored
      While this won't help fix things like the bug that r260219 addressed, it
      seems like good tidy up to have anyway.
      
      (it might be nice if "makeArrayRef" always produced a MutableArrayRef &
      let it decay to an ArrayRef when needed - then I'd use that for the
      MutableArrayRefs in this patch)
      
      If we had std::dynarray I'd use that instead of unique_ptr+size_t,
      ideally (but then it'd have to be threaded down through the Preprocessor
      all the way - no idea how painful that would be)
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260246 91177308-0d34-0410-b5e6-96231b3b80d8
      a3104319
  2. Feb 02, 2016
  3. Jan 31, 2016
    • Bruno Cardoso Lopes's avatar
      [Parser] Update CachedTokens while parsing ObjectiveC template argument list · a0d5dbf5
      Bruno Cardoso Lopes authored
      Consider the following ObjC++ snippet:
      
      --
      @protocol PA;
      @protocol PB;
      
      @class NSArray<ObjectType>;
      typedef int some_t;
      
      id<PA> FA(NSArray<id<PB>> *h, some_t group);
      --
      
      This would hit an assertion in the parser after generating an annotation token
      while trying to update the token cache:
      
      Assertion failed: (CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token")
      ...
      7 clang::Preprocessor::AnnotatePreviousCachedTokens(clang::Token const&) + 494
      8 clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool, bool, clang::CXXScopeSpec&, bool) + 1163
      9 clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) + 361
      10 clang::Parser::isCXXDeclarationSpecifier(clang::Parser::TPResult, bool*) + 598
      ...
      
      The cached preprocessor token in this case is:
      
      greatergreater '>>' Loc=<testcase.mm:7:24>
      
      while the annotation ("NSArray<id<PB>>") ends at "testcase.mm:7:25", hence the
      assertion.
      
      Properly update the CachedTokens during template parsing to contain
      two greater tokens instead of a greatergreater.
      
      Differential Revision: http://reviews.llvm.org/D15173
      
      rdar://problem/23494277
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259311 91177308-0d34-0410-b5e6-96231b3b80d8
      a0d5dbf5
  4. Jan 28, 2016
  5. Jan 26, 2016
  6. Jan 22, 2016
  7. Jan 07, 2016
  8. Dec 30, 2015
  9. Nov 18, 2015
  10. Nov 02, 2015
  11. Oct 22, 2015
  12. Oct 20, 2015
  13. Oct 16, 2015
  14. Oct 12, 2015
  15. Sep 24, 2015
  16. Sep 22, 2015
  17. Aug 27, 2015
  18. Aug 24, 2015
  19. Aug 19, 2015
  20. Aug 13, 2015
  21. Aug 09, 2015
  22. Aug 05, 2015
  23. Jul 17, 2015
  24. Jul 14, 2015
  25. Jul 11, 2015
  26. Jul 02, 2015
    • Ben Langmuir's avatar
      [Modules] Be consistent about finding a module for framework headers · 66f5404e
      Ben Langmuir authored
      We use findModuleForHeader() in several places, but in header search we
      were not calling it when a framework module didn't show up with the
      expected name, which would then lead to unexpected non-modular includes.
      Now we will find the module unconditionally for frameworks.  For regular
      frameworks, we use the spelling of the module name from the module map
      file, and for inferred ones we use the canonical directory name.
      
      In the future we might want to lock down framework modules sufficiently
      that these name mismatches cannot happen.
      
      rdar://problem/20465870
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241258 91177308-0d34-0410-b5e6-96231b3b80d8
      66f5404e
  27. Jul 01, 2015
  28. Jun 30, 2015
  29. Jun 25, 2015
  30. Jun 23, 2015
  31. Jun 22, 2015
  32. Jun 19, 2015
    • Douglas Gregor's avatar
      Introduced pragmas for audited nullability regions. · 109dad2d
      Douglas Gregor authored
      Introduce the clang pragmas "assume_nonnull begin" and "assume_nonnull
      end" in which we make default assumptions about the nullability of many
      unannotated pointers:
      
        - Single-level pointers are inferred to __nonnull
        - NSError** in a (function or method) parameter list is inferred to
          NSError * __nullable * __nullable.
        - CFErrorRef * in a (function or method) parameter list is inferred
          to CFErrorRef __nullable * __nullable.
        - Other multi-level pointers are never inferred to anything.
      
      Implements rdar://problem/19191042.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240156 91177308-0d34-0410-b5e6-96231b3b80d8
      109dad2d
  33. Jun 16, 2015
    • Richard Smith's avatar
      [modules] Simplify -cc1 interface for enabling implicit module maps. · 6e03dd94
      Richard Smith authored
      We used to have a flag to enable module maps, and two more flags to enable
      implicit module maps. This is all redundant; we don't need any flag for
      enabling module maps in the abstract, and we don't usually have -fno- flags for
      -cc1. We now have just a single flag, -fimplicit-module-maps, that enables
      implicitly searching the file system for module map files and loading them.
      
      The driver interface is unchanged for now. We should probably rename
      -fmodule-maps to -fimplicit-module-maps at some point.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239789 91177308-0d34-0410-b5e6-96231b3b80d8
      6e03dd94
  34. Jun 12, 2015
  35. Jun 11, 2015
  36. Jun 10, 2015
  37. Jun 05, 2015
  38. Jun 01, 2015
Loading