[PATCH] D57087: [clang-tidy] add OverrideMacro to modernize-use-override check

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 23 10:19:28 PST 2019


MyDeveloperDay added a comment.

In D57087#1367610 <https://reviews.llvm.org/D57087#1367610>, @alexfh wrote:

> I tend to think that a better migration strategy is to change the compiler to a C++11-compatible one first, and then turn on C++11 mode and migrate the code (possibly file-by-file or with a different granularity). But if you observe a situation where compatibility macros for C++11 constructs are actually a better way to migrate, then the proposed functionality makes sense.


@alexfh,  I couldn't agree more, however unfortunately if you are having to support a common code base which also supports older platforms like HPUX, Solaris, AIX even getting a C++11 compiler can be more of a challenge! Those platforms have expensive commercial compilers but are often lacking behind the standards.  If your lucky you can find a  gcc that will work but it tends to be a low version one. And then building a later gcc on those platforms is often a challenge too, even if you can get it and your code to build you often meet other hard to find issues with the final binary.

This is similar to the discussion about getting clang to compile with a minimum C++14 or C++17 compiler, it can be hard to pull the toolchain up to the level where all the supported platforms still work.

Having said all this I appreciate the code review comments, let me take a look at rewriting the bits you highlighted...which I totally agree with and think it makes for a cleaner solution. (I was trying not alter the code too much around line 120)


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

https://reviews.llvm.org/D57087





More information about the cfe-commits mailing list