[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
Loading
Please sign in to comment