Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

Enable disabled but passing tests #567

Closed martong closed 5 years ago

martong commented 5 years ago

Actually we never reach that point to check the expressions. We return earlier here:

static bool IsEquivalentExceptionSpec(StructuralEquivalenceContext &Context,
                                      const FunctionProtoType *Proto1,
                                      const FunctionProtoType *Proto2) {

  auto Spec1 = Proto1->getExceptionSpecType();
  auto Spec2 = Proto2->getExceptionSpecType();

  if (isUnresolvedExceptionSpec(Spec1) || isUnresolvedExceptionSpec(Spec2))
    return true;

  if (Spec1 != Spec2)
    return false;   <<<<<<<< WE RETURN HERE.
  // ...

Spec1 and Spec2 are enum values, and they are different in this case:

(gdb) p Spec1
$1 = clang::EST_NoexceptFalse
(gdb) p Spec2
$2 = clang::EST_NoexceptTrue
(gdb)
martong commented 5 years ago

https://reviews.llvm.org/D62066