[PATCH] D18424: [Clang] Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 5 13:39:27 PDT 2016


On Tue, Apr 5, 2016 at 4:32 PM, Eugene Zelenko <eugene.zelenko at gmail.com> wrote:
> Eugene.Zelenko added inline comments.
>
> ================
> Comment at: include/clang-c/Index.h:19
> @@ -18,1 +18,3 @@
>
> +#ifdef __cplusplus
> +#include <ctime>
> ----------------
> aaron.ballman wrote:
>> Is this produced by the deprecated headers check? If not, what value does ctime add over time.h?
> Yes, since file is include from C and C++.

Ugh, so basically the deprecated headers check will always bark about
this inclusion, despite time.h being a simpler alternative. I'm not
too keen on that behavior of the check in this case -- I would prefer
to leave it as time.h if possible, but don't want the clang-tidy check
to always diagnose this case. Thoughts?

~Aaron

>
> ================
> Comment at: lib/Lex/ModuleMap.cpp:1286
> @@ -1284,3 +1285,3 @@
>    };
> -}
> +} // end anonymous namespaces
>
> ----------------
> aaron.ballman wrote:
>> namespace instead of namespaces
> Will fix in commit.
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D18424
>
>
>


More information about the cfe-commits mailing list