[all-commits] [llvm/llvm-project] 57edf2: [Clang] Avoid calling hasBody() when calling getBo...

Nikolas Klauser via All-commits all-commits at lists.llvm.org
Wed Sep 9 08:34:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 57edf2997431add187956bd6637f8e83075db957
      https://github.com/llvm/llvm-project/commit/57edf2997431add187956bd6637f8e83075db957
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2026-09-09 (Wed, 09 Sep 2026)

  Changed paths:
    M clang/include/clang/AST/ASTNodeTraverser.h
    M clang/lib/AST/ODRHash.cpp
    M clang/lib/Analysis/UnsafeBufferUsage.cpp
    M clang/lib/CIR/CodeGen/CIRGenFunction.cpp
    M clang/lib/CodeGen/CoverageMappingGen.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
    M clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
    M clang/lib/StaticAnalyzer/Frontend/ModelConsumer.cpp

  Log Message:
  -----------
  [Clang] Avoid calling hasBody() when calling getBody() directly after (#221845)

`hasBody()` and `getBody()` are virtual functions, so calling them
multiple times should be avoided.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list