[all-commits] [llvm/llvm-project] 8019cb: [Clang][Sema] Earlier type checking for builtin un...

Krystian Stasiowski via All-commits all-commits at lists.llvm.org
Tue May 14 09:29:21 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8019cbbbbc94658d133583f7be6cd0023d30b0f3
      https://github.com/llvm/llvm-project/commit/8019cbbbbc94658d133583f7be6cd0023d30b0f3
  Author: Krystian Stasiowski <sdkrystian at gmail.com>
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Type.h
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/AST/ast-dump-expr-json.cpp
    M clang/test/AST/ast-dump-expr.cpp
    M clang/test/AST/ast-dump-lambda.cpp
    A clang/test/CXX/expr/expr.unary/expr.unary.general/p1.cpp
    M clang/test/CXX/over/over.built/ast.cpp
    M clang/test/CXX/over/over.built/p10.cpp
    M clang/test/CXX/over/over.built/p11.cpp
    M clang/test/CXX/temp/temp.res/temp.dep/temp.dep.type/p4.cpp
    M clang/test/Frontend/noderef_templates.cpp
    M clang/test/SemaCXX/cxx2b-deducing-this.cpp
    M clang/test/SemaTemplate/class-template-spec.cpp
    M clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp

  Log Message:
  -----------
  [Clang][Sema] Earlier type checking for builtin unary operators (#90500)

Currently, clang postpones all semantic analysis of unary operators with
operands of pointer/pointer to member/array/function type until
instantiation whenever that type is dependent (e.g. `T*` where `T` is a
type template parameter). Consequently, the uninstantiated AST nodes all
have the type `ASTContext::DependentTy` (which, for the purposes of
#90152, is undesirable as that type may be the current instantiation!
(e.g. `*this`))

This patch moves the point at which we perform semantic analysis for
such expression to be prior to instantiation.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list