[PATCH] D105380: [clang] fixes named return of variables with dependent alignment

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 6 16:15:50 PDT 2021


mizvekov updated this revision to Diff 356833.
mizvekov added a comment.

- hasDependentAlignment now returns true for VarDecls with undeduced auto types.
- Add couple of tests that cover these kinds of VarDecls appearing:
  - Valid code with a range for loop in dependent context.
  - Error recovery on invalid initialization of auto variable in dependent context.

Remove `isInvalidDecl` check on FinalizeDeclaration for alignment of TLS variables,
as this is covered by the undeduced auto check above.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105380/new/

https://reviews.llvm.org/D105380

Files:
  clang/include/clang/AST/Decl.h
  clang/lib/AST/Decl.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaStmt.cpp
  clang/test/CXX/class/class.init/class.copy.elision/p3.cpp
  clang/test/CodeGen/nrvo-tracking.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105380.356833.patch
Type: text/x-patch
Size: 6497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210706/602f4a6f/attachment.bin>


More information about the cfe-commits mailing list