Skip to content

Conversation

@HerrCai0907
Copy link
Contributor

No description provided.

@HerrCai0907 HerrCai0907 merged commit 68a48ec into llvm:main Nov 24, 2024
5 of 7 checks passed
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:analysis labels Nov 24, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 24, 2024

@llvm/pr-subscribers-clang-analysis

@llvm/pr-subscribers-clang

Author: Congcong Cai (HerrCai0907)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/117467.diff

1 Files Affected:

  • (modified) clang/lib/Analysis/ExprMutationAnalyzer.cpp (+1-1)
diff --git a/clang/lib/Analysis/ExprMutationAnalyzer.cpp b/clang/lib/Analysis/ExprMutationAnalyzer.cpp
index 5a95ef36d05024..a94b22e051d0e1 100644
--- a/clang/lib/Analysis/ExprMutationAnalyzer.cpp
+++ b/clang/lib/Analysis/ExprMutationAnalyzer.cpp
@@ -231,11 +231,11 @@ ExprMutationAnalyzer::Analyzer::findPointeeMutation(const Decl *Dec) {
 const Stmt *ExprMutationAnalyzer::Analyzer::findMutationMemoized(
     const Expr *Exp, llvm::ArrayRef<MutationFinder> Finders,
     Memoized::ResultMap &MemoizedResults) {
+  // Assume Exp is not mutated before analyzing Exp.
   auto [Memoized, Inserted] = MemoizedResults.try_emplace(Exp);
   if (!Inserted)
     return Memoized->second;
 
-  // Assume Exp is not mutated before analyzing Exp.
   if (isUnevaluated(Exp))
     return nullptr;
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:analysis clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants