[PATCH] D80822: Run syntax tree tests in many language modes
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 01:38:48 PDT 2020
gribozavr2 added inline comments.
================
Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:54-63
+ bool isCXX() const {
+ return Language == Lang_CXX || Language == Lang_CXX11 ||
+ Language == Lang_CXX14 || Language == Lang_CXX17 ||
+ Language == Lang_CXX2a;
+ }
+
+ bool isCXX11OrLater() const {
----------------
eduucaldas wrote:
> These could be on the clang/Testing
I agree, but I'll move this type in a future change, when I will be unifying the infrastructure with the one that we have in other tests. I'm afraid of moving it right now because I'm not sure it is the right abstraction.
================
Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:181
+
+ Invocation = createInvocationFromCommandLine(ArgsCStr, Diags, FS);
assert(Invocation);
----------------
eduucaldas wrote:
> Note: This already adds -fsyntax-only as a flag
It is not clear we can rely on that -- it seems like an implementation detail of `createInvocationFromCommandLine` that the TODO suggests should be changed.
================
Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:206
void expectTreeDumpEqual(StringRef Code, StringRef Tree,
bool RunWithDelayedTemplateParsing = true) {
+ SCOPED_TRACE(llvm::join(GetParam().getCommandLineArgs(), " "));
----------------
eduucaldas wrote:
> is RunWithDelayedTemplateParsing being used?
Indeed not -- removed!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80822/new/
https://reviews.llvm.org/D80822
More information about the cfe-commits
mailing list