-
- Downloads
[clang] retain type sugar in auto / template argument deduction
This implements the following changes: * AutoType retains sugared deduced-as-type. * Template argument deduction machinery analyses the sugared type all the way down. It would previously lose the sugar on first recursion. * Undeduced AutoType will be properly canonicalized, including the constraint template arguments. * Remove the decltype node created from the decltype(auto) deduction. As a result, we start seeing sugared types in a lot more test cases, including some which showed very unfriendly `type-parameter-*-*` types. Signed-off-by:Matheus Izvekov <mizvekov@gmail.com> Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D110216
Showing
- clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp 3 additions, 15 deletions...-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
- clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp 5 additions, 3 deletions...idy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp
- clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp 9 additions, 5 deletions...tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp
- clang-tools-extra/clangd/FindTarget.cpp 1 addition, 1 deletionclang-tools-extra/clangd/FindTarget.cpp
- clang-tools-extra/clangd/InlayHints.cpp 3 additions, 4 deletionsclang-tools-extra/clangd/InlayHints.cpp
- clang-tools-extra/clangd/unittests/ASTTests.cpp 4 additions, 5 deletionsclang-tools-extra/clangd/unittests/ASTTests.cpp
- clang-tools-extra/clangd/unittests/HoverTests.cpp 6 additions, 6 deletionsclang-tools-extra/clangd/unittests/HoverTests.cpp
- clang-tools-extra/clangd/unittests/InlayHintTests.cpp 8 additions, 1 deletionclang-tools-extra/clangd/unittests/InlayHintTests.cpp
- clang-tools-extra/clangd/unittests/tweaks/ExpandAutoTypeTests.cpp 4 additions, 3 deletions...ols-extra/clangd/unittests/tweaks/ExpandAutoTypeTests.cpp
- clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-owning-memory.cpp 6 additions, 13 deletions...t/clang-tidy/checkers/cppcoreguidelines-owning-memory.cpp
- clang/include/clang/AST/ASTContext.h 6 additions, 0 deletionsclang/include/clang/AST/ASTContext.h
- clang/include/clang/AST/Type.h 18 additions, 16 deletionsclang/include/clang/AST/Type.h
- clang/include/clang/ASTMatchers/ASTMatchersInternal.h 11 additions, 13 deletionsclang/include/clang/ASTMatchers/ASTMatchersInternal.h
- clang/include/clang/Sema/Sema.h 14 additions, 4 deletionsclang/include/clang/Sema/Sema.h
- clang/lib/AST/ASTContext.cpp 64 additions, 30 deletionsclang/lib/AST/ASTContext.cpp
- clang/lib/AST/ASTImporter.cpp 8 additions, 8 deletionsclang/lib/AST/ASTImporter.cpp
- clang/lib/AST/Type.cpp 2 additions, 2 deletionsclang/lib/AST/Type.cpp
- clang/lib/Sema/SemaCXXScopeSpec.cpp 1 addition, 1 deletionclang/lib/Sema/SemaCXXScopeSpec.cpp
- clang/lib/Sema/SemaDecl.cpp 10 additions, 11 deletionsclang/lib/Sema/SemaDecl.cpp
- clang/lib/Sema/SemaDeclCXX.cpp 1 addition, 1 deletionclang/lib/Sema/SemaDeclCXX.cpp
Loading