Page MenuHomePhabricator

Add utility for testing if we're matching nodes AsIs
ClosedPublic

Authored by steveire on Nov 10 2020, 1:47 AM.

Diff Detail

Unit TestsFailed

TimeTest
330 mslinux > Clang Tools.clang-tidy/checkers::bugprone-use-after-move.cpp
Script: -- : 'RUN: at line 1'; /usr/bin/python3.8 /mnt/disks/ssd0/agent/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /mnt/disks/ssd0/agent/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone-use-after-move.cpp bugprone-use-after-move /mnt/disks/ssd0/agent/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/Output/bugprone-use-after-move.cpp.tmp -- -- -std=c++17 -fno-delayed-template-parsing
70 mslinux > Clang Tools.clang-tidy/checkers::cert-static-object-exception.cpp
Script: -- : 'RUN: at line 1'; clang-tidy /mnt/disks/ssd0/agent/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cert-static-object-exception.cpp -checks="-*,cert-err58-cpp" -- -std=c++17 -target x86_64-pc-linux-gnu | FileCheck /mnt/disks/ssd0/agent/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cert-static-object-exception.cpp -check-prefix=CHECK-EXCEPTIONS -implicit-check-not="{{warning|error}}:"
200 mslinux > Clang-Unit.ASTMatchers/_/ASTMatchersTests::Traversal.traverseUnlessSpelledInSource
Note: Google Test filter = Traversal.traverseUnlessSpelledInSource [==========] Running 1 test from 1 test case. [----------] Global test environment set-up.
30 mslinux > Clang-Unit.Tooling/_/ToolingTests::StencilTest.AccessOpExplicitThis
Note: Google Test filter = StencilTest.AccessOpExplicitThis [==========] Running 1 test from 1 test case. [----------] Global test environment set-up.
30 mslinux > Clang-Unit.Tooling/_/ToolingTests::StencilTest.AccessOpImplicitThis
Note: Google Test filter = StencilTest.AccessOpImplicitThis [==========] Running 1 test from 1 test case. [----------] Global test environment set-up.
View Full Test Results (12 Failed)

Event Timeline

steveire created this revision.Nov 10 2020, 1:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2020, 1:47 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
steveire requested review of this revision.Nov 10 2020, 1:47 AM
aaron.ballman accepted this revision.Nov 10 2020, 5:20 AM

LGTM, thanks!

clang/lib/ASTMatchers/ASTMatchersInternal.cpp
195

I don't insist, but I do wonder if we want to inline the definition in the header file rather than put it in the implementation file so that call sites have an easier time inlining the functionality.

This revision is now accepted and ready to land.Nov 10 2020, 5:20 AM
steveire added inline comments.Nov 10 2020, 11:25 AM
clang/lib/ASTMatchers/ASTMatchersInternal.cpp
195

If I inline it I get

error: invalid use of incomplete type ‘class clang::ASTContext’

I think there was a drive at some point to use ASTContext less in header files.

aaron.ballman added inline comments.Nov 10 2020, 11:27 AM
clang/lib/ASTMatchers/ASTMatchersInternal.cpp
195

Thanks for checking!

This revision was landed with ongoing or failed builds.Nov 10 2020, 11:28 AM
This revision was automatically updated to reflect the committed changes.