[PATCH] D43687: Improve merging of debug locations (fixes PR 36410)

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 9 13:35:57 PST 2018


aprantl added a comment.

Testcase for the assertion:

  typedef long uptr;
  template <class> class A;
  template <class> class allocator;
  template <class, class, class> class __tree {
  public:
    void __root() noexcept;
    __tree(int);
    ~__tree();
    void clear() noexcept;
  };
  template <class _Tp, class _Compare, class _Allocator>
  __tree<_Tp, _Compare, _Allocator>::~__tree() {
    __root();
  }
  template <class _Tp, class _Compare, class _Allocator>
  void __tree<_Tp, _Compare, _Allocator>::clear() noexcept {
    __root();
  }
  template <class _Key, class _Compare = _Key, class _Allocator = allocator<_Key>>
  class set {
    typedef _Key value_type;
    typedef _Compare value_compare;
    typedef _Allocator allocator_type;
    typedef __tree<value_type, value_compare, allocator_type> __base;
    __base __tree_;
  
  public:
    set() : __tree_(value_compare()) {}
    void clear() { __tree_.clear(); }
  };
  template <class> void RemoveEdges() {
    set<uptr> s;
    for (int it; it; it++)
      s.clear();
  }
  void BVGraph_RemoveEdges_TestTestBody() { RemoveEdges<A<char>>(); }

Test script:

  $R/clang "-cc1" \
      "-triple" \
      "i386-apple-macosx10.9.0" \
      "-emit-obj" \
      "-disable-free" \
      "-main-file-name" \
      "sanitizer_bvgraph_test.cc" \
      "-mrelocation-model" \
      "pic" \
      "-pic-level" \
      "2" \
      "-mthread-model" \
      "posix" \
      "-mdisable-fp-elim" \
      "-fno-strict-return" \
      "-masm-verbose" \
      "-munwind-tables" \
      "-faligned-alloc-unavailable" \
      "-target-cpu" \
      "yonah" \
      "-dwarf-column-info" \
      "-debug-info-kind=line-tables-only" \
      "-dwarf-version=2" \
      "-debugger-tuning=lldb" \
      "-target-linker-version" \
      "299.9" \
      "-D" \
      "GTEST_NO_LLVM_RAW_OSTREAM=1" \
      "-D" \
      "GTEST_HAS_RTTI=0" \
      "-stdlib=libc++" \
      "-O2" \
      "-std=c++11" \
      "-fdeprecated-macro" \
      "-ferror-limit" \
      "19" \
      "-fmessage-length" \
      "0" \
      "-stack-protector" \
      "1" \
      "-fblocks" \
      "-fencode-extended-block-signature" \
      "-fno-rtti" \
      "-fobjc-runtime=macosx-fragile-10.9.0" \
      "-fobjc-subscripting-legacy-runtime" \
      "-fcxx-exceptions" \
      "-fexceptions" \
      "-fmax-type-align=16" \
      "-fdiagnostics-show-option" \
      "-vectorize-loops" \
      "-vectorize-slp" \
      "-x" \
      "c++" \
      "test.cpp" 2>&1 | grep "cast<Ty>() argument of incompatible type!"


Repository:
  rL LLVM

https://reviews.llvm.org/D43687





More information about the llvm-commits mailing list