[PATCH] D56803: clang -dumpversion returns 4.2.1 for legacy reason, update it
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 25 10:08:17 PDT 2019
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
Code lgtm, with a suggestion to tighten the test.
================
Comment at: lib/Driver/Driver.cpp:1631
- // introduce a non-pedantically GCC compatible mode to Clang in which we
- // provide sensible definitions for -dumpversion, __VERSION__, etc.
- llvm::outs() << "4.2.1\n";
----------------
We really ought to reconsider `__VERSION__` as well, although I don't think anyone checks that. Today I get this for it:
"4.2.1 Compatible Clang 9.0.0 (git at github.com:llvm/llvm-project.git bd6354105b055af6193fb2b7561fe6f5ae0eb0d8)"
================
Comment at: test/Driver/immediate-options.c:10
// RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: 4.2.1
+// DUMPVERSION: {{[0-9]+\.[0-9]+.*}}
----------------
Maybe check `{{[0-9]+\.[0-9.]+}}`, to insist that it's a sequence of numbers and dots.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56803/new/
https://reviews.llvm.org/D56803
More information about the cfe-commits
mailing list