This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rGbfec030e69af: [AST][RecoveryExpr] Populate error-bit from Type to Expr. (authored by hokein).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82099/new/ https://reviews.llvm.org/D82099 Files: clang/include/clang/AST/DependenceFlags.h clang/test/SemaCXX/invalid-template-base-specifier.cpp Index: clang/test/SemaCXX/invalid-template-base-specifier.cpp =================================================================== --- clang/test/SemaCXX/invalid-template-base-specifier.cpp +++ clang/test/SemaCXX/invalid-template-base-specifier.cpp @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -frecovery-ast -verify %s -bool Foo(int *); // expected-note {{candidate function not viable}} +bool Foo(int *); // expected-note {{candidate function not viable}} \ + // expected-note {{candidate function not viable}} template <typename T> struct Crash : decltype(Foo(T())) { // expected-error {{no matching function for call to 'Foo'}} @@ -8,3 +9,12 @@ }; void test() { Crash<int>(); } // expected-note {{in instantiation of template class}} + +template <typename T> +using Alias = decltype(Foo(T())); // expected-error {{no matching function for call to 'Foo'}} +template <typename T> +struct Crash2 : decltype(Alias<T>()) { // expected-note {{in instantiation of template type alias 'Alias' requested here}} + Crash2(){}; +}; + +void test2() { Crash2<int>(); } // expected-note {{in instantiation of template class 'Crash2<int>' requested here}} Index: clang/include/clang/AST/DependenceFlags.h =================================================================== --- clang/include/clang/AST/DependenceFlags.h +++ clang/include/clang/AST/DependenceFlags.h @@ -118,10 +118,10 @@ Dependence(TypeDependence D) : V(translate(D, TypeDependence::UnexpandedPack, UnexpandedPack) | - translate(D, TypeDependence::Instantiation, Instantiation) | - translate(D, TypeDependence::Dependent, Dependent) | - translate(D, TypeDependence::VariablyModified, VariablyModified)) { - } + translate(D, TypeDependence::Instantiation, Instantiation) | + translate(D, TypeDependence::Dependent, Dependent) | + translate(D, TypeDependence::Error, Error) | + translate(D, TypeDependence::VariablyModified, VariablyModified)) {} Dependence(ExprDependence D) : V(translate(D, ExprDependence::UnexpandedPack, UnexpandedPack) |
Index: clang/test/SemaCXX/invalid-template-base-specifier.cpp =================================================================== --- clang/test/SemaCXX/invalid-template-base-specifier.cpp +++ clang/test/SemaCXX/invalid-template-base-specifier.cpp @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -frecovery-ast -verify %s -bool Foo(int *); // expected-note {{candidate function not viable}} +bool Foo(int *); // expected-note {{candidate function not viable}} \ + // expected-note {{candidate function not viable}} template <typename T> struct Crash : decltype(Foo(T())) { // expected-error {{no matching function for call to 'Foo'}} @@ -8,3 +9,12 @@ }; void test() { Crash<int>(); } // expected-note {{in instantiation of template class}} + +template <typename T> +using Alias = decltype(Foo(T())); // expected-error {{no matching function for call to 'Foo'}} +template <typename T> +struct Crash2 : decltype(Alias<T>()) { // expected-note {{in instantiation of template type alias 'Alias' requested here}} + Crash2(){}; +}; + +void test2() { Crash2<int>(); } // expected-note {{in instantiation of template class 'Crash2<int>' requested here}} Index: clang/include/clang/AST/DependenceFlags.h =================================================================== --- clang/include/clang/AST/DependenceFlags.h +++ clang/include/clang/AST/DependenceFlags.h @@ -118,10 +118,10 @@ Dependence(TypeDependence D) : V(translate(D, TypeDependence::UnexpandedPack, UnexpandedPack) | - translate(D, TypeDependence::Instantiation, Instantiation) | - translate(D, TypeDependence::Dependent, Dependent) | - translate(D, TypeDependence::VariablyModified, VariablyModified)) { - } + translate(D, TypeDependence::Instantiation, Instantiation) | + translate(D, TypeDependence::Dependent, Dependent) | + translate(D, TypeDependence::Error, Error) | + translate(D, TypeDependence::VariablyModified, VariablyModified)) {} Dependence(ExprDependence D) : V(translate(D, ExprDependence::UnexpandedPack, UnexpandedPack) |
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits