aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from a testing request.



================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4243
+      if (FProto) {
+        QualType ParamType = FProto->getParamType(ParamIndex);
+        if (ParamMatcher.matches(ParamType, Finder, &ParamMatches)) {
----------------
JonasToth wrote:
> aaron.ballman wrote:
> > Should we be canonicalizing this type as well?
> I think here we shouldn't. In that case you could not match if e.g. the 
> parameter has a typedef. I think that would reduce possibilities for the 
> matcher usage.
Okay, that's a good point!


================
Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:868
+    std::make_unique<VerifyIdIsBoundTo<DeclRefExpr>>("arg")));
+}
+
----------------
I would like to see one K&R C test case just to be sure we're not doing 
anything horrible:
```
void f();
void call_it_1(void) { f(1.0f, 2.0f); } // Especially curious about type 
promotions

void f(a, b) float a, b; { }
void call_it_2(void) { f(1.0f, 2.0f); } // And if they differ here (IIRC, we 
may have a bug here in the compiler)
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72505



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to