1. Oct 04, 2013
    • Jordan Rose's avatar
      [analyzer] Replace bug category magic strings with shared constants. · 761ee868
      Jordan Rose authored
      One small functionality change is to bring the sizeof-pointer checker in
      line with the other checkers by making its category be "Logic error"
      instead of just "Logic". There should be no other functionality changes.
      
      Patch by Daniel Marjamäki!
      
      llvm-svn: 191910
      761ee868
    • Jordan Rose's avatar
      [analyzer] Add new debug helper clang_analyzer_warnIfReached. · 9db2d9ad
      Jordan Rose authored
      This will emit a warning if a call to clang_analyzer_warnIfReached is
      executed, printing REACHABLE. This is a more explicit way to declare
      expected reachability than using clang_analyzer_eval or triggering
      a bug (divide-by-zero or null dereference), and unlike the former will
      work the same in inlined functions and top-level functions. Like the
      other debug helpers, it is part of the debug.ExprInspection checker.
      
      Patch by Jared Grubb!
      
      llvm-svn: 191909
      9db2d9ad
    • Dmitry Vyukov's avatar
      asan/msan/tsan: fix broken linux syscalls · c967d2f4
      Dmitry Vyukov authored
      Currently the following source code:
      
      u64 NanoTime() {
        kernel_timeval tv = {};
        internal_syscall(__NR_gettimeofday, &tv, 0);
        return (u64)tv.tv_sec * 1000*1000*1000 + tv.tv_usec * 1000;
      }
      
      generates the following assembly:
      
      Dump of assembler code for function __sanitizer::NanoTime():
      => 0x00007ff30657d380 <+0>:	lea    -0x10(%rsp),%rdi
         0x00007ff30657d385 <+5>:	xor    %esi,%esi
         0x00007ff30657d387 <+7>:	mov    $0x60,%eax
         0x00007ff30657d38c <+12>:	syscall 
         0x00007ff30657d38e <+14>:	mov    $0,%eax
         0x00007ff30657d393 <+19>:	retq   
      
      with this change:
      
      Dump of assembler code for function __sanitizer::NanoTime():
      => 0x00007faab834f380 <+0>:	movq   $0x0,-0x10(%rsp)
         0x00007faab834f389 <+9>:	movq   $0x0,-0x8(%rsp)
         0x00007faab834f392 <+18>:	lea    -0x10(%rsp),%rdi
         0x00007faab834f397 <+23>:	xor    %esi,%esi
         0x00007faab834f399 <+25>:	mov    $0x60,%eax
         0x00007faab834f39e <+30>:	syscall 
         0x00007faab834f3a0 <+32>:	mov    -0x8(%rsp),%rax
         0x00007faab834f3a5 <+37>:	mov    -0x10(%rsp),%rcx
         0x00007faab834f3aa <+42>:	imul   $0x3e8,%rax,%rdx
         0x00007faab834f3b1 <+49>:	imul   $0x3b9aca00,%rcx,%rax
         0x00007faab834f3b8 <+56>:	add    %rdx,%rax
         0x00007faab834f3bb <+59>:	retq   
      
      llvm-svn: 191908
      c967d2f4
    • Argyrios Kyrtzidis's avatar
      53f45c7d
    • Argyrios Kyrtzidis's avatar
      [libclang] Introduce clang_Type_getClassType which returns the class type of a member pointer type. · 7a4253b6
      Argyrios Kyrtzidis authored
      Patch by Che-Liang Chiou!
      
      llvm-svn: 191906
      7a4253b6
  2. Oct 03, 2013