[PATCH] D138559: Record macro references in #ifdef clause.

Viktoriia Bakalova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 24 03:20:26 PST 2022


VitaNuo added inline comments.


================
Comment at: clang-tools-extra/include-cleaner/unittests/RecordTest.cpp:249
+
+  Inputs.Code = MainFile.code();
+  auto AST = build();
----------------
hokein wrote:
> The `elifndef` and `elifdef` is a C++2b extension feature, so `Inputs.ExtraArgs.push_back("-std=c++2b");` to get rid of the `[-Wc++2b-extensions]` warning in the testcase.
Thanks!


================
Comment at: clang-tools-extra/include-cleaner/unittests/RecordTest.cpp:248
+  SourceManager &SM = AST.sourceManager();
+  ASSERT_THAT(Recorded.MacroReferences, Not(IsEmpty()));
+
----------------
hokein wrote:
> VitaNuo wrote:
> > hokein wrote:
> > > nit: this can be removed, as the EXPECT_THAT on line 258 covers this.
> > Sorry, not sure what this comment refers to. Can it be that the line numbering changed due to my newer patch, and this comment does not show up in the correct place anymore?
> yeah, the comment was attached to the old snapshot. it is the line 254 now (` ASSERT_THAT(Recorded.MacroReferences, Not(IsEmpty()));`).
Ok,removed the check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138559



More information about the cfe-commits mailing list