Skip to content
Commit 6d15a28a authored by Ilya Golovenko's avatar Ilya Golovenko Committed by Haojian Wu
Browse files

[clangd] Fix ParsedASTTest.TopLevelDecls test.

Google test matcher `DeclKind` uses `NamedDecl::getDeclKindName()` to compare its result with expected declaration name.
Both, returned value of this function and the expected kind name argument have type `const char *`, so this matcher effectively
compares two pointers instead of the respective strings.

The test was passing on most platforms because compilers mostly were able to coalesce these string literals.

Patch By: Ilya Golovenko

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D90384
parent 40f7ac1a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment