This cleanup patch refactors a bunch of functional duplicates of
getDecltypeForParenthesizedExpr into a common implementation.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Paths
| Differential D100713
[clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr ClosedPublic Authored by mizvekov on Apr 17 2021, 6:51 PM.
Details Summary This cleanup patch refactors a bunch of functional duplicates of Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Diff Detail
Unit TestsFailed
Event TimelineComment Actions It seems that using is*Value and the introduction of getDecltypeForParenthesizedExpr could be two separate changes.
mizvekov retitled this revision from [clang] NFC: refactor usage of getDecltypeForParenthesizedExpr and getValueKind to [clang] NFC: refactor usage of getDecltypeForParenthesizedExpr.Apr 18 2021, 1:22 PM mizvekov added a child revision: D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.Apr 21 2021, 12:25 PM mizvekov removed a child revision: D100000: [clang] WIP: Implement simpler alternative to two-phase lookup for NRVO. Comment Actions Again, I'm not sure if it helps to use getDecltypeForParenthesizedExpr where we don't actually have the decltype of a parenthesized expression. It's probably not entirely coincidental, but things aren't defined this way.
Comment Actions
The current situation with getDecltypeForParenthesizedExpr is that it already is used in some places where there is no decltype of a parenthesized expression either. This function is a bit new, I introduced it in D98160. I think the mnemonic is OK, but this is the best I could come up at the time. If you have better suggestions, I am all for it. I think it's no coincidence that for the patch I am working on, I had to change all of these copies in exactly the same way :)
mizvekov retitled this revision from [clang] NFC: refactor usage of getDecltypeForParenthesizedExpr to [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr.Jun 9 2021, 2:52 PM mizvekov removed a child revision: D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.Jun 28 2021, 9:20 AM Comment Actions
This revision is now accepted and ready to land.Jul 28 2021, 1:01 PM Closed by commit rG0c7cd4a87313: [clang] NFC: refactor multiple implementations of… (authored by mizvekov). · Explain WhyJul 28 2021, 2:29 PM This revision was automatically updated to reflect the committed changes. mizvekov marked an inline comment as done.
Revision Contents
Diff 338350 clang/include/clang/AST/ASTContext.h
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Expr.cpp
clang/lib/AST/ExprClassification.cpp
clang/lib/AST/ExprObjC.cpp
clang/lib/CodeGen/CGDecl.cpp
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaConcept.cpp
clang/lib/Sema/SemaCoroutine.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaInit.cpp
clang/lib/Sema/SemaType.cpp
clang/lib/StaticAnalyzer/Core/CallEvent.cpp
|
This check doesn't seem like it belongs here.