[PATCH] D23135: [clang-tidy] misc-argument-comment non-strict mode

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 4 06:48:55 PDT 2016


aaron.ballman added inline comments.

================
Comment at: clang-tidy/misc/ArgumentCommentCheck.cpp:124
@@ +123,3 @@
+  InDecl = InDecl.trim('_');
+  return InComment.compare_lower(InDecl) == 0;
+}
----------------
Correct, which means this won't behave properly in some locales with UTF-8 identifiers. Consider Turkish, where İ (U+0130 “Latin Capital Letter I With Dot Above”) is the uppercase form of ı (U+0131 “Latin Small Letter Dotless I”). If the comment contains one version while the identifier contains the other, the comparison will currently fail, while a locale-aware comparison would succeed. You run into similar things with SS vs ß in German as well, where the uppercase form is two characters while the lowercase is only a single character.


https://reviews.llvm.org/D23135





More information about the cfe-commits mailing list