-
Notifications
You must be signed in to change notification settings - Fork 17k
incorrect -Winfinite-recursion warning on potentially-unevaluated operand #21668
Copy link
Copy link
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Type
Fields
Give feedbackNo fields configured for issues without a type.
Extended Description
This:
#include
int f() {
typeid(f());
return 0;
}
gives:
:2:9: warning: all paths through this function will call itself [-Winfinite-recursion]
int f() {
^
... which is not true, because in this case the operand of typeid(...) is unevaluated.