-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clang][AST] Don't use canonical type when checking dependence in Type::isOverloadable #98563
Conversation
@llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) ChangesFixes #97646. Still need to add tests. Full diff: https://github.com/llvm/llvm-project/pull/98563.diff 1 Files Affected:
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h
index a2194361abd53..8b236af78ea22 100644
--- a/clang/include/clang/AST/Type.h
+++ b/clang/include/clang/AST/Type.h
@@ -8438,7 +8438,7 @@ inline bool Type::isUndeducedType() const {
/// Determines whether this is a type for which one can define
/// an overloaded operator.
inline bool Type::isOverloadableType() const {
- if (!CanonicalType->isDependentType())
+ if (!isDependentType())
return isRecordType() || isEnumeralType();
return !isArrayType() && !isFunctionType() && !isAnyPointerType() &&
!isMemberPointerType();
|
e4ff4eb
to
d60492d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, modulo
- missing release note
- can you move the test in a GH97646 namespace and put it in
decltype.cpp
,
or renametypeof_unqual.cpp
to typeof.cpp and put it there?
Maybe, while you are at it, add a test for __typeof_unqual
Thanks!
d60492d
to
5036207
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…e::isOverloadable (#98563) Summary: Fixes #97646. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250645
…e::isOverloadable (llvm#98563) Fixes llvm#97646. Conflicts: clang/docs/ReleaseNotes.rst clang/test/SemaCXX/decltype.cpp
…e::isOverloadable (llvm#98563) Fixes llvm#97646. Conflicts: clang/docs/ReleaseNotes.rst clang/test/SemaCXX/decltype.cpp
Fixes #97646.
Still need to add tests.