https://bugs.llvm.org/show_bug.cgi?id=49559

            Bug ID: 49559
           Summary: LibclangTest.cpp has an un-executed EXPECT_FALSE test
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: libclang
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

clang/unittests/libclang/LibclangTest.cpp has a test 
"clang_hasVarDeclGlobalStorageFalse" containing a lambda with this code:

        if (clang_getCursorKind(cursor) == CXCursor_VarDecl) {
          EXPECT_FALSE(clang_Cursor_hasVarDeclGlobalStorage(cursor));
          return CXChildVisit_Break;
        }
        return CXChildVisit_Continue;

However, the cursor kind is never CXCursor_VarDecl, and the EXPECT_FALSE
is never executed.  (Replacing with assert or llvm_unreachable does not fire.)


Found by the Rotten Green Tests project.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to