[clang] modified AST for SEI redemption project (PR #111705)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 17 05:39:09 PDT 2024
================
@@ -410,8 +447,17 @@ class ASTNodeTraverser
Visit(T->getSizeExpr());
}
void VisitVectorType(const VectorType *T) { Visit(T->getElementType()); }
- void VisitFunctionType(const FunctionType *T) { Visit(T->getReturnType()); }
+ void VisitFunctionType(const FunctionType *T) {
+ // SEI: add functionDetails, incl. return type
+ getNodeDelegate().AddChild("functionDetails", [this, T] {
+ getNodeDelegate().VisitFunctionType(T);
+ getNodeDelegate().VisitReturnType(T->getReturnType());
+ });
+ }
+
void VisitFunctionProtoType(const FunctionProtoType *T) {
+
+ // SEI: visit the function type. this will force the return type info too.
----------------
AaronBallman wrote:
```suggestion
// Visiting the function type will force the return type info too.
```
https://github.com/llvm/llvm-project/pull/111705
More information about the cfe-commits
mailing list