Fixes issue #55216.
Details
- Reviewers
ilya-biryukov erichkeane aaron.ballman - Group Reviewers
Restricted Project - Commits
- rG7aa3270622f4: [clang] Add cxx scope if needed for requires clause.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Note that the following tests:
Builtins-i386-linux :: muldc3_test.c SanitizerCommon-asan-i386-Linux :: Linux/crypt_r.cpp SanitizerCommon-asan-i386-Linux :: Posix/crypt.cpp SanitizerCommon-lsan-i386-Linux :: Linux/crypt_r.cpp SanitizerCommon-lsan-i386-Linux :: Posix/crypt.cpp SanitizerCommon-ubsan-i386-Linux :: Linux/crypt_r.cpp SanitizerCommon-ubsan-i386-Linux :: Posix/crypt.cpp
Are failing at HEAD and at this base diff without this patch.
Thanks for the fix. This looks ok to me, except that I am a bit suspicious of the fact that DeclaratorScopeObj is used somewhat rarely.
I suspect we might want a different guard class for this, e.g. something similar to InitializerScopeRAII.
But I do not enough of the details for the corresponding code to know what the implications of these choices are.
@aaron.ballman could you PTAL or suggest someone who can help review this change?
clang/lib/Parse/ParseTemplate.cpp | ||
---|---|---|
294–299 | Merging ifs should produce simpler code. |
FWIW, I think this looks correct as well. I've added some reviewers just in case there's something I've missed regarding concepts.
clang/lib/Parse/ParseTemplate.cpp | ||
---|---|---|
293–301 | Can simplify even further with a new local. |
Like @ilya-biryukov , I don't really know enough of the uses of 'DeclaratorScopeObj ' to know if that is right, but other than Aaron's suggestions, I don't see anything to suggest.
Thanks for the feedback and the code review. I've uploaded a new revision with the requested changes, PTAL.
clang/lib/Parse/ParseTemplate.cpp | ||
---|---|---|
293 | Not sure about this type, should this be a reference? |
Make ScopeSpec a reference.
clang/lib/Parse/ParseTemplate.cpp | ||
---|---|---|
293 | Mm, good point. Fixed. |
Yes please, I'm hoping to earn committer rights with a series of C++20 patches :).
Name is Luke Nihlen, email is luken@google.com, github ID is luken-google@.
Thanks!