summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerTracePC.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-12-14 17:44:11 +0000
committerReid Kleckner <rnk@google.com>2016-12-14 17:44:11 +0000
commit34a0f3dc2fcfec0ef5234407f0ea4cd473a6c166 (patch)
tree1d47638130c91626f3d83d54c39616bcd4b999ad /llvm/lib/Fuzzer/FuzzerTracePC.cpp
parent23025f8483f9aeab813d5e5d25ceb94e4ac95b3b (diff)
downloadbcm5719-llvm-34a0f3dc2fcfec0ef5234407f0ea4cd473a6c166.tar.gz
bcm5719-llvm-34a0f3dc2fcfec0ef5234407f0ea4cd473a6c166.zip
Improve our handling of tag decls in function prototypes
r289225 broke AST invariants by reparenting enumerators into function decl contexts. This improves things by only reparenting TagDecls while also attempting to preserve the lexical declcontext chain. The interesting example here is: int f(struct S { enum E { a = 1 } b; } c); The semantic contexts of E and S should be f, and the lexical context of S should be f and the lexical context of E should be S. We didn't do that with r289225, but now we should. This change should also improve our behavior on this example: void f() { extern void ext(struct S { } o); // S injected here } Before r289225 we would only remove 'S' from the surrounding tag injection context if it was the TU, but now we properly reparent S from f to ext. Fixes PR31366 llvm-svn: 289678
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerTracePC.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud