[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 10 11:53:04 PDT 2020


lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

Looks good to me, @aaron.ballman ?



================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-function-cognitive-complexity.cpp:1017
+
+static void dont_crash_on_weak() __attribute__((__weakref__("__dont_crash_on_weak")));
----------------



================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-function-cognitive-complexity.cpp:1018
+static void dont_crash_on_weak() __attribute__((__weakref__("__dont_crash_on_weak")));
\ No newline at end of file

----------------
Please do add a newline


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4650
 
+/// Matches weak function declarations.
+///
----------------
You also need to regenerate the html docs then


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89194/new/

https://reviews.llvm.org/D89194



More information about the cfe-commits mailing list