aaronpuchert added a comment.
Ah, I guess Ianded on an older version of this through a link and didn't
notice. Nevermind.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85613/new/
https://reviews.llvm.org/D85613
riccibruno marked 2 inline comments as done.
riccibruno added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:91
+ auto CheckAndDiagnoseLocalEntity = [&](const VarDecl *VD, unsigned DiagID,
+ const auto &... DiagArgs) -> bool
aaronpuchert added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:91
+ auto CheckAndDiagnoseLocalEntity = [&](const VarDecl *VD, unsigned DiagID,
+ const auto &... DiagArgs) -> bool {
+if (VD->isLocalVarDecl() &&
riccibruno updated this revision to Diff 284803.
riccibruno added a comment.
Remove the now-unused `const VarDecl *` parameter to `DiagnoseIfOdrUse`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85613/new/
https://reviews.llvm.org/D85613
Files:
riccibruno added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:112
//
if (DRE->isNonOdrUse() != NOUR_Unevaluated)
return S.Diag(DRE->getBeginLoc(),
This can use `DiagnoseIfOdrUse` as soon as the inconsistency between parameters
riccibruno added inline comments.
Comment at: clang/include/clang/AST/DeclCXX.h:3843
/// The declaration that this binding binds to part of.
+ // FIXME: Currently not set during deserialization of the BindingDecl;
+ // only set when the corresponding DecompositionDecl is
riccibruno updated this revision to Diff 284718.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85613/new/
https://reviews.llvm.org/D85613
Files:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDeclCXX.cpp
rsmith added inline comments.
Comment at: clang/include/clang/AST/DeclCXX.h:3843
/// The declaration that this binding binds to part of.
+ // FIXME: Currently not set during deserialization of the BindingDecl;
+ // only set when the corresponding DecompositionDecl is
riccibruno added inline comments.
Comment at: clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:51
+ extern void h8a(int = sizeof(z)); // ok
+ extern void h8b(int = w); // expected-error {{default argument
references local variable 'w'}}
riccibruno updated this revision to Diff 284364.
riccibruno marked 2 inline comments as done.
riccibruno edited the summary of this revision.
riccibruno added a comment.
Refer to the binding in the diagnostic.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
rsmith added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:101-105
+if (const VarDecl *HoldingVar = Binding->getHoldingVar()) {
+ // C++20 [dcl.struct.bind]p4:
+ // Each vi is the name [...] that refers to the object bound to ri
[...]
+ Decl =
riccibruno created this revision.
riccibruno added reviewers: rsmith, erichkeane, rjmccall.
riccibruno added a project: clang.
Herald added a subscriber: cfe-commits.
riccibruno requested review of this revision.
Currently clang accepts a default argument containing a structured binding
which is
12 matches
Mail list logo