[PATCH] D48341: [clang-doc] Refactoring mapper to map by scope

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 2 03:37:46 PDT 2018

ioeric accepted this revision.
ioeric added inline comments.
This revision is now accepted and ready to land.

Comment at: clang-tools-extra/test/clang-doc/bc-linkage.cpp:106
+// CHECK-0-NEXT: <RecordBlock NumWords=107 BlockCodeSize=4>
+// CHECK-0-NEXT:   <USR abbrevid=4 op0=20 op1=201 op2=179 op3=183 op4=26 op5=205 op6=216 op7=76 op8=91 op9=179 op10=32 op11=211 op12=78 op13=151 op14=103 op15=119 op16=21 op17=205 op18=179 op19=234 op20=50/>
+// CHECK-0-NEXT:   <Name abbrevid=5 op0=10/> blob data = 'InnerClass'
juliehockett wrote:
> ioeric wrote:
> > I'm still a bit concerned about hardcoding a lot of USRs in tests. They are not interpretable and generally not interesting for testing. Also as they are auto-generated,   it's hard to tell whether they are actually the desired USRs. I'm concerned because the maintenance is getting higher as number of tests grows - everyone changing USR semantics in the future has to know to regenerate clang-doc tests, this can be annoying and potentially unmanageable when a small change in clang USR requires changes to many test files in clang-tools-extra :( Comparing to the value it brings to test USRs in all tests, I'd still suggest  simply matching them with a `{{.*}}`and only test USRs in few tests where you are actually interested in them.
> Okay, I updated it to only check the length -- is that reasonable?

FWIW, I wouldn't check the length either as it seems to add too much overhead; I think checking length/USR in one test should get it well covered. 


More information about the cfe-commits mailing list