[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 8 02:48:55 PST 2023


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/unittests/StdLibTests.cpp:37
   EXPECT_THAT(CXX, HasSubstr("#include <cstdio>"));
-  EXPECT_THAT(CXX, Not(HasSubstr("#include <stdio.h>")));
+  EXPECT_THAT(CXX, HasSubstr("#include <stdio.h>"));
 
----------------
This is a behavior change, I think it is probably fine. Would be nice to have a second look.


================
Comment at: clang/unittests/Tooling/StandardLibraryTest.cpp:130
             stdlib::Symbol::named("std::chrono::", "system_clock"));
-  EXPECT_EQ(Recognizer(CDivT), stdlib::Symbol::named("", "div_t"));
-  EXPECT_EQ(Recognizer(CDivT),
----------------
this patch exposed a regression caused by 1285172c21ef4867d9f895c0b2ab0f338c46e36f. The test was passed accidentally (both return a `nullopt`). This patch contains the fix (in `StandardLibrary.cpp`). 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143214/new/

https://reviews.llvm.org/D143214



More information about the cfe-commits mailing list