HomePhabricator

[clang] Do not traverse EnumDecl's type in RecursiveASTVisitor

Authored by kbobyrev on Oct 26 2021, 8:10 AM.

Description

[clang] Do not traverse EnumDecl's type in RecursiveASTVisitor

This is inconsistent with the code and comments in
RecursiveASTVisitor.h and is not a correct behavior:

https://github.com/llvm/llvm-project/blob/main/clang/include/clang/AST/RecursiveASTVisitor.h#L1879-L1880

We shouldn't traverse D->getTypeForDecl(); it's a result of
declaring the type, not something that was written in the source.

Fixes the failures in 1c2e249f938c50e1b331a1f7adc83c0a381f3897

Details

Committed
kbobyrevOct 26 2021, 8:17 AM
Parents
rG082d2ad015bd: [libFuzzer] Improve corpus replacement unit test.
Branches
Unknown
Tags
Unknown