Skip to content
Snippets Groups Projects
  1. Feb 23, 2016
  2. Feb 22, 2016
  3. Feb 21, 2016
    • Duncan P. N. Exon Smith's avatar
      Lex: Never overflow the file in HeaderMap::lookupFilename() · 839cd13b
      Duncan P. N. Exon Smith authored
      If a header map file is corrupt, the strings in the string table may not
      be null-terminated.  The logic here previously relied on `MemoryBuffer`
      always being null-terminated, but this isn't actually guaranteed by the
      class AFAICT.  Moreover, we're seeing a lot of crash traces at calls to
      `strlen()` inside of `lookupFilename()`, so something is going wrong
      there.
      
      Instead, use `strnlen()` to get the length, and check for corruption.
      
      Also remove code paths that could call `StringRef(nullptr)`.  r261459
      made these rather obvious (although they'd been there all along).
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261461 91177308-0d34-0410-b5e6-96231b3b80d8
      839cd13b
  4. Feb 20, 2016
  5. Feb 18, 2016
  6. Feb 16, 2016
  7. Feb 15, 2016
  8. Feb 12, 2016
  9. Feb 11, 2016
  10. Feb 09, 2016
  11. Feb 08, 2016
    • Nico Weber's avatar
      Make ParentMap work with explicit specializations of function templates. · bd72f06a
      Nico Weber authored
      For an explicit specialization, we first build a FunctionDecl, and then
      we call SubstDecl() on it to build a second FunctionDecl, which has the
      first FunctionDecl as canonical decl.
      
      The address of an explicit specialization of function template used to be the
      canonical decl of the FunctionDecl.  This is different from all the other
      DeduceTemplateArguments() calls in SemaOverload, and since the canonical decl
      isn't visited by ParentMap while the redecl is, it also made ParentMap assert
      when computing the parent of a address-of-explicit-specialization-fun-template.
      
      To fix, remove the getCanonicalDecl() call.  No behavior difference for clang,
      but it fixes an assert in ParentMap (which is e.g. used by libTooling).
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260159 91177308-0d34-0410-b5e6-96231b3b80d8
      bd72f06a
    • Daniel Jasper's avatar
      clang-format: Fix weird alignment when not aligning after brackets. · 7bb97b21
      Daniel Jasper authored
      Before:
        bbbbbbbbbbbb(aaaaaaaaaaaaaaaaaaaaaaaa, //
            ccccccc(aaaaaaaaaaaaaaaaa, //
      	           b));
      
      After:
        bbbbbbbbbbbb(aaaaaaaaaaaaaaaaaaaaaaaa, //
            ccccccc(aaaaaaaaaaaaaaaaa, //
           	  b));
      
      This fixes llvm.org/PR24905.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260080 91177308-0d34-0410-b5e6-96231b3b80d8
      7bb97b21
  12. Feb 07, 2016
  13. Feb 05, 2016
  14. Feb 03, 2016
  15. Feb 02, 2016
  16. Feb 01, 2016
  17. Jan 29, 2016
Loading