aaron.ballman added inline comments.

================
Comment at: clang/include/clang/AST/TypeLoc.h:923
+  void initializeLocal(ASTContext &Context, SourceLocation loc) {}
+
+  QualType getInnerType() const { return getTypePtr()->getWrappedType(); }
----------------
Do we also need something like this? 
https://github.com/llvm/llvm-project/blob/main/clang/include/clang/AST/TypeLoc.h#L1187


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1144
+  SmallVector<llvm::Metadata *, 4> Annots;
+  auto BTFTagAttrTy = dyn_cast<BTFTagAttributedType>(PointeeTy);
+  while (BTFTagAttrTy) {
----------------
aaron.ballman wrote:
> 
This one may have been missed.


================
Comment at: clang/test/Sema/attr-btf_type_tag.c:31-37
+// The btf_type_tag attribute will be ignored during overloadable type matching
+void __attribute__((overloadable)) bar1(int __tag1 *a);
+void __attribute__((overloadable)) bar2(int *a);
+void foo2(int *a, int __tag1 *b) {
+  bar1(a);
+  bar2(b);
+}
----------------
This test looks confused -- those functions have different names, so they're 
not overloading one another. Even if they were named with the same identifier, 
it wouldn't be sufficient to test which gets called (you can redeclare 
overloads as in https://godbolt.org/z/aebMbY1aM).

I think this case needs a codegen test to see which function is actually 
dispatched to.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120296

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

Reply via email to