This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Add a test to justify skipping past references in UO_Deref
ClosedPublic

Authored by sgatev on Jan 18 2022, 8:25 AM.

Details

Summary

This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.

Diff Detail

Event Timeline

sgatev created this revision.Jan 18 2022, 8:25 AM
sgatev requested review of this revision.Jan 18 2022, 8:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2022, 8:25 AM
xazax.hun accepted this revision.Jan 18 2022, 9:08 AM
This revision is now accepted and ready to land.Jan 18 2022, 9:08 AM

Is it planned to support templated code this way?
I'm not entirely sure if this is worth pursuing as opposed to checking instantiations.

I also think that we should prefer checking instantiations. We have a single Clang-Tidy check that works on templates and I believe this is the only special support that it needs. We can revisit that later and remove this support if it proves to be unnecessary.

This revision was landed with ongoing or failed builds.Jan 18 2022, 1:28 PM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Jan 18 2022, 7:41 PM

This breaks tests on windows: http://45.33.8.238/win/52841/step_7.txt

Please take a look and revert for now if it takes a while to fix.

Thanks for sharing this. I reverted the patch and will look at why it fails on Windows.

@gribozavr2 suggested that this is probably because we use delayed template parsing on Windows for MSVC compatibility. I reproduced the error using the --target=x86_64-windows-msvc arg and verified that adding -fno-delayed-template-parsing arg fixes it.