[PATCH] D54903: [Sema] Improve static_assert diagnostics.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 30 06:26:32 PST 2018
aaron.ballman added inline comments.
================
Comment at: lib/AST/NestedNameSpecifier.cpp:308-310
+ if (ResolveTemplateArguments && getAsRecordDecl()) {
+ if (const auto *Record =
+ dyn_cast<ClassTemplateSpecializationDecl>(getAsRecordDecl())) {
----------------
I'd remove the `getAsRecordDecl()` from the first `if` and instead use `dyn_cast_or_null` in the second `if`. Probably something like:
```
const auto *Record = dyn_cast_or_null<ClassTemplateSpecializationDecl>(getAsRecordDecl());
if (ResolveTemplateArguments && Record) {
}
```
================
Comment at: lib/AST/NestedNameSpecifier.cpp:332
"Elaborated type in nested-name-specifier");
- if (const TemplateSpecializationType *SpecType
- = dyn_cast<TemplateSpecializationType>(T)) {
+ if (const TemplateSpecializationType *SpecType =
+ dyn_cast<TemplateSpecializationType>(T)) {
----------------
This looks to be a spurious formatting change.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54903/new/
https://reviews.llvm.org/D54903
More information about the cfe-commits
mailing list