[clang] [clang-tools-extra] [clang]: Support `analyzer_noreturn` attribute in `CFG` (PR #150952)
Andrey Karlov via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 29 23:13:24 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;
----------------
negativ wrote:
The initial implementation of `isAnalyzerNoReturn()` was a bit more complex because it also invoked `isNoReturn()`. Subsequently, I moved away from this approach and decided to simplify the function, but I kept the function as an excellent entry point for potential future enhancements.
https://github.com/llvm/llvm-project/pull/150952
More information about the cfe-commits
mailing list