[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:08 PDT 2024
================
@@ -177,14 +193,34 @@ class ASTNodeTraverser
if (!SQT.Quals.hasQualifiers())
return Visit(SQT.Ty);
- getNodeDelegate().AddChild([=] {
+ // SEI: changed from default label to "qualTypeDetail"
+ getNodeDelegate().AddChild("qualTypeDetail", [this, T] {
getNodeDelegate().Visit(T);
Visit(T.split().Ty);
});
+
+ // SEI function pointer support. this gets called whenever the three
+ // conditions are met:
+ // 1. the function pointer is not typedef'd
+ // 2. after Visit(VarDecl *) gets called
+ // 3. if VarDecl determines this is a function pointer
+ if (T->isFunctionPointerType()) {
+ // create as a child node to this type
----------------
AaronBallman wrote:
```suggestion
// This gets used whenever the three conditions are met:
// 1. the function pointer is not typedef'd
// 2. after Visit(VarDecl *) gets called
// 3. if VarDecl determines this is a function pointer
if (T->isFunctionPointerType()) {
// Create as a child node to this type.
```
https://github.com/llvm/llvm-project/pull/111705
More information about the cfe-commits
mailing list