[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

Matthias Gehre via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 21 15:58:39 PDT 2019


mgehre marked an inline comment as done.
mgehre added inline comments.


================
Comment at: cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp:9
+
+#include "../ASTMatchers/ASTMatchersTest.h"
+#include "clang/ASTMatchers/ASTMatchers.h"
----------------
thakis wrote:
> This weird relative include path is a hint that this isn't the intended use :)
True. But ...
I thought about copying the `matches` function from STMatchersTest.h, but together with all callees, that's many lines of code.
Alternatively, I could implement my own AST walking and property checking, but then the test would be much less readable.
As yet another alternative, I though about moving the `GslOwnerPointerInference.cpp` test itself to `unittests/ASTMatchers`,
but that would also be strange because it actually tests Sema functionality.

What would be your suggestion? (It's good that we discuss this now because I'm planning to extend this unit test further).


Repository:
  rL LLVM

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

https://reviews.llvm.org/D66179





More information about the cfe-commits mailing list