diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/Analysis/CalledOnceCheck.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Analysis/CalledOnceCheck.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/llvm-project/clang/lib/Analysis/CalledOnceCheck.cpp b/contrib/llvm-project/clang/lib/Analysis/CalledOnceCheck.cpp index 04c5f6aa9c74..30cbd257b65e 100644 --- a/contrib/llvm-project/clang/lib/Analysis/CalledOnceCheck.cpp +++ b/contrib/llvm-project/clang/lib/Analysis/CalledOnceCheck.cpp @@ -163,7 +163,7 @@ public: NotVisited = 0x8, /* 1000 */ // We already reported a violation and stopped tracking calls for this // parameter. - Reported = 0x15, /* 1111 */ + Reported = 0xF, /* 1111 */ LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ Reported) }; @@ -932,7 +932,8 @@ private: ParameterStatus &CurrentParamStatus = CurrentState.getStatusFor(Index); // Escape overrides whatever error we think happened. - if (CurrentParamStatus.isErrorStatus()) { + if (CurrentParamStatus.isErrorStatus() && + CurrentParamStatus.getKind() != ParameterStatus::Kind::Reported) { CurrentParamStatus = ParameterStatus::Escaped; } } |