Sugar, like ConstantExpr, causes an infinite expansion of the template object.
Details
- Reviewers
rsmith aaron.ballman - Commits
- rG44c793021d57: Merging r352307: --------------------------------------------------------------…
rL353031: Merging r352307:
rGff57307bd6b1: Remove Expr sugar decorating the CXXUuidofExpr node.
rL352307: Remove Expr sugar decorating the CXXUuidofExpr node.
rC352307: Remove Expr sugar decorating the CXXUuidofExpr node.
Diff Detail
- Repository
- rC Clang
Event Timeline
lib/Sema/SemaTemplate.cpp | ||
---|---|---|
6311 | IgnoreParenImpCasts() or are the paren expressions of value? | |
test/CodeGenCXX/pr40395.cpp | ||
1 ↗ | (On Diff #183149) | Why is this test in CodeGenCXX instead of SemaCXX? The RUN line doesn't seem to be testing anything? Should there be a -verify and // expected-no-diagnostics involved? It might also be a good idea to add some comments that explain the test case. |
lib/Sema/SemaTemplate.cpp | ||
---|---|---|
6311 | I want to make this a minimal change. Richard was okay with just the implicit casts. I'm not relaly qualified in this part of the code to say that we should also include parentheses in this. I'll leave that up to you and Richard. https://bugs.llvm.org/show_bug.cgi?id=40395 |
lib/Sema/SemaTemplate.cpp | ||
---|---|---|
6311 | A remark which I hope is relevant. Please ignore it if I am off the mark, or if it is obvious. I was looking at which of the Expr::Ignore* function to use for something else and it seems that IgnoreParenImpCasts() is *not* equivalent to doing IgnoreParens() + IgnoreImpCasts() until reaching a fixed point. This is very surprising given the name, and given that IgnoreParenCasts() *is* equivalent to doing IgnoreParens() + IgnoreCasts() until reaching a fixed point. From my notes:
|
LGTM!
lib/Sema/SemaTemplate.cpp | ||
---|---|---|
6311 |
Ah, thank you for the link, that helps!
That is surprising, and good to know! |
IgnoreParenImpCasts() or are the paren expressions of value?