Skip to content

Instantly share code, notes, and snippets.

@xealits
Created January 11, 2025 15:01
Show Gist options
  • Save xealits/c5d5202d1c818157a6f1fb220a1e9c59 to your computer and use it in GitHub Desktop.
Save xealits/c5d5202d1c818157a6f1fb220a1e9c59 to your computer and use it in GitHub Desktop.
clang-query matches

Find references to non-const pointees:

clang-query -c "set output dump" -c "m varDecl(hasType(referenceType(pointee(unless(isConstQualified())))))" source.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment