yronglin added a comment. Thanks for your suggestion @aaron.ballman , also I have added a new test case for C++ polymorphism classes
================ Comment at: clang/test/Sema/builtin-redecl.cpp:5-6 +#include <stddef.h> + // Redeclaring library builtins is OK. ---------------- aaron.ballman wrote: > yronglin wrote: > > aaron.ballman wrote: > > > We can be tricky instead of including a header file. > > Use `decltype` not works in C , can we use `typedef unsigned long size_t > > `instead? > Oh good catch, I had missed the `-x c` on a RUN line and was looking at the > file extension alone. :-) We can't use that typedef because there are some > platforms where that type is wrong, but we can be tricky in a different way: > `typedef __typeof__(sizeof(0)) size_t;` +1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133583/new/ https://reviews.llvm.org/D133583 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits