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: unassignedclangb...@nondot.org
Reporter: paul_robin...@playstation.sony.com
CC: kli...@google.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
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
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs