efriedma added a comment. I'm happy with this approach.
================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4327 + if (D && D->hasAttr<AnnotateAttr>() && isa<llvm::Function>(Entry)) + DeferredAnnotations[cast<llvm::Function>(Entry)] = cast<ValueDecl>(D); + ---------------- This doesn't quite seem sufficient... I'd expect you'd want to update the map when you see a new declaration. Otherwise we miss annotations on something like: ``` void foo(void); void *xxx = (void*)foo; void __attribute__((annotate("bar"))) foo(); ``` Granted, I wouldn't expect this sort of construct to show up normally, and I'm not sure how hard this is to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156172/new/ https://reviews.llvm.org/D156172 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits