[clang] [clang-tools-extra] [clang]: Support `analyzer_noreturn` attribute in `CFG` (PR #150952)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 29 02:03:46 PDT 2025
================
@@ -2668,6 +2668,10 @@ class FunctionDecl : public DeclaratorDecl,
/// an attribute on its declaration or its type.
bool isNoReturn() const;
+ /// Determines whether this function is known to be 'noreturn' for analyzer,
+ /// through an `analyzer_noreturn` attribute on its declaration.
+ bool isAnalyzerNoReturn() const;
----------------
Xazax-hun wrote:
Since this function is a very trivial check, I wonder if we need it or we could just inline its content at the use site. The function above `isNoReturn` is there because we have more cases to check. I don't have a strong feeling about this, I am fine either way.
https://github.com/llvm/llvm-project/pull/150952
More information about the cfe-commits
mailing list