[clang-tools-extra] [clang-tidy] fix bugprone-sizeof-expression when sizeof expression with template types (PR #115275)
    Julian Schmidt via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Sat Nov  9 14:39:07 PST 2024
    
    
  
================
@@ -175,7 +175,8 @@ Changes in existing checks
 - Improved :doc:`bugprone-sizeof-expression
   <clang-tidy/checks/bugprone/sizeof-expression>` check to find suspicious
   usages of ``sizeof()``, ``alignof()``, and ``offsetof()`` when adding or
-  subtracting from a pointer directly or when used to scale a numeric value.
+  subtracting from a pointer directly or when used to scale a numeric value and
+  fix false positive when sizeof expression with template types.
----------------
5chmidti wrote:
> If there were no releases since this change, then there is no need for the release note entry. Basically you're hotfixing a change that is coming out in the same hypothetical next release.
I'm not sure what you meant here. There should be a release note, unless the issue was introduced in the current, release cycle. The diagnostic reproduces in clang-tidy 18 for me, or did you mean something different (e.g., general *in-case-of* comment)?
> clang-tidy release-note always combines the all changes of rule in one item instead of spilt them.
+1, that's the current approach
https://github.com/llvm/llvm-project/pull/115275
    
    
More information about the cfe-commits
mailing list